diff options
author | Andreas Schneider <asn@samba.org> | 2011-07-12 12:23:08 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-07-13 14:09:35 +0200 |
commit | f97bdebbbe29c896524e7a0a68296f2d4709364a (patch) | |
tree | 8e087c7748e2ac52c5fefbcee5bbfe3c60bd9ac2 /source3/auth/auth_unix.c | |
parent | 15e017deb02de40af1226316614386cfadb205eb (diff) | |
download | samba-f97bdebbbe29c896524e7a0a68296f2d4709364a.tar.gz |
s3-auth: Fix account check over ncalrpc.
Diffstat (limited to 'source3/auth/auth_unix.c')
-rw-r--r-- | source3/auth/auth_unix.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c index 6f232ec66ce..c8b5435abc8 100644 --- a/source3/auth/auth_unix.c +++ b/source3/auth/auth_unix.c @@ -39,14 +39,18 @@ static NTSTATUS check_unix_security(const struct auth_context *auth_context, { NTSTATUS nt_status; struct passwd *pass = NULL; - char *rhost; + const char *rhost; DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name)); - rhost = tsocket_address_inet_addr_string(user_info->remote_host, - talloc_tos()); - if (rhost == NULL) { - return NT_STATUS_NO_MEMORY; + if (tsocket_address_is_inet(user_info->remote_host, "ip")) { + rhost = tsocket_address_inet_addr_string(user_info->remote_host, + talloc_tos()); + if (rhost == NULL) { + return NT_STATUS_NO_MEMORY; + } + } else { + rhost = "127.0.0.1"; } become_root(); |