Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



hi,

> Module Name:  src
> Committed By: elad
> Date:         Mon Apr 20 18:06:27 UTC 2009
> 
> Modified Files:
>       src/sys/fs/ptyfs: ptyfs_vnops.c
>       src/sys/fs/tmpfs: tmpfs_subr.c
>       src/sys/fs/udf: udf_vnops.c
>       src/sys/kern: vfs_subr.c
>       src/sys/sys: vnode.h
>       src/sys/ufs/ext2fs: ext2fs_vnops.c
>       src/sys/ufs/ufs: ufs_vnops.c
> 
> Log Message:
> Refactor some duplicated file-system code.
> 
> Proposed and received no objections on tech-kern@:
> 
>       http://mail-index.netbsd.org/tech-kern/2009/04/18/msg004843.html

2 days is too short to say "no objections", i guess...

anyway, i don't like the "check KAUTH_GENERIC_ISSUSER first" style
because it makes logging useless.  ie. i prefer:

        foo()
        {
                :
                :
                :
        out:
                /*
                 * use the power of the super user as a last resort.
                 */
                if (error != 0) {
                        int error2 = kauth_authorize_generic(ISSUSER);

                        if (error2 == 0) {
                                error = 0;
                        }
                }
                return error;
        }

how do you think?

YAMAMOTO Takashi

> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.27 -r1.28 src/sys/fs/ptyfs/ptyfs_vnops.c
> cvs rdiff -u -r1.50 -r1.51 src/sys/fs/tmpfs/tmpfs_subr.c
> cvs rdiff -u -r1.38 -r1.39 src/sys/fs/udf/udf_vnops.c
> cvs rdiff -u -r1.371 -r1.372 src/sys/kern/vfs_subr.c
> cvs rdiff -u -r1.203 -r1.204 src/sys/sys/vnode.h
> cvs rdiff -u -r1.83 -r1.84 src/sys/ufs/ext2fs/ext2fs_vnops.c
> cvs rdiff -u -r1.173 -r1.174 src/sys/ufs/ufs/ufs_vnops.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.


Home | Main Index | Thread Index | Old Index