Phillip.Link@alcatel.fr wrote:> The problem > ----------- > I've been trying to install the latest samba distrib (2.0.5a) on a hpux > 10.20 machine, but the connection times out, apparently because of > shared memory access. > > Trying to make an smbclient connection (or using the windows nt explorer > to connect generates the following log.smb (smbd launched as smbd -D -d > 4): > > [1999/08/11 10:14:28, 4] locking/shmem_sysv.c:(544) > Trying sysv shmem open of size 1048576 > [1999/08/11 10:14:28, 0] locking/shmem_sysv.c:(597) > ERROR: root did not create the semaphore > [1999/08/11 10:14:28, 0] locking/locking.c:(169) > ERROR: Failed to initialise share modes!Phillip, Can you please try this patch to see if it addresses the problem ? Regards, Jeremy Allison, Samba Team. --- shmem_sysv.c Tue Aug 10 16:10:18 1999 +++ shmem_sysv.c.fixed Tue Aug 10 16:08:16 1999 @@ -536,6 +536,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,8 +595,8 @@ hash_size = sem_ds.sem_nsems-1; if (!read_only) { - if (sem_ds.sem_perm.cuid != 0 || sem_ds.sem_perm.cgid != 0) { - DEBUG(0,("ERROR: root did not create the semaphore\n")); + if (sem_ds.sem_perm.cuid != 0 || ((sem_ds.sem_perm.cgid != root_gid) && (sem_ds.sem_perm.cgid != 0))) { + DEBUG(0,("ERROR: root did not create the semaphore: semgid=%d, rootgid=%d\n", sem_ds.sem_perm.cgid, root_gid)); return NULL; } @@ -684,7 +686,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) && (shm_ds.shm_perm.cgid != 0))) { 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. --------------------------------------------------------
Windsor Dave (UO-An/ETR)
1999-Aug-16 14:35 UTC
HPUX shared memory creates error (PR#19573)
In SAMBA Digest 2200, I saw the following: >Date: Fri, 13 Aug 1999 17:45:45 -0700 >From: Jeremy Allison <jallison@cthulhu.engr.sgi.com> >To: Phillip.Link@alcatel.fr >Subject: Re: HPUX shared memory creates error (PR#19573) >Phillip.Link@alcatel.fr wrote: >> The problem >> ----------- >> I've been trying to install the latest samba distrib (2.0.5a) on a hpux >> 10.20 machine, but the connection times out, apparently because of >> shared memory access. >> >> Trying to make an smbclient connection (or using the windows nt explorer >> to connect generates the following log.smb (smbd launched as smbd -D -d >> 4): >> >> [1999/08/11 10:14:28, 4] locking/shmem_sysv.c:(544) >> Trying sysv shmem open of size 1048576 >> [1999/08/11 10:14:28, 0] locking/shmem_sysv.c:(597) >> ERROR: root did not create the semaphore >> [1999/08/11 10:14:28, 0] locking/locking.c:(169) >> ERROR: Failed to initialise share modes! >Phillip, > Can you please try this patch to see if it addresses >the problem ? >Regards, > Jeremy Allison, > Samba Team. >--- shmem_sysv.c Tue Aug 10 16:10:18 1999 >+++ shmem_sysv.c.fixed Tue Aug 10 16:08:16 1999 > <...........patch snipped...............> > -- I also had the same same problem with Samba 2.0.5a on an HP K360 running HP-UX 10.20. After I saw this message, I applied the same patch and it seemed to solve the problem. Thanks!> Dave Windsor > UO-An/ETR2 > _ > > Robert Bosch Corporation, UO-An/ETR2, Highway 81 at I-85, Anderson, SC > 29621 > Tel: 864-260-8459, Fax: 864-260-8422, mailto:Dave.Windsor@pcm.bosch.com > >