01-20-2009
Sorry, It's possible to explain me real, user, sys? my system has not any doc about it.
Thanks
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi, Guys ...
I want to know how to use to 2 processes (A & B) communicating with each others through 2 pipes (Pipe1 & Pinpe2) :
such that process A write to Pipe1 and Process B read from Pipe1
and process B write to Pipe2 and Process A read from Pipe2 .
Does anyone have an idea about... (1 Reply)
Discussion started by: someone33
1 Replies
2. UNIX for Advanced & Expert Users
can anybody tel lme,how to instal NTS -150 on a unix network,it needs some patch to fetch time frm serve,,?? (2 Replies)
Discussion started by: pesty
2 Replies
3. Solaris
I run cron in solaris 10 zone. One cron job which syncing files to nfs mounted on container, creates after finishing another cron proccess(/usr/sbin/cron), and after 100 existing cron proccesses next cron job will not start. It's too weird for me, I'm not able to solve this problem. Theoretically... (3 Replies)
Discussion started by: ron76
3 Replies
4. Shell Programming and Scripting
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies
5. Shell Programming and Scripting
Hi All,
I have a requirment, i need to get the list of all the process which are running from last two days on my unix server and also to put this list into an another file.
i am giving you a sample example :
$ ps -ef
UID PID PPID C STIME TTY TIME CMD (1 Reply)
Discussion started by: akshu.agni
1 Replies
6. Shell Programming and Scripting
Hi, i was looking for an answer for some trouble im having runing a script in the cron, thing is, that when i run it manually it works just fine. But when cron runs it, it just doenst work. I saw a reply on a similar subject, suggesting that the . .profile worked for you, but im kind of... (0 Replies)
Discussion started by: blacksteel1988
0 Replies
7. Solaris
I have a cluster of two Solaris server (veritas cluster). one working and the other is standby
I am going to change the date on them , and am looking for a secure solution as it is giving an important service.
my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies
8. Shell Programming and Scripting
Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone.
For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
9. Shell Programming and Scripting
Hi All,
I have one file which contains time for request and response.
I want to calculate time difference in milliseconds for each line.
This file can contain 10K lines.
Sample file with 4 lines.
for first line.
Request Time: 15:23:45,255
Response Time: 15:23:45,258
Time diff... (6 Replies)
Discussion started by: Raza Ali
6 Replies
LEARN ABOUT LINUX
setregid
SETREUID(2) Linux Programmer's Manual SETREUID(2)
NAME
setreuid, setregid - set real and/or effective user or group ID
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
int setreuid(uid_t ruid, uid_t euid);
int setregid(gid_t rgid, gid_t egid);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
setreuid(), setregid():
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
DESCRIPTION
setreuid() sets real and effective user IDs of the calling process.
Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged.
Unprivileged processes may only set the effective user ID to the real user ID, the effective user ID, or the saved set-user-ID.
Unprivileged users may only set the real user ID to the real user ID or the effective user ID.
If the real user ID is set or the effective user ID is set to a value not equal to the previous real user ID, the saved set-user-ID will be
set to the new effective user ID.
Completely analogously, setregid() sets real and effective group ID's of the calling process, and all of the above holds with "group"
instead of "user".
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EPERM The calling process is not privileged (Linux: does not have the CAP_SETUID capability in the case of setreuid(), or the CAP_SETGID
capability in the case of setregid()) and a change other than (i) swapping the effective user (group) ID with the real user (group)
ID, or (ii) setting one to the value of the other or (iii) setting the effective user (group) ID to the value of the saved set-user-
ID (saved set-group-ID) was specified.
CONFORMING TO
POSIX.1-2001, 4.3BSD (the setreuid() and setregid() function calls first appeared in 4.2BSD).
NOTES
Setting the effective user (group) ID to the saved set-user-ID (saved set-group-ID) is possible since Linux 1.1.37 (1.1.38).
POSIX.1 does not specify all of possible ID changes that are permitted on Linux for an unprivileged process. For setreuid(), the effective
user ID can be made the same as the real user ID or the save set-user-ID, and it is unspecified whether unprivileged processes may set the
real user ID to the real user ID, the effective user ID, or the saved set-user-ID. For setregid(), the real group ID can be changed to the
value of the saved set-group-ID, and the effective group ID can be changed to the value of the real group ID or the saved set-group-ID.
The precise details of what ID changes are permitted vary across implementations.
POSIX.1 makes no specification about the effect of these calls on the saved set-user-ID and saved set-group-ID.
SEE ALSO
getgid(2), getuid(2), seteuid(2), setgid(2), setresuid(2), setuid(2), capabilities(7)
COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2010-09-20 SETREUID(2)