mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
rpc: use symbolic constant to replace /root/ncalrpc_as_system
Modified to use constant AS_SYSTEM_MAGIC_PATH_TOKEN instead of string literal "/root/ncalrpc_as_system" BUG: https://bugzilla.samba.org/show_bug.cgi?id=12865 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> (cherry picked from commit 1898096c7ecef4c323b14b7cf30db4283386f913)
This commit is contained in:
parent
eb6e820355
commit
05231408b4
@ -203,7 +203,7 @@ static NTSTATUS gensec_ncalrpc_update_internal(
|
|||||||
return NT_STATUS_LOGON_FAILURE;
|
return NT_STATUS_LOGON_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmp = strcmp(unix_path, "/root/ncalrpc_as_system");
|
cmp = strcmp(unix_path, AS_SYSTEM_MAGIC_PATH_TOKEN);
|
||||||
TALLOC_FREE(unix_path);
|
TALLOC_FREE(unix_path);
|
||||||
if (cmp != 0) {
|
if (cmp != 0) {
|
||||||
state->step = GENSEC_NCALRPC_ERROR;
|
state->step = GENSEC_NCALRPC_ERROR;
|
||||||
|
@ -1044,7 +1044,7 @@ void dcerpc_ncacn_accept(struct tevent_context *ev_ctx,
|
|||||||
TALLOC_FREE(ncacn_conn->remote_client_addr);
|
TALLOC_FREE(ncacn_conn->remote_client_addr);
|
||||||
|
|
||||||
rc = tsocket_address_unix_from_path(ncacn_conn,
|
rc = tsocket_address_unix_from_path(ncacn_conn,
|
||||||
"/root/ncalrpc_as_system",
|
AS_SYSTEM_MAGIC_PATH_TOKEN,
|
||||||
&ncacn_conn->remote_client_addr);
|
&ncacn_conn->remote_client_addr);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
DEBUG(0, ("Out of memory building magic ncalrpc_as_system path!\n"));
|
DEBUG(0, ("Out of memory building magic ncalrpc_as_system path!\n"));
|
||||||
|
@ -2707,7 +2707,7 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn)
|
|||||||
struct tsocket_address *r = NULL;
|
struct tsocket_address *r = NULL;
|
||||||
|
|
||||||
ret = tsocket_address_unix_from_path(dcesrv_conn,
|
ret = tsocket_address_unix_from_path(dcesrv_conn,
|
||||||
"/root/ncalrpc_as_system",
|
AS_SYSTEM_MAGIC_PATH_TOKEN,
|
||||||
&r);
|
&r);
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
status = map_nt_error_from_unix_common(errno);
|
status = map_nt_error_from_unix_common(errno);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user