summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-19 20:05:07 +0100
committerVolker Lendecke <vl@samba.org>2011-02-20 10:23:29 +0100
commit51b84a9ed7eaa7e38e2279a825290976bfa40177 (patch)
tree991a7a216ec6c551844a1ce6f693238968bc746c
parent88f52155607ccc653d4f4610557bfa10b83e4c73 (diff)
downloadsamba-51b84a9ed7eaa7e38e2279a825290976bfa40177.tar.gz
samba-51b84a9ed7eaa7e38e2279a825290976bfa40177.tar.bz2
samba-51b84a9ed7eaa7e38e2279a825290976bfa40177.zip
s3: Convert init_system_info to NTSTATUS
-rw-r--r--source3/auth/auth_util.c7
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/smbd/server.c6
-rw-r--r--source3/winbindd/winbindd.c6
4 files changed, 12 insertions, 9 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 1c036ff124..a30a36f9aa 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -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,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a2cc222e0f..f6c77b6d5e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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,
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index f4436bfad7..abdd52accb 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -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;
}
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 92ae12fe76..d9a302cbc3 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -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);
}