* [sisyphus] [procps] wrong process UID
@ 2002-11-19 12:21 Igor Homyakov
0 siblings, 0 replies; only message in thread
From: Igor Homyakov @ 2002-11-19 12:21 UTC (permalink / raw)
To: ALT Linux Sisyphus; +Cc: ldv
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
Утилита ps не правильно отображает UID процесса, точнее она показвает его
EUID вместо UID. Приложен простенький тест, процесс запускаеться
и меняет свой эфеективный ID после чего выводит значения UID и EUID.
Как видно ps показывает одинаковые значения.
$ sudo ./a.out
running: pid 28854, uid 0, euid 113
$ ps -axo pid,uid,euid | grep 28854
28854 113 113
--
Igor Homyakov
<homyakov at altlinux dot ru>
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=190141
[-- Attachment #2: euid_test.c --]
[-- Type: text/plain, Size: 562 bytes --]
/* -*- C -*-
*
* $Id$
*
* Author: Igor Homyakov <homyakov@ramax.spb.ru>
*
* Created: Tue Nov 19 15:02:05 2002
*
* Comments: stupid test
*
*/
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <errno.h>
int
main (int argc, char* argv[])
{
uid_t euid = 113;
unsigned int timeout = 30;
if ( seteuid( euid ) == -1 ) {
perror("seteuid err:");
exit(1);
} else {
(void)printf( "running: pid %d, uid %d, euid %d\n", getpid(), getuid(), geteuid());
(void)sleep( timeout );
}
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-11-19 12:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-19 12:21 [sisyphus] [procps] wrong process UID Igor Homyakov
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git