diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-12-23 03:00:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:36 -0500 |
commit | 9be2e63315393f6e94cdd01a507b16768b0d90db (patch) | |
tree | ea095986949f83b20e95d5ad68a2d38e0717cc71 /source4/auth/auth_sam.c | |
parent | ae42636167f82fee7fb38338dec605521162b5c2 (diff) | |
download | samba-9be2e63315393f6e94cdd01a507b16768b0d90db.tar.gz samba-9be2e63315393f6e94cdd01a507b16768b0d90db.tar.bz2 samba-9be2e63315393f6e94cdd01a507b16768b0d90db.zip |
r4339: - rename auth_guest to auth_anonymous
- don't use static const strings in the server_info
- fix segfault when auth_sam gets "" as username
metze
(This used to be commit 7fcbd483d4977cf6483f34ddd28e6c0182897ba2)
Diffstat (limited to 'source4/auth/auth_sam.c')
-rw-r--r-- | source4/auth/auth_sam.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c index 501b5ca080..236a68fe9d 100644 --- a/source4/auth/auth_sam.c +++ b/source4/auth/auth_sam.c @@ -500,14 +500,18 @@ static NTSTATUS check_sam_security_internals(const struct auth_context *auth_con const struct auth_usersupplied_info *user_info, struct auth_serversupplied_info **server_info) { - NTSTATUS nt_status; - + /* mark this as 'not for me' */ + NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED; const char *username = user_info->internal_username.str; struct ldb_message **msgs; struct ldb_message **domain_msgs; void *sam_ctx; DATA_BLOB user_sess_key, lm_sess_key; + if (!username || !*username) { + return nt_status; + } + sam_ctx = samdb_connect(mem_ctx); if (sam_ctx == NULL) { return NT_STATUS_INVALID_SYSTEM_SERVICE; |