--- sysvinit-2.85/src/init.c.selgenusers 2005-02-23 11:47:17.000000000 -0500 +++ sysvinit-2.85/src/init.c 2005-02-23 11:51:07.000000000 -0500 @@ -199,9 +199,10 @@ static int load_policy(int *enforce) { int fd=-1,ret=-1; + size_t data_size; int rc=0, orig_enforce; struct stat sb; - void *map; + void *map, *data; char policy_file[PATH_MAX]; int policy_version=0; FILE *cfg; @@ -306,8 +307,16 @@ } + /* Set SELinux users based on a local.users configuration file. */ + ret = sepol_genusers(map, sb.st_size, selinux_users_path(), &data, &data_size); + if (ret < 0) { + log(L_VB,"Warning! Error while reading user configuration from %s/{local.users,system.users}: %s\n", selinux_users_path(), strerror(errno)); + data=map; + data_size=sb.st_size; + } + /* Set booleans based on a booleans configuration file. */ - ret = sepol_genbools(map, sb.st_size, selinux_booleans_path()); + ret = sepol_genbools(data, data_size, selinux_booleans_path()); if (ret < 0) { if (errno == ENOENT || errno == EINVAL) { /* No booleans file or stale booleans in the file; non-fatal. */ @@ -320,7 +329,7 @@ } } log(L_VB, "Loading security policy\n"); - ret=security_load_policy(map, sb.st_size); + ret=security_load_policy(data, data_size); if (ret < 0) { log(L_VB, "security_load_policy failed\n"); }