fixed an uninitialized variable in lookupsmbgrpgid() and
authorGerald Carter <jerry@samba.org>
Wed, 13 Jan 1999 00:40:04 +0000 (00:40 +0000)
committerGerald Carter <jerry@samba.org>
Wed, 13 Jan 1999 00:40:04 +0000 (00:40 +0000)
lookupsmbpwuid that was causing a SEGFAULT in smbd.

source/lib/domain_namemap.c
source/lib/util_pwdb.c

index cb0e315ef5a87e447ce3b581a2a453fe68fcf14c..f095c8d764b90aaac152fc1727d58770a236c7e7 100644 (file)
@@ -1026,6 +1026,7 @@ BOOL lookupsmbpwuid(uid_t uid, DOM_NAME_MAP *gmep)
        {
                gmep->nt_name   = nt_name;
                gmep->unix_name = unix_name;
+               gmep->nt_domain = nt_domain;
 
                gmep->unix_id = (uint32)uid;
 
@@ -1279,6 +1280,7 @@ BOOL lookupsmbgrpgid(gid_t gid, DOM_NAME_MAP *gmep)
        {
                gmep->nt_name   = nt_name;
                gmep->unix_name = unix_name;
+               gmep->nt_domain = nt_domain;
 
                gmep->unix_id = (uint32)gid;
 
index a2e1ac010d258d2987bc2187dc58b45903b0c274..6a37f1bf747935b4565e19546ee40a435ade475f 100644 (file)
@@ -318,7 +318,7 @@ static time_t get_time_from_string(const char *p)
 
 time_t pwdb_get_last_set_time(const char *p)
 {
-       if (*p && StrnCaseCmp(p, "LCT-", 4))
+       if (*p && !StrnCaseCmp(p, "LCT-", 4))
        {
                return get_time_from_string(p + 4);
        }