Skip to contentSkip to conversation

user based capabilities 0.1

PATCH New Olaf Dietsche 1 participant 1 message Jan 11, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 user based capabilities 0.1

This patch implements user based capabilities.

With this module, you will be able to grant capabilities based on user-/groupid (root by default). This patch uses sysfs/kobject for the user interface.

For example you can create a group raw and change the capability net_raw to this group:

# chgrp raw /sys/usercaps/net_raw
# chmod ug+x /sys/usercaps/net_raw
# chgrp raw /sbin/ping
# chmod u-s /sbin/ping; chmod g+s /sbin/ping

or you can give a group of users some capability:

# chgrp wheel /sys/usercaps/sys_admin
# chmod ug+x /sys/usercaps/sys_admin

Known bugs:
- show()/store() not implemented
- only minimally tested against 2.6.9

Regards, Olaf.

usercaps/Makefile +7 -0
diff -urN a/usercaps/Makefile b/usercaps/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for user based capabilities
+# usage: make -C /usr/src/linux M=$PWD
+#
+
+obj-m += usercaps.o
+usercaps-objs := capabilities.o
usercaps/capabilities.c +120 -0

120 lines not on this page · raw message