Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jan 2012 14:58:34 +0100
From:      "Ronald Klop" <ronald-freebsd8@klop.yi.org>
To:        svn-src-all@freebsd.org, "Pawel Jakub Dawidek" <pjd@freebsd.org>
Subject:   Re: svn commit: r229466 - head/usr.sbin/mptable
Message-ID:  <op.v7pvrwk38527sy@pinky>
In-Reply-To: <201201040704.q0474iIe065299@svn.freebsd.org>
References:  <201201040704.q0474iIe065299@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I don't know much about this code, but is chmod 0666 really wat is wanted  
here (and in the commits following this one)? It makes the file world  
writable. And that smells funny. :-)

Ronald.

On Wed, 04 Jan 2012 08:04:44 +0100, Pawel Jakub Dawidek <pjd@freebsd.org>  
wrote:

> Author: pjd
> Date: Wed Jan  4 07:04:43 2012
> New Revision: 229466
> URL: http://svn.freebsd.org/changeset/base/229466
>
> Log:
>   Add an missing argument to open(2). If O_CREAT flag is specified,
>   file permission has to be specified as well.
>
> Modified:
>   head/usr.sbin/mptable/mptable.c
>
> Modified: head/usr.sbin/mptable/mptable.c
> ==============================================================================
> --- head/usr.sbin/mptable/mptable.c	Wed Jan  4 07:01:23 2012	(r229465)
> +++ head/usr.sbin/mptable/mptable.c	Wed Jan  4 07:04:43 2012	(r229466)
> @@ -828,7 +828,7 @@ MPConfigTableHeader( u_int32_t pap )
>      int		ofd;
>      u_char	dumpbuf[ 4096 ];
> -    ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR );
> +    ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR, 0666 );
>      seekEntry( paddr );
>      readEntry( dumpbuf, 1024 );
>      write( ofd, dumpbuf, 1024 );
> _______________________________________________
> svn-src-all@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.v7pvrwk38527sy>