From: Maneesh Soni <maneesh@in.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: [patch 0/3] sysfs permissions
Date: Tue, 31 May 2005 05:18:42 +0000 [thread overview]
Message-ID: <20050531050641.GA3631@in.ibm.com> (raw)
Hi
Following this post, are the three patches implementing setattr functionality
for sysfs objects. This allows sysfs objects to get their default attributes
like owner, group, permission modes modified. The changed attributes are
saved in a struct iattr linked with struct sysfs_dirent for the corresponding
object. This keeps the inode attributes saved even if inode/dentry is
evacuated due to memory pressure or umount. The struct iattr is allocated only
for those sysfs objects for which inode attributes are getting changed.
I did the following test for verifying the patchset
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-r--r--r-- 1 root root 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]# chmod +w /sys/class/net/dummy0/address
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r-- 1 root root 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]#
[root@llm01 ~]# chown maneesh /sys/class/net/dummy0/address
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r-- 1 maneesh root 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]#
[root@llm01 ~]# chgrp maneesh /sys/class/net/dummy0/address
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r-- 1 maneesh maneesh 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]#
[root@llm01 ~]# umount /sys
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
ls: /sys/class/net/dummy0/address: No such file or directory
[root@llm01 ~]#
[root@llm01 ~]# mount -t sysfs none /sys
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r-- 1 maneesh maneesh 4096 May 31 10:32 /sys/class/net/dummy0/address
Please review/test.
Thanks
Maneesh
--
Maneesh Soni
Linux Technology Center,
IBM India Software Labs,
Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-25044990
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next reply other threads:[~2005-05-31 5:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-31 5:18 Maneesh Soni [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-06-01 20:59 [patch 0/3] sysfs permissions Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050531050641.GA3631@in.ibm.com \
--to=maneesh@in.ibm.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).