bob@hobbes.dtcc.edu wrote:> > this samba was built on a solaris 2.5 system and was running fine on a > solaris 7 3/99 system. when i installed the solaris 7 5/99 maintenance > update something broke. > > log.smb: > > [1999/08/06 11:04:41, 1] smbd/server.c:main(628) > smbd version 2.0.5a started. > Copyright Andrew Tridgell 1992-1998 > [1999/08/06 11:36:49, 0] locking/shmem_sysv.c:sysv_shm_open(597) > ERROR: root did not create the semaphore > [1999/08/06 11:36:49, 0] locking/locking.c:locking_init(174) > ERROR: Failed to initialise share modesTry this fix (it causes Samba to do a lookup on root and check the correct gid_t rather than just assuming 0). Regards, Jeremy Allison, Samba Team. --- /usr/people/jallison/src/samba-2/samba/source/locking/shmem_sysv.c Wed Jul 14 09:40:38 1999 +++ locking/shmem_sysv.c Thu Jul 29 10:41:15 1999 @@ -528,6 +528,7 @@ /******************************************************************* open the shared memory ******************************************************************/ + struct shmem_ops *sysv_shm_open(int ronly) { BOOL other_processes; @@ -536,6 +537,8 @@ union semun su; int i; pid_t pid; + struct passwd *root_pwd = sys_getpwuid((uid_t)0); + gid_t root_gid = root_pwd ? root_pwd->pw_gid : (gid_t)0; read_only = ronly; @@ -593,7 +596,7 @@ hash_size = sem_ds.sem_nsems-1; if (!read_only) { - if (sem_ds.sem_perm.cuid != 0 || sem_ds.sem_perm.cgid != 0) { + if (sem_ds.sem_perm.cuid != 0 || sem_ds.sem_perm.cgid !root_gid) { DEBUG(0,("ERROR: root did not create the semaphore\n")); return NULL; } @@ -684,7 +687,7 @@ } if (!read_only) { - if (shm_ds.shm_perm.cuid != 0 || shm_ds.shm_perm.cgid != 0) { + if (shm_ds.shm_perm.cuid != 0 || shm_ds.shm_perm.cgid !root_gid) { DEBUG(0,("ERROR: root did not create the shmem\n")); global_unlock(); return NULL; -- -------------------------------------------------------- Buying an operating system without source is like buying a self-assembly Space Shuttle with no instructions. --------------------------------------------------------
Juan Carlos Castro y Castro
1999-Aug-06 20:42 UTC
Solaris 7 5/99 and samba-2.0.5a (PR#19508)
Jeremy Allison wrote:> bob@hobbes.dtcc.edu wrote: > > > > this samba was built on a solaris 2.5 system and was running fine on a > > solaris 7 3/99 system. when i installed the solaris 7 5/99 maintenance > > update something broke. > > Try this fix (it causes Samba to do a lookup on root > and check the correct gid_t rather than just assuming 0).I'm rather amused by this. I thought the presence of a gid 0 which root is a member of could always be assumed, no matter what the Unix flavor is. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcastro.vcf Type: text/x-vcard Size: 473 bytes Desc: Card for Juan Carlos Castro y Castro Url : http://lists.samba.org/archive/samba/attachments/19990806/62c9ccb7/jcastro.vcf
thanks, this patch fixes the problem. after applying the patch i rebuilt samba-2.0.5a on solaris 2.5 and it runs fine now on solaris 7. On Sat, 7 Aug 1999, Jeremy Allison wrote:> bob@hobbes.dtcc.edu wrote: > > > > this samba was built on a solaris 2.5 system and was running fine on a > > solaris 7 3/99 system. when i installed the solaris 7 5/99 maintenance > > update something broke. > > > > log.smb: > > > > [1999/08/06 11:04:41, 1] smbd/server.c:main(628) > > smbd version 2.0.5a started. > > Copyright Andrew Tridgell 1992-1998 > > [1999/08/06 11:36:49, 0] locking/shmem_sysv.c:sysv_shm_open(597) > > ERROR: root did not create the semaphore > > [1999/08/06 11:36:49, 0] locking/locking.c:locking_init(174) > > ERROR: Failed to initialise share modes > > Try this fix (it causes Samba to do a lookup on root > and check the correct gid_t rather than just assuming 0). > > Regards, > > Jeremy Allison, > Samba Team. > > --- /usr/people/jallison/src/samba-2/samba/source/locking/shmem_sysv.c Wed Jul > 14 09:40:38 1999 > +++ locking/shmem_sysv.c Thu Jul 29 10:41:15 1999 > @@ -528,6 +528,7 @@ > /******************************************************************* > open the shared memory > ******************************************************************/ > + > struct shmem_ops *sysv_shm_open(int ronly) > { > BOOL other_processes; > @@ -536,6 +537,8 @@ > union semun su; > int i; > pid_t pid; > + struct passwd *root_pwd = sys_getpwuid((uid_t)0); > + gid_t root_gid = root_pwd ? root_pwd->pw_gid : (gid_t)0; > > read_only = ronly; > > @@ -593,7 +596,7 @@ > hash_size = sem_ds.sem_nsems-1; > > if (!read_only) { > - if (sem_ds.sem_perm.cuid != 0 || sem_ds.sem_perm.cgid != 0) { > + if (sem_ds.sem_perm.cuid != 0 || sem_ds.sem_perm.cgid !> root_gid) { > DEBUG(0,("ERROR: root did not create the semaphore\n")); > return NULL; > } > @@ -684,7 +687,7 @@ > } > > if (!read_only) { > - if (shm_ds.shm_perm.cuid != 0 || shm_ds.shm_perm.cgid != 0) { > + if (shm_ds.shm_perm.cuid != 0 || shm_ds.shm_perm.cgid !> root_gid) { > DEBUG(0,("ERROR: root did not create the shmem\n")); > global_unlock(); > return NULL; > > -- > -------------------------------------------------------- > Buying an operating system without source is like buying > a self-assembly Space Shuttle with no instructions. > -------------------------------------------------------- >-- Todd Pfaff \ Email: pfaff@mcmaster.ca Computing and Information Services \ Voice: (905) 525-9140 x22920 ABB 132 \ FAX: (905) 528-3773 McMaster University \ Hamilton, Ontario, Canada L8S 4M1 \