summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-01-01 05:51:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-01-01 05:51:03 +0000
commit03aea8fc9001495d47481d988e5f4823ee4e4827 (patch)
treeca5de4ca43da37c8b36824a5b1e0c7c268155959 /source3
parent62d528520b543b63419e76f3e32219c987f7756a (diff)
downloadsamba-03aea8fc9001495d47481d988e5f4823ee4e4827.tar.gz
samba-03aea8fc9001495d47481d988e5f4823ee4e4827.tar.bz2
samba-03aea8fc9001495d47481d988e5f4823ee4e4827.zip
Allow usernames in the form of 'NT_STATUS_....' to map to that as the error
when using the 'name_to_ntstatus' auth module. This could be useful in testing. Andrew Bartlett (This used to be commit 5cdc67d0bda8ef41305cae9c5be70d11593ffdd8)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_builtin.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/auth/auth_builtin.c b/source3/auth/auth_builtin.c
index b5bb673e2c..f76987f685 100644
--- a/source3/auth/auth_builtin.c
+++ b/source3/auth/auth_builtin.c
@@ -83,6 +83,12 @@ static NTSTATUS check_name_to_ntstatus_security(void *my_private_data,
fstring user;
long error_num;
fstrcpy(user, user_info->smb_name.str);
+
+ if (strncasecmp("NT_STATUS", user, strlen("NT_STATUS")) == 0) {
+ strupper(user);
+ return nt_status_string_to_code(user);
+ }
+
strlower(user);
error_num = strtoul(user, NULL, 16);