diff options
Diffstat (limited to 'map_common.c')
-rw-r--r-- | map_common.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/map_common.c b/map_common.c index 1c3bfa9..f7ee038 100644 --- a/map_common.c +++ b/map_common.c @@ -35,6 +35,7 @@ static const char config_file[] = "/etc/nss_mapuser.conf"; * in build, so local to the shared lib. */ char *exclude_users; /* don't lookup these users */ char *mappeduser; +char *mapped_priv_user; uid_t min_uid = DEF_MIN_UID; int debug; @@ -54,6 +55,10 @@ reset_config(void) (void)free(mappeduser); mappeduser = NULL; } + if(mapped_priv_user) { + (void)free(mapped_priv_user); + mapped_priv_user = NULL; + } debug = 0; min_uid = DEF_MIN_UID; } @@ -117,6 +122,10 @@ nss_mapuser_config(int *errnop, const char *lname) /* the user we are mapping to */ mappeduser = strdup(lbuf+12); } + else if(!strncmp(lbuf, "mapped_priv_user=", 17)) { + /* the user we are mapping to */ + mapped_priv_user = strdup(lbuf+17); + } else if(!strncmp(lbuf, "min_uid=", 8)) { /* * Don't lookup uids that are local, typically set to either |