SETREUID

Section: Linux Programmer's Manual (2)
Updated: 2nd August 1994
Index
Return to Main Contents
 

À̸§

setreuid, seteuid - ½ÇÁ¦ ȤÀº À¯È¿ »ç¿ëÀÚ ID¸¦ ¼³Á¤ÇÑ´Ù.  

»ç¿ë¹ý

#include <unistd.h>

int setreuid(uid_t ruid, uid_t euid);
int seteuid(uid_t euid);  

¼³¸í

setreuid ´Â ÇöÁ¦ ÇÁ·Î¼¼½ºÀÇ ½ÇÁ¦/À¯È¿ÇÑ »ç¿ëÀÚ ID¸¦ ¼³Á¤ÇÑ´Ù. Ư±ÇÀÌ ¾ø´Â »ç¿ëÀÚ´Â À¯È¿»ç¿ëÀÚ ID ¶§¹®¿¡ ½ÇÁ¦ »ç¿ëÀÚ ID°¡ ¹Ù²ð·±Áö ¸ð¸¥´Ù. ¸®´ª½º 1.1.38ÀÌÀü¿¡¼­, ÀúÀåµÈ IDÆз¯´ÙÀÓÀÌ setreuid ³ª seteuid À» »ç¿ëÇÒ¶§´Â µ¿ÀÛÇÏÁö ¾Ê¾Ò´Ù. 1.1.38Ãʱ⿡´Â ÀúÀåµÈ »ç¿ëÀÚID¿¡¼­ À¯È¿ÇÑ »ç¿ëÀÚID¼³Á¤Àº °¡´ÉÇß´Ù. ¿À·ÎÁö ¼öÆÛÀ¯Àú¸¸ÀÌ ´Ù¸¥ º¯È­¸¦ ¸¸µé·±Áö ¸ð¸¥´Ù. ½ÇÁ¦ ȤÀº À¯È¿ÇÑ »ç¿ëÀÚIDÀ» À§ÇØ -1°ªÀ» Á¦°øÇÏ´Â °ÍÀº ½Ã½ºÅÛÀ¸·Î ÇÏ¿©±Ý ID¸¦ ±×´ë·Î ³²±âµµ·ÏÇÑ´Ù. ÇöÀç seteuid(euid) ´Â setreuid(-1, euid) ¿Í ±â´ÉÀûÀ¸·Î °°´Ù. ½ÇÁ¦ »ç¿ëÀÚID°¡ º¯Çϰųª À¯È¿»ç¿ëÀÚID°¡ ÀÌÀüÀÇ ½ÇÁ¦ »ç¿ëÀÚID¿Í ´Ù¸£°Ô ¼³Á¤µÈ´Ù¸é, ÀúÀåµÈ »ç¿ëÀÚID´Â »õ·Î¿î À¯È¿»ç¿ëÀÚID·Î ¼³Á¤µÉ °ÍÀÌ´Ù.  

¹Ýȯ°ª

¼º°ø½Ã, 0ÀÌ ¹ÝȯµÈ´Ù. ½ÇÆнÃ, -1ÀÌ ¹ÝȯµÇ°í, errno ´Â ÀûÀýÇÏ°Ô ¼³Á¤µÈ´Ù.  

¿¡·¯

EPERM
ÇöÀç ÇÁ·Î¼¼½º´Â ¼öÆÛÀ¯Àú°¡ ¾Æ´Ï°í, (i)½ÇÁ¦ »ç¿ëÀÚID¸¦ °¡Áø À¯È¿»ç¿ëÀÚID¸¦ ½º¿ÍÇÎÇϰųª (i) ´Ù¸¥°ÍÀÇ °ªÀ¸·Î Çϳª¸¦ ¼³Á¤Çϰųª (iii)ÀúÀåµÈ »ç¿ëÀÚIDÀ¸ °ªÀ¸·Î À¯È¿»ç¿ëÀÚID¸¦ ¼³Á¤Çϴ°ÍÀ» ÁöÁ¤ÇÑ°Í º¸´Ù ´Ù¸¥°ÍÀÌ º¯ÇÑ´Ù.
 

ȣȯ

BSD 4.3 (the setreuid ÇÔ¼öÈ£ÃâÀº 4.2BSD¿¡¼­ óÀ½ ¼±º¸¿´´Ù.)  

°ü·Ã Ç׸ñ

getuid(2), setuid(2)  

¿ªÀÚ

ASPLINUX<man@asp-linux.co.kr>, 2000³â 7¿ù 26


 

Index

À̸§
»ç¿ë¹ý
¼³¸í
¹Ýȯ°ª
¿¡·¯
ȣȯ
°ü·Ã Ç׸ñ
¿ªÀÚ

This document was created by man2html, using the manual pages.
Time: 08:06:59 GMT, March 25, 2004