mirror of
https://github.com/samba-team/samba.git
synced 2025-12-12 12:23:50 +03:00
converted all our existing shared memory code to use a tdb database
instead of either sysv or mmap shared memory or lock files. this means we can now completely remove locking_shm.c locking_slow.c shmem.c shmem_sysv.c and lots of other things also got simpler locking.c got a bit larger, but is much better compartmentalised now
This commit is contained in:
@@ -3213,3 +3213,24 @@ char *myhostname(void)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
a useful function for returning a path in the Samba lock directory
|
||||
*****************************************************************/
|
||||
char *lock_path(char *name)
|
||||
{
|
||||
static pstring fname;
|
||||
|
||||
pstrcpy(fname,lp_lockdir());
|
||||
trim_string(fname,"","/");
|
||||
|
||||
if (!directory_exist(fname,NULL)) {
|
||||
mkdir(fname,0755);
|
||||
}
|
||||
|
||||
pstrcat(fname,"/");
|
||||
pstrcat(fname,name);
|
||||
|
||||
return fname;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user