Code

sysdb: Exit, if the current user could not be determined.
authorSebastian Harl <sh@tokkee.org>
Wed, 11 Dec 2013 10:09:04 +0000 (11:09 +0100)
committerSebastian Harl <sh@tokkee.org>
Wed, 11 Dec 2013 10:09:04 +0000 (11:09 +0100)
src/client/sysdb.c

index fa71eed9d064b04d86037412988e5b10a5c1c7b6..c2b542d458e3aa2bbb1b4d5687f801a2b8d1a914 100644 (file)
@@ -155,8 +155,11 @@ main(int argc, char **argv)
 
        if (! host)
                host = DEFAULT_SOCKET;
-       if (! user)
+       if (! user) {
                user = get_current_user();
+               if (! user)
+                       exit(1);
+       }
 
        client = sdb_client_create(host);
        if (! client) {