svn commit: samba r22318 - in branches: SAMBA_3_0/source/lib
SAMBA_3_0_25/source/lib
Lars Müller
lars at samba.org
Tue Apr 17 18:36:15 GMT 2007
On Tue, Apr 17, 2007 at 10:21:02AM -0700, James Peach wrote:
> On 17/04/2007, at 10:17 AM, lmuelle at samba.org wrote:
>
> >Author: lmuelle
> >Date: 2007-04-17 17:17:19 +0000 (Tue, 17 Apr 2007)
> >New Revision: 22318
> >
> >WebSVN:
> >http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22318
> >
> >Log:
> >If we're running as non root we might not be able to dump the core
> >file
> >to the corepath.
> >
> >Even the chdir() will fail if the LOGFILEBASE path is set 0700.
> >
> >If the currrent user doesn't have the permission to create the core
> >file
> >we end with:
> > unable to change to <LOGFILEBASE>
> > refusing to dump core
> >
> >The alternative would be to change the permissions of the directory.
> >But taht would not ensure core dumps are working out of the box.
> >
> >Modified:
> > branches/SAMBA_3_0/source/lib/fault.c
> > branches/SAMBA_3_0_25/source/lib/fault.c
> >
> >
> >Changeset:
> >Modified: branches/SAMBA_3_0/source/lib/fault.c
> >===================================================================
> >--- branches/SAMBA_3_0/source/lib/fault.c 2007-04-17 17:07:14 UTC
> >(rev 22317)
> >+++ branches/SAMBA_3_0/source/lib/fault.c 2007-04-17 17:17:19 UTC
> >(rev 22318)
> >@@ -161,6 +161,13 @@
> > }
> >
> >#if DUMP_CORE
> >+ /* If we're running as non root we might not be able to dump the
> >core
> >+ * file to the corepath. There must not be an unbecome_root()
> >before
> >+ * we call abort(). */
> >+ if (getuid() != 0) {
>
> Do you need to check geteuid() here?
Yes. Theoretically we might run into a situation where the uid is 0
while the effective uid is !=0. If LOGFILEBASE/cores/ is then owned by
root we have the same problem as before.
Addressed by revision 22320.
Thanks for the hint and discussion on IRC!
Lars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070417/ba3aab7a/attachment.bin
More information about the samba-technical
mailing list