tail head cat sleep
QR code linking to this page

manページ  — SETRUID

名称

setruid, setrgid – ユーザとグループ ID を設定する

内容

ライブラリ

Standard C Library (libc, -lc)

書式

#include <unistd.h>

int
setruid(uid_t ruid);

int
setrgid(gid_t rgid);

解説

setruid() 関数 (setrgid()) は、現在のプロセスの実際のユーザ ID (グループ ID) を 設定します。

戻り値

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

エラー

関数は次の場合に失敗します:
[EPERM]
  ユーザがスーパユーザでなく、 指定された ID が実 ID でも実効 ID でもありませんでした。

互換性

これらの呼び出しの使用は移植可能ではありません。 これらを使用するのはお勧めできません。将来除去される予定だからです。

関連項目

getgid(2), getuid(2), setegid(2), seteuid(2), setgid(2), setuid(2)

歴史

setruid() と setrgid() システムコールは BSD 4.2 で現れ、 BSD 4.4 で落とされました。

SETRUID (3) June 2, 1993

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

“ What will happen when the 32-bit Unix date goes negative in mid-January 2038 does not bear thinking about. ”
— Henry Spencer