policy for new user?
hi,
1>i added a new user with sysadm_r role.however this user was not able to run the program "adduser" .. eventhough this user has sysadm role. 2>how do you create a file with system_u identity?
thanks
samarth
__________________________________________________________
Give your Company an email address like
ravi @ ravi-exports.com. Sign up for Rediffmail Pro today! Know more. http://www.rediffmailpro.com/signup/
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 5 lines · Samarth Sharma
hi,
1>i added a new user with
sysadm_rrole.however this user was not able to run the program "adduser" .. eventhough this user has sysadm role.
'adduser' still needs to run as the root user because normal permissions
are still enforced by the kernel.
Quoted 1 line
2>how do you create a file with
system_uidentity?
There are several ways to change the context on a file.
1) Use the 'chsid' program.
2) A rule in the policy may cause a file label to be set based on the context of the process and context of the parent. For example:
file_type_auto_trans(sshd_t, var_run_t, sshd_var_run_t)
3) Relabel using the 'setfiles' program. Running 'make relabel' in the policy directory will do this.
4) A process can create files with labels by using the open_secure() function, or relabel files using the chsid() function, within the constraints of the policy. Refer to the selinux/libsecure/include/fs_secure.h header file for the definitions of these functions, and selinux/libsecure/man/man2 for the man pages containing additional information on the extended system calls.
--
Wayne Salamon
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Wayne Salamon
Quoted 3 lines
1>i added a new user with
sysadm_rrole.however this user was not able to run the program "adduser" .. eventhough this user has sysadm role.
Quoted 8 lines
'adduser' still needs to run as the root user because normal permissions
are still enforced by the kernel.Quoted 1 line
2>how do you create a file with
system_uidentity?There are several ways to change the context on a file.
1) Use the 'chsid' program.
Or "chcon". I think that in a "default" install (apart from a Debian install) you'll have "chcon" but not "chsid".
Also note that chsid can't change the type of a link, you need "chcon -h". I'm thinking of using the "alternatives" mechanism in Debian cause chcon to be used if present instead of chsid because of this. Or I may just improve chsid. I really stuffed one machine by using chsid in a chroot in permissive mode (which followed absolute symlinks)...
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.