dovecot-1.1: Auth sockets: Allow specifying user and group with ...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jan 13 02:19:03 EET 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/9504dbe25d0f
changeset: 8089:9504dbe25d0f
user: Timo Sirainen <tss at iki.fi>
date: Mon Jan 12 19:18:56 2009 -0500
description:
Auth sockets: Allow specifying user and group with numbers.
diffstat:
1 file changed, 4 insertions(+)
src/auth/main.c | 4 ++++
diffs (21 lines):
diff -r d51d0635a72a -r 9504dbe25d0f src/auth/main.c
--- 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
@@ -76,6 +76,8 @@ static uid_t get_uid(const char *user)
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);
@@ -88,6 +90,8 @@ static gid_t get_gid(const char *group)
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);
More information about the dovecot-cvs
mailing list