lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130219123502.GD26623@pd.tnic>
Date:	Tue, 19 Feb 2013 13:35:02 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Mauro Carvalho Chehab <mchehab@...hat.com>
Cc:	balbi@...com, Greg KH <gregkh@...uxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, JBottomley@...allels.com,
	linux-scsi@...r.kernel.org, davem@...emloft.net,
	netdev@...r.kernel.org, Doug Thompson <dougthompson@...ssion.com>,
	linux-edac@...r.kernel.org, rjw@...k.pl, linux-pm@...r.kernel.org
Subject: Re: SYSFS "errors"

On Tue, Feb 19, 2013 at 09:16:10AM -0300, Mauro Carvalho Chehab wrote:
> I'm not sure if is there a way to pass fs permissions to something similar
> to device_create_file().

struct device_attribute.attr.mode? I.e., second arg.

> On both cases, an error will happen at open:
> 	- if file doesn't exist (this approach), it will return -ENOENT;
> 	- if file is opened with wrong permissions, open will return -EPERM.
> 
> However, if the file is not created, readdir() won't show the file.

Right, and in that case userspace which *assumes* it is always created -
like it is now - will fail when accessing it.

If simply you adjust the attributes accordingly but *always* create the
file and it has the correct permissions, everyone is happy. Right?

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ