aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-11-28 00:06:32 +0100
committerBertrand Jacquin <beber@meleeweb.net>2013-11-28 00:08:03 +0100
commit41c97df6fe3e25a8683852c7ae440e58fd51ca04 (patch)
tree95d4658129bad49995e0b324064b0b7eef25d18d
parentBUG/MINOR: Add all RGroups, even when when group is not matching MIN_GID (diff)
downloadmod_ruid2-master.tar.gz
BUG/MEDIUM: Switch to default UID/GID when UID/GID is inferior thanHEADmaster
RDefaultUidGid only for RMode stat
-rw-r--r--mod_ruid2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mod_ruid2.c b/mod_ruid2.c
index 6767f55..7b10cee 100644
--- a/mod_ruid2.c
+++ b/mod_ruid2.c
@@ -503,19 +503,19 @@ static int ruid_set_perm (request_rec *r, const char *from_func)
*/
gid=r->finfo.group;
uid=r->finfo.user;
+
+ /* if uid of filename is less than conf->min_uid then set to conf->default_uid */
+ if (uid < conf->min_uid) {
+ uid=conf->default_uid;
+ }
+ if (gid < conf->min_gid) {
+ gid=conf->default_gid;
+ }
} else {
gid=(dconf->ruid_gid == UNSET) ? ap_unixd_config.group_id : dconf->ruid_gid;
uid=(dconf->ruid_uid == UNSET) ? ap_unixd_config.user_id : dconf->ruid_uid;
}
- /* if uid of filename is less than conf->min_uid then set to conf->default_uid */
- if (uid < conf->min_uid) {
- uid=conf->default_uid;
- }
- if (gid < conf->min_gid) {
- gid=conf->default_gid;
- }
-
/* set supplementary groups */
if ((dconf->groupsnr == UNSET) && (startup_groupsnr > 0)) {
memcpy(groups, startup_groups, sizeof(groups));