Re: [PATCH dhowells/mount-api] fs: fix checking an error code of security_fs_context_parse_param

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

 



Andrei Vagin <avagin@xxxxxxxxxx> wrote:

> security_fs_context_parse_param() returns 0 if everything is okay.

Not quite.  It returns 0 to indicate that it processed the argument and that
the argument doesn't belong to the filesystem.  It returns -ENOPARAM to
indicate that the argument should be passed along to the filesystem.  Any
other error is an actual error.

>  	ret = security_fs_context_parse_param(fc, param);
> -	if (ret != -ENOPARAM)
> +	if (ret)

So this change is wrong.

The change that needs making is to the documentation - in particular
lsm_hooks.h.

David



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux