summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-19 11:33:12 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-19 17:04:29 +0200
commit13cfe2504e17a3ab3c32d677e40ead5bd497432c (patch)
tree9e891c66aff639a1a71ee74400ebf83e3084fa75 /source3
parent4f15b47324e437cf502b3165553138b7e6ab474b (diff)
downloadsamba-13cfe2504e17a3ab3c32d677e40ead5bd497432c.tar.gz
samba-13cfe2504e17a3ab3c32d677e40ead5bd497432c.tar.bz2
samba-13cfe2504e17a3ab3c32d677e40ead5bd497432c.zip
s3:rpc_server/lsasd: remove dependency to libgen.h and basename()
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/lsasd.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c
index 6608d6ba33..8be70984db 100644
--- a/source3/rpc_server/lsasd.c
+++ b/source3/rpc_server/lsasd.c
@@ -23,7 +23,6 @@
#include "serverid.h"
#include "messages.h"
#include "ntdomain.h"
-#include <libgen.h>
#include "lib/id_cache.h"
@@ -455,7 +454,8 @@ static void lsasd_handle_client(struct tevent_req *req)
sd,
NULL);
} else if (tsocket_address_is_unix(srv_addr)) {
- char *p;
+ const char *p;
+ const char *b;
p = tsocket_address_unix_path(srv_addr, tmp_ctx);
if (p == NULL) {
@@ -463,22 +463,25 @@ static void lsasd_handle_client(struct tevent_req *req)
return;
}
- if (strstr(p, "/np/")) {
- p = basename(p);
+ b = strrchr(p, '/');
+ if (b != NULL) {
+ b++;
+ } else {
+ b = p;
+ }
+ if (strstr(p, "/np/")) {
named_pipe_accept_function(data->ev_ctx,
data->msg_ctx,
- p,
+ b,
sd,
lsasd_client_terminated,
data);
} else {
- p = basename(p);
-
dcerpc_ncacn_accept(data->ev_ctx,
data->msg_ctx,
NCALRPC,
- p,
+ b,
cli_addr,
srv_addr,
sd,