From: Sebastian Harl Date: Wed, 11 Dec 2013 10:09:04 +0000 (+0100) Subject: sysdb: Exit, if the current user could not be determined. X-Git-Tag: sysdb-0.1.0~313 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=46d7bc13492ddd84f100cbe0ddb53fadd592e030;p=sysdb.git sysdb: Exit, if the current user could not be determined. --- diff --git a/src/client/sysdb.c b/src/client/sysdb.c index fa71eed..c2b542d 100644 --- a/src/client/sysdb.c +++ b/src/client/sysdb.c @@ -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) {