diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-10-04 09:31:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-10-04 09:31:07 +0000 |
commit | 5aa735c940ccdb6acae5f28449d484181c912e49 (patch) | |
tree | 9f8713157bb6201a3079b018efed36e9bbfbeb6c /source/locking/shmem.c | |
parent | 53a4b8769e25c65fa6ab0f532e30630adf6f2056 (diff) | |
download | samba-5aa735c940ccdb6acae5f28449d484181c912e49.tar.gz samba-5aa735c940ccdb6acae5f28449d484181c912e49.tar.xz samba-5aa735c940ccdb6acae5f28449d484181c912e49.zip |
- changed the umask handling. We now set the umask to 0 and explicitly
set the mode on all created files. I think this is a better policy.
- change the debug levels on some items
- fix a charset handling bug which affected foreign and extended
charset users
- no longer switch back to the original directory when idle, instead
switch to / as the original directory may not be readable by ordinary
users.
- fix some bugs where the create mode of files was not being
explicitly set (it was relying on the umask and using fopen). Not a
big bug as it only affected obscure commands like the messaging ops.
- got rid of the lock code in the lpq cache as its no longer needed
- rewrote smbrun to be faster and to remove the security hole. We now
don't actually need a external smbrun binary, its all done by smbd.
- add a more explicit warning about uids and gids of -1 or 65535
Diffstat (limited to 'source/locking/shmem.c')
-rw-r--r-- | source/locking/shmem.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/locking/shmem.c b/source/locking/shmem.c index f68059afa2c..e17cf1aa8d0 100644 --- a/source/locking/shmem.c +++ b/source/locking/shmem.c @@ -75,17 +75,13 @@ static int shm_times_locked = 0; static BOOL shm_register_process(char *processreg_file, pid_t pid, BOOL *other_processes) { - int old_umask; int shm_processes_fd = -1; int nb_read; pid_t other_pid; int free_slot = -1; - int erased_slot; - + int erased_slot; - old_umask = umask(0); shm_processes_fd = open(processreg_file, O_RDWR | O_CREAT, 0666); - umask(old_umask); if ( shm_processes_fd < 0 ) { DEBUG(0,("ERROR shm_register_process : processreg_file open failed with code %d\n",errno)); |