summaryrefslogtreecommitdiff
path: root/source/smbd/open.c
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
commit148628b616b5c29ba6340d65fc3ddbcabba6e67a (patch)
treef8482fb2dcfa68baeb38a38e2c73ee105abb00a2 /source/smbd/open.c
parent3b25f7368be3877e9ad27498bc9451ec88d4b07f (diff)
downloadsamba-148628b616b5c29ba6340d65fc3ddbcabba6e67a.tar.gz
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.
Diffstat (limited to 'source/smbd/open.c')
-rw-r--r--source/smbd/open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 9aadb39bc97..0c6927ba2a7 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -342,7 +342,7 @@ static int check_share_mode( share_mode_entry *share, int deny_mode,
{
int access_allowed = access_table(deny_mode,old_deny_mode,old_open_mode,
- (share->pid == getpid()),is_executable(fname));
+ (share->pid == sys_getpid()),is_executable(fname));
if ((access_allowed == AFAIL) ||
(!fcbopen && (access_allowed == AREAD && *flags == O_RDWR)) ||
@@ -946,7 +946,7 @@ BOOL check_file_sharing(connection_struct *conn,char *fname, BOOL rename_op)
share_mode_entry *old_shares = 0;
int num_share_modes;
SMB_STRUCT_STAT sbuf;
- pid_t pid = getpid();
+ pid_t pid = sys_getpid();
SMB_DEV_T dev;
SMB_INO_T inode;