s3: Convert init_system_info to NTSTATUS
authorVolker Lendecke <vl@samba.org>
Sat, 19 Feb 2011 19:05:07 +0000 (20:05 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 20 Feb 2011 09:23:29 +0000 (10:23 +0100)
source3/auth/auth_util.c
source3/include/proto.h
source3/smbd/server.c
source3/winbindd/winbindd.c

index 1c036ff1244162964920171c3881ec84fd85c64a..a30a36f9aa7baf0dc19fd3821120ceeb6436e3e4 100644 (file)
@@ -918,13 +918,12 @@ NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
 
 static struct auth_serversupplied_info *system_info = NULL;
 
-bool init_system_info(void)
+NTSTATUS init_system_info(void)
 {
        if (system_info != NULL)
-               return True;
+               return NT_STATUS_OK;
 
-       return NT_STATUS_IS_OK(make_new_server_info_system(NULL,
-                                                          &system_info));
+       return make_new_server_info_system(NULL, &system_info);
 }
 
 NTSTATUS make_server_info_system(TALLOC_CTX *mem_ctx,
index a2cc222e0f74d4c7d1d7e71a522c016195494db7..f6c77b6d5e28f490357f0cf85703bde14e14bf65 100644 (file)
@@ -143,7 +143,7 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
 struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
                                                 const struct auth_serversupplied_info *src);
 bool init_guest_info(void);
-bool init_system_info(void);
+NTSTATUS init_system_info(void);
 bool server_info_set_session_key(struct auth_serversupplied_info *info,
                                 DATA_BLOB session_key);
 NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
index f4436bfad7ade654bd5fbf3c3757bf55ff2343e9..abdd52accb3ddd016fb8d35b8a98c114de8bee0e 100644 (file)
@@ -1179,8 +1179,10 @@ extern void build_options(bool screen);
                exit(1);
        }
 
-       if (!init_system_info()) {
-               DEBUG(0,("ERROR: failed to setup system user info.\n"));
+       status = init_system_info();
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(1, ("ERROR: failed to setup system user info: %s.\n",
+                         nt_errstr(status)));
                return -1;
        }
 
index 92ae12fe766a85a59b003503e72cbf73813c7914..d9a302cbc3b61e1c5242c457ab6dbb1ece983f7c 100644 (file)
@@ -1398,8 +1398,10 @@ int main(int argc, char **argv, char **envp)
 
        winbindd_register_handlers();
 
-       if (!init_system_info()) {
-               DEBUG(0,("ERROR: failed to setup system user info.\n"));
+       status = init_system_info();
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(1, ("ERROR: failed to setup system user info: %s.\n",
+                         nt_errstr(status)));
                exit(1);
        }