summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index cb784a6539..72ceb1d517 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6155,7 +6155,6 @@ WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname
char *cmd = lp_addport_cmd();
char *command = NULL;
int ret;
- int fd;
SE_PRIV se_printop = SE_PRINT_OPERATOR;
bool is_print_op = False;
@@ -6179,7 +6178,7 @@ WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname
if ( is_print_op )
become_root();
- ret = smbrun(command, &fd);
+ ret = smbrun(command, NULL);
if ( is_print_op )
unbecome_root();
@@ -6191,8 +6190,6 @@ WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname
TALLOC_FREE(command);
if ( ret != 0 ) {
- if (fd != -1)
- close(fd);
return WERR_ACCESS_DENIED;
}