Revert "Add services.httpd.fixUidAndGid option to assign reliable numeric UID and GID for the Apache user."

This reverts commit 0ef085d58a8307bfe6ba5a108a063a9e41a2549d.
This commit is contained in:
Eelco Dolstra 2012-08-03 10:52:53 -04:00
parent 514a26af13
commit 0a0c28f812
2 changed files with 6 additions and 22 deletions

View File

@ -72,7 +72,6 @@ in
clamav = 51; clamav = 51;
fprot = 52; fprot = 52;
bind = 53; bind = 53;
wwwrun = 54;
# When adding a uid, make sure it doesn't match an existing gid. # When adding a uid, make sure it doesn't match an existing gid.
@ -124,9 +123,6 @@ in
mpd = 50; mpd = 50;
clamav = 51; clamav = 51;
fprot = 52; fprot = 52;
# Group id 53 is still free! I didn't use it, because I wanted the
# the same numeric value for the 'wwwrun' user and group.
wwwrun = 54;
# When adding a gid, make sure it doesn't match an existing uid. # When adding a gid, make sure it doesn't match an existing uid.

View File

@ -407,7 +407,7 @@ in
package = mkOption { package = mkOption {
default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; }; default = pkgs.apacheHttpd.override { mpm = mainCfg.multiProcessingModule; };
example = "pkgs.apacheHttpd_2_4"; example = "pkgs.apacheHttpd_2_4";
description = " description = "
Overridable attribute of the Apache HTTP Server package to use. Overridable attribute of the Apache HTTP Server package to use.
"; ";
@ -415,7 +415,7 @@ in
configFile = mkOption { configFile = mkOption {
default = confFile; default = confFile;
example = ''pkgs.writeText "httpd.conf" "# my custom config file ...";''; example = ''pkgs.writeText "httpd.conf" "# my custom config file ...";'';
description = " description = "
Overridable config file to use for Apache. By default, use the Overridable config file to use for Apache. By default, use the
file automatically generated by nixos. file automatically generated by nixos.
@ -469,18 +469,6 @@ in
"; ";
}; };
fixUidAndGid = mkOption {
default = false;
description = "
Use a fixed numeric ID (54) for the <varname>wwwrun</varname> user
and group. This setting is disabled by default for the sake of
backwards compatibility: we don't want to break pre-existing
installations that alrady have a user/group for Apache with different
values for that ID. If you're installing a fresh server, however,
choosing the fixed numeric values for those IDs is safe.
";
};
logDir = mkOption { logDir = mkOption {
default = "/var/log/httpd"; default = "/var/log/httpd";
description = " description = "
@ -570,14 +558,14 @@ in
config = mkIf config.services.httpd.enable { config = mkIf config.services.httpd.enable {
users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton
({ name = "wwwrun"; { name = "wwwrun";
group = "wwwrun"; group = "wwwrun";
description = "Apache httpd user"; description = "Apache httpd user";
} // (if mainCfg.fixUidAndGid then { uid = config.ids.uids.wwwrun; } else {})); };
users.extraGroups = optionalAttrs (mainCfg.group == "wwwrun") singleton users.extraGroups = optionalAttrs (mainCfg.group == "wwwrun") singleton
({ name = "wwwrun"; { name = "wwwrun";
} // (if mainCfg.fixUidAndGid then { gid = config.ids.gids.wwwrun; } else {})); };
environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices; environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;