summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_auth.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-03-01 16:08:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:55 -0500
commit4a3ca96fb44a62867ef565d1eeb6c0a16418e505 (patch)
treeb5c37a846d03bc3fb6e36f02c4ca34b45dfdee5c /source4/librpc/rpc/dcerpc_auth.c
parent70f7c56168056c025c6931ce6e934203a5c2c9dc (diff)
downloadsamba-4a3ca96fb44a62867ef565d1eeb6c0a16418e505.tar.gz
samba-4a3ca96fb44a62867ef565d1eeb6c0a16418e505.tar.bz2
samba-4a3ca96fb44a62867ef565d1eeb6c0a16418e505.zip
r5603: add "authservice()" property to the interface property list
so we can specify allowed target service names in the idl file the default is "host" metze (This used to be commit bf40d5321f3257bf9354a42d31265f1a9b0d53ad)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_auth.c')
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index c0b72b6842..1bcf4224c4 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -146,7 +146,8 @@ NTSTATUS dcerpc_bind_auth_password(struct dcerpc_pipe *p,
const char *domain,
const char *username,
const char *password,
- uint8_t auth_type)
+ uint8_t auth_type,
+ const char *service)
{
NTSTATUS status;
@@ -189,6 +190,15 @@ NTSTATUS dcerpc_bind_auth_password(struct dcerpc_pipe *p,
return status;
}
+ if (service) {
+ status = gensec_set_target_service(p->conn->security_state.generic_state, service);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(1, ("Failed to start set GENSEC target service: %s\n",
+ nt_errstr(status)));
+ return status;
+ }
+ }
+
status = gensec_start_mech_by_authtype(p->conn->security_state.generic_state,
auth_type,
dcerpc_auth_level(p->conn));