s3-rpc_server: Fix username and remote check.
authorAndreas Schneider <asn@samba.org>
Wed, 19 Dec 2012 10:20:50 +0000 (11:20 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 21 Dec 2012 12:56:01 +0000 (13:56 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/rpc_server/wkssvc/srv_wkssvc_nt.c

index ada83ea..daa44e9 100644 (file)
@@ -183,8 +183,8 @@ static struct dom_usr *get_domain_userlist(TALLOC_CTX *mem_ctx)
        }
 
        for (i=num_users=0; i<num_sessions; i++) {
-               if (!session_list[i].username
-                   || !session_list[i].remote_machine) {
+               if (session_list[i].username[0] == '\0' ||
+                   session_list[i].remote_machine[0] == '\0') {
                        continue;
                }
                p = strpbrk(session_list[i].remote_machine, "./");