Mercurial > dovecot > core-2.2
changeset 8618:8bda844b1ee5 HEAD
Auth sockets: Allow specifying user and group with numbers.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 12 Jan 2009 19:18:56 -0500 |
parents | e3fd1a6467f2 |
children | 9c4f9c47299b |
files | src/auth/main.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/main.c Mon Jan 12 13:26:24 2009 -0500 +++ b/src/auth/main.c Mon Jan 12 19:18:56 2009 -0500 @@ -77,6 +77,8 @@ if (user == NULL) return (uid_t)-1; + if (is_numeric(user, '\0')) + return strtoul(user, NULL, 10); if ((pw = getpwnam(user)) == NULL) i_fatal("User doesn't exist: %s", user); @@ -89,6 +91,8 @@ if (group == NULL) return (gid_t)-1; + if (is_numeric(group, '\0')) + return strtoul(group, NULL, 10); if ((gr = getgrnam(group)) == NULL) i_fatal("Group doesn't exist: %s", group);