r4339: - rename auth_guest to auth_anonymous
[samba.git] / source4 / auth / auth_sam.c
index 501b5ca080898b42de717b202e7a8037c05ce6b6..236a68fe9dd10440340fc1c825b91e19a948123a 100644 (file)
@@ -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;