pset_create() and setppriv() in Solaris 10


 
Thread Tools Search this Thread
Top Forums Programming pset_create() and setppriv() in Solaris 10
# 1  
Old 02-09-2011
Question pset_create() and setppriv() in Solaris 10

Hello,

I'm trying to create a pset with pset_create() and I get errno=1. In the man of pset_create() is written that this happens when the {PRIV_SYS_RES_CONFIG} privilege is not asserted in the effectvie set of the calling process.
Is the problem indeed in the privilege?
Now I'm trying to add this privilege to the priv set of my process, but I don't succeed.
setppriv(PRIV_ON, PRIV_SYS_RES_CONFIG, NULL) - won't work. It returns errno 22 (op or which out of bounds). When I create a temporary set: priv_set_t *set and pass it to the syscall instead of NULL, it also fails.

Please help me with this.
Thanks!
# 2  
Old 02-09-2011
I wouldn't expect a process to be able to give itself privileges unless it's privileged in the first place.
# 3  
Old 02-09-2011
You need to run usermod or smrole to grant the user priv, before you try to run the code.
Alternatively, you can invoke the code as setuid, giving the process the 0 uid, which by default grants all privs while the image is running.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Solaris

Patching Procedure in Solaris 10 with sun cluster having Solaris zone

Hi Gurus I am not able to find the patching procedure for solaris 10 ( sol10 u11) to latest patchset with sun cluster having failover zones so that same I should follow. Take an instance, there are sol1 and sol2 nodes and having two failover zones like sozone1-rg and sozone2-rg and currently... (1 Reply)
Discussion started by: nick101
1 Replies

2. Solaris

dual boot solaris/solaris zfs file system

Hi, I am running into a some problems creating a dual boot system of 2 solaris instances using ZFS file system and I was wondering if someone can help me out. First some back ground. I have been asked to change the file system of our server from UFS to ZFS. Currently we are using Solaris... (3 Replies)
Discussion started by: estammis
3 Replies

3. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

4. Solaris

application compiled on solaris 10 throwing error when executed on solaris 9

I have compiled my application on Solaris 10 with following description SunOS ldg1 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Blade-T6320 The compiler is Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 But when installing the application on Solaris 9 SunOS odcarch02 5.9... (2 Replies)
Discussion started by: ash_bit2k2
2 Replies
Login or Register to Ask a Question