summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-11-10 18:14:16 +0000
committerLuke Leighton <lkcl@samba.org>1998-11-10 18:14:16 +0000
commit313d8ef27df81118b57f3d214db75be25e38b612 (patch)
tree9c4c478b3084c79276515d72e3c5018f4e490262 /source3/passdb
parentc22f10c7bd5288bea97d728738547bc0ca1cd6b7 (diff)
downloadsamba-313d8ef27df81118b57f3d214db75be25e38b612.tar.gz
samba-313d8ef27df81118b57f3d214db75be25e38b612.tar.bz2
samba-313d8ef27df81118b57f3d214db75be25e38b612.zip
util functions split into relevant modules, first pass.
(This used to be commit d448906e68cec5019fa83f7d31b862efff41e2da)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/smbpassfile.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/source3/passdb/smbpassfile.c b/source3/passdb/smbpassfile.c
index 2456abe50a..0d4f9d3203 100644
--- a/source3/passdb/smbpassfile.c
+++ b/source3/passdb/smbpassfile.c
@@ -21,53 +21,10 @@
extern int DEBUGLEVEL;
-static int gotalarm;
int pw_file_lock_depth = 0;
BOOL global_machine_password_needs_changing = False;
-/***************************************************************
- Signal function to tell us we timed out.
-****************************************************************/
-
-static void gotalarm_sig(void)
-{
- gotalarm = 1;
-}
-
-/***************************************************************
- Lock or unlock a fd for a known lock type. Abandon after waitsecs
- seconds.
-****************************************************************/
-
-BOOL do_file_lock(int fd, int waitsecs, int type)
-{
- SMB_STRUCT_FLOCK lock;
- int ret;
-
- gotalarm = 0;
- CatchSignal(SIGALRM, SIGNAL_CAST gotalarm_sig);
-
- lock.l_type = type;
- lock.l_whence = SEEK_SET;
- lock.l_start = 0;
- lock.l_len = 1;
- lock.l_pid = 0;
-
- alarm(5);
- ret = fcntl(fd, SMB_F_SETLKW, &lock);
- alarm(0);
- CatchSignal(SIGALRM, SIGNAL_CAST SIG_DFL);
-
- if (gotalarm) {
- DEBUG(0, ("do_file_lock: failed to %s file.\n",
- type == F_UNLCK ? "unlock" : "lock"));
- return False;
- }
-
- return (ret == 0);
-}
-
/***************************************************************
Lock an fd. Abandon after waitsecs seconds.