30 lines
890 B
Plaintext
30 lines
890 B
Plaintext
|
diff --git a/lib/util.c b/lib/util.c
|
||
|
index 62ad7bd..37f0463 100644
|
||
|
--- a/lib/util.c
|
||
|
+++ b/lib/util.c
|
||
|
@@ -605,7 +605,7 @@ EXPORTED int become_cyrus(int is_master)
|
||
|
p = getpwnam(cyrus);
|
||
|
if (p == NULL) {
|
||
|
syslog(LOG_ERR, "no entry in /etc/passwd for user %s", cyrus);
|
||
|
- return -1;
|
||
|
+ return 0;
|
||
|
}
|
||
|
|
||
|
/* Save these in case initgroups does a getpw*() */
|
||
|
@@ -625,13 +625,13 @@ EXPORTED int become_cyrus(int is_master)
|
||
|
if (initgroups(cyrus, newgid)) {
|
||
|
syslog(LOG_ERR, "unable to initialize groups for user %s: %s",
|
||
|
cyrus, strerror(errno));
|
||
|
- return -1;
|
||
|
+ return 0;
|
||
|
}
|
||
|
|
||
|
if (setgid(newgid)) {
|
||
|
syslog(LOG_ERR, "unable to set group id to %d for user %s: %s",
|
||
|
newgid, cyrus, strerror(errno));
|
||
|
- return -1;
|
||
|
+ return 0;
|
||
|
}
|
||
|
|
||
|
result = cap_setuid(newuid, is_master);
|