1
0
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:
Andrew Tridgell
-
parent 4951755413
commit e48c2d9937
19 changed files with 427 additions and 3804 deletions

View File

@@ -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;
}