summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-02 02:23:41 +0000
committerJeremy Allison <jra@samba.org>2000-05-02 02:23:41 +0000
commit693ffb8466ada58ecc59fde754ba79fc6f51528d (patch)
tree639fae54b3d874aae78e5732aef20f52de5b60bf /source3/passdb
parent830a9e571eee5330097376e94af7dc0f2d5f2f02 (diff)
downloadsamba-693ffb8466ada58ecc59fde754ba79fc6f51528d.tar.gz
samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.tar.bz2
samba-693ffb8466ada58ecc59fde754ba79fc6f51528d.zip
Added sys_fork() and sys_getpid() functions to stop the overhead
of doing a system call every time we want to just get our pid. Jeremy. (This used to be commit 148628b616b5c29ba6340d65fc3ddbcabba6e67a)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/pass_check.c6
-rw-r--r--source3/passdb/smbpass.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/passdb/pass_check.c b/source3/passdb/pass_check.c
index c3e5669747..0496ed9961 100644
--- a/source3/passdb/pass_check.c
+++ b/source3/passdb/pass_check.c
@@ -439,7 +439,7 @@ static BOOL dfs_auth(char *user, char *password)
}
DEBUG(0, ("DCE login succeeded for principal %s on pid %d\n",
- user, getpid()));
+ user, sys_getpid()));
DEBUG(3, ("DCE principal: %s\n"
" uid: %d\n"
@@ -487,7 +487,7 @@ void dfs_unlogin(void)
dce_error_inq_text(err, dce_errstr, &err2);
DEBUG(0,
("DCE purge login context failed for server instance %d: %s\n",
- getpid(), dce_errstr));
+ sys_getpid(), dce_errstr));
}
}
#endif
@@ -595,7 +595,7 @@ static BOOL krb4_auth(char *user, char *password)
}
(void)slprintf(tkfile, sizeof(tkfile) - 1, "/tmp/samba_tkt_%d",
- (int)getpid());
+ (int)sys_getpid());
krb_set_tkt_string(tkfile);
if (krb_verify_user(user, "", realm, password, 0, "rmcd") == KSUCCESS)
diff --git a/source3/passdb/smbpass.c b/source3/passdb/smbpass.c
index 7aad048339..bfb3946b1a 100644
--- a/source3/passdb/smbpass.c
+++ b/source3/passdb/smbpass.c
@@ -1106,7 +1106,7 @@ static BOOL del_smbfilepwd_entry(const char *name)
FILE *fp_write = NULL;
int pfile2_lockdepth = 0;
- slprintf(pfile2, sizeof(pfile2)-1, "%s.%u", pfile, (unsigned)getpid() );
+ slprintf(pfile2, sizeof(pfile2)-1, "%s.%u", pfile, (unsigned)sys_getpid() );
/*
* Open the smbpassword file - for update. It needs to be update