summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2011-04-21 09:45:27 -0400
committerAndreas Schneider <asn@samba.org>2011-08-10 18:14:02 +0200
commit05455b459a93f620143d90fd34a28e4485fd606a (patch)
tree5176d1a248ccc76fdff12cd5e8e0968b426b30ee /source3/smbd
parent185cd4c79492a7de5988f9407d764cdb3a0e2e10 (diff)
downloadsamba-05455b459a93f620143d90fd34a28e4485fd606a.tar.gz
samba-05455b459a93f620143d90fd34a28e4485fd606a.tar.bz2
samba-05455b459a93f620143d90fd34a28e4485fd606a.zip
lib-util: Make useful function a common utility.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index fc6112c161..d96d5fb7e0 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2422,32 +2422,6 @@ static bool housekeeping_fn(const struct timeval *now, void *private_data)
return true;
}
-static int create_unlink_tmp(const char *dir)
-{
- char *fname;
- int fd;
-
- fname = talloc_asprintf(talloc_tos(), "%s/listenerlock_XXXXXX", dir);
- if (fname == NULL) {
- errno = ENOMEM;
- return -1;
- }
- fd = mkstemp(fname);
- if (fd == -1) {
- TALLOC_FREE(fname);
- return -1;
- }
- if (unlink(fname) == -1) {
- int sys_errno = errno;
- close(fd);
- TALLOC_FREE(fname);
- errno = sys_errno;
- return -1;
- }
- TALLOC_FREE(fname);
- return fd;
-}
-
/*
* Read an smb packet in the echo handler child, giving the parent
* smbd one second to react once the socket becomes readable.