svn commit: samba r22318 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_25/source/lib

James Peach jpeach at samba.org
Tue Apr 17 17:21:02 GMT 2007


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?

--
James Peach | jpeach at samba.org



More information about the samba-technical mailing list