summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-04 18:09:38 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-04 18:28:46 +1000
commitb8b504a484043e7f61f32b9621549579701817b7 (patch)
treebf9d80e0af56ef6bc34a26b72e55ceccf3970cdf /source3/rpc_server
parent2a01842da814a716464f4d6f344f615820744bec (diff)
downloadsamba-b8b504a484043e7f61f32b9621549579701817b7.tar.gz
samba-b8b504a484043e7f61f32b9621549579701817b7.tar.bz2
samba-b8b504a484043e7f61f32b9621549579701817b7.zip
s3-samr Send IP address only to PAM remote hostname hook on password set
The previous behaviour was to attempt to do a reverse hostname lookup, where enabled. This new behaviour matches the new behaviour in the modules called by auth stack. Andrew Bartlett
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c56
1 files changed, 12 insertions, 44 deletions
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index 475a204d55..3325f15ecb 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -1849,19 +1849,11 @@ NTSTATUS _samr_ChangePasswordUser2(struct pipes_struct *p,
return NT_STATUS_NO_MEMORY;
}
- rc = get_remote_hostname(p->remote_address,
- &rhost,
- talloc_tos());
- if (rc < 0) {
+ rhost = tsocket_address_inet_addr_string(p->remote_address,
+ talloc_tos());
+ if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
}
- if (strequal(rhost,"UNKNOWN")) {
- rhost = tsocket_address_inet_addr_string(p->remote_address,
- talloc_tos());
- if (rhost == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
- }
/*
* UNIX username case mangling not required, pass_oem_change
@@ -1928,19 +1920,11 @@ NTSTATUS _samr_OemChangePasswordUser2(struct pipes_struct *p,
return NT_STATUS_INVALID_PARAMETER;
}
- rc = get_remote_hostname(p->remote_address,
- &rhost,
- talloc_tos());
- if (rc < 0) {
+ rhost = tsocket_address_inet_addr_string(p->remote_address,
+ talloc_tos());
+ if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
}
- if (strequal(rhost,"UNKNOWN")) {
- rhost = tsocket_address_inet_addr_string(p->remote_address,
- talloc_tos());
- if (rhost == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
- }
status = pass_oem_change(user_name,
rhost,
@@ -1997,19 +1981,11 @@ NTSTATUS _samr_ChangePasswordUser3(struct pipes_struct *p,
return NT_STATUS_NO_MEMORY;
}
- rc = get_remote_hostname(p->remote_address,
- &rhost,
- talloc_tos());
- if (rc < 0) {
+ rhost = tsocket_address_inet_addr_string(p->remote_address,
+ talloc_tos());
+ if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
}
- if (strequal(rhost,"UNKNOWN")) {
- rhost = tsocket_address_inet_addr_string(p->remote_address,
- talloc_tos());
- if (rhost == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
- }
/*
* UNIX username case mangling not required, pass_oem_change
@@ -5137,19 +5113,11 @@ NTSTATUS _samr_SetUserInfo(struct pipes_struct *p,
return NT_STATUS_NO_SUCH_USER;
}
- rc = get_remote_hostname(p->remote_address,
- &rhost,
- talloc_tos());
- if (rc < 0) {
+ rhost = tsocket_address_inet_addr_string(p->remote_address,
+ talloc_tos());
+ if (rhost == NULL) {
return NT_STATUS_NO_MEMORY;
}
- if (strequal(rhost,"UNKNOWN")) {
- rhost = tsocket_address_inet_addr_string(p->remote_address,
- talloc_tos());
- if (rhost == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
- }
/* ================ BEGIN Privilege BLOCK ================ */