summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Long <plong@fsmlabs.com>2020-01-29 14:13:52 -0600
committerChristian Poessinger <christian@poessinger.com>2020-03-21 17:13:16 +0100
commit9d328a6d838d1d3675b5def62c577c5eb322d103 (patch)
tree1bb8fbd9f9777968954bd9196980f2e220a8dd27
parent5003d8998acada468929a64e1ad63020ead1edc4 (diff)
downloadlibnss-mapuser-9d328a6d838d1d3675b5def62c577c5eb322d103.tar.gz
libnss-mapuser-9d328a6d838d1d3675b5def62c577c5eb322d103.zip
Fix wrong lengths for "map_min_uid=".
-rw-r--r--map_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/map_common.c b/map_common.c
index b6fe3bc..2f73a97 100644
--- a/map_common.c
+++ b/map_common.c
@@ -141,15 +141,15 @@ int nss_mapuser_config(int *errnop, const char *lname)
} else if (!strncmp(lbuf, "mapped_priv_user=", 17)) {
/* the user we are mapping to */
mapped_priv_user = strdup(lbuf + 17);
- } else if (!strncmp(lbuf, "map_min_uid=", 8)) {
+ } else if (!strncmp(lbuf, "map_min_uid=", 12)) {
/*
* Don't lookup uids that are local, typically set to either
* 0 or smallest always local user's uid
*/
unsigned long uid;
char *valid;
- uid = strtoul(lbuf + 8, &valid, 0);
- if (valid > (lbuf + 8))
+ uid = strtoul(lbuf + 12, &valid, 0);
+ if (valid > (lbuf + 12))
map_min_uid = (uid_t) uid;
} else if (map_debug) /* ignore unrecognized lines, unless map_debug on */
syslog(LOG_WARNING, "%s: unrecognized parameter: %s",