summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2006-06-20 18:58:53 +0000
committerGerrit Pape <pape@smarden.org>2006-06-20 18:58:53 +0000
commita2251d0a7c89a58f8074b87e079e903bea76a3a7 (patch)
tree15d762aa4e04e204823e8e8cd563edc2424b16a7 /src
parent0956d5f7ecdc7c0dd78a1be2312473d1ea9b937b (diff)
downloadrunit-a2251d0a7c89a58f8074b87e079e903bea76a3a7.tar.gz
runit-a2251d0a7c89a58f8074b87e079e903bea76a3a7.tar.xz
runit-a2251d0a7c89a58f8074b87e079e903bea76a3a7.zip
* uidgid.c: properly fixup user/group argument on getpwnam() error.
Diffstat (limited to 'src')
-rw-r--r--src/uidgid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uidgid.c b/src/uidgid.c
index b467069..720d2ff 100644
--- a/src/uidgid.c
+++ b/src/uidgid.c
@@ -15,7 +15,7 @@ unsigned int uidgid_get(struct uidgid *u, char *ug, unsigned int dogrp) {
       ug[d] =0;
       g =ug +d +1;
     }
-  if (! (pwd =getpwnam(ug))) { ug[d] =':'; return(0); }
+  if (! (pwd =getpwnam(ug))) { if (g) ug[d] =':'; return(0); }
   if (g) {
     ug[d] =':';
     for (i =0; i < 60; ++i) {