SETGID
Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Þ´º¾ó (2)
Updated: 1994³â 7¿ù 29ÀÏ
Index
Return to Main Contents
À̸§
setgid - ±×·ì ½Äº°ÀÚ(identity)¸¦ ¼³Á¤ÇÑ´Ù.
»ç¿ë¹ý
#include <unistd.h>
int setgid(gid_t gid)
¼³¸í
setgid´Â
ÇöÀç ÇÁ·Î¼¼½ºÀÇ À¯È¿ ±×·ì ID¸¦ ¼³Á¤ÇÑ´Ù. ¸¸ÀÏ È£ÃâÇÑ ÇÁ·Î¼¼½º°¡ ½´ÆÛÀ¯Àú¶ó¸é,
½ÇÁ¦ ±×·ì ID¿Í ÀúÀåµÈ(saved) ±×·ì IDµµ ¿ª½Ã ¼³Á¤µÈ´Ù.
¸®´ª½º¿¡¼,
setgid´Â
_POSIX_SAVED_IDS Ư¡¸¦ °®´Â POSIX ¹öÀü¿¡ ¸Â°Ô ±¸ÇöµÈ´Ù.
ÀÌ´Â (·çÆ® ÀÌ¿Ü) setgid ÇÁ·Î±×·¥ÀÌ ÇØ´ç ±×·ìÀÇ ±ÇÇÑ ¸ðµÎ¸¦ ¹ö¸®°í,
Ư±Ç¾ø´Â ÀÛ¾÷À» ¼öÇàÇÑ µÚ, ¾ÈÀüÇÑ ¹æ¹ýÀ¸·Î ´Ù½Ã ¿ø·¡ÀÇ
À¯È¿ ±×·ì ID·Î µ¹¾Æ¿Àµµ·ÏÇÑ´Ù.
¸¸ÀÏ »ç¿ëÀÚ°¡ ·çÆ®À̰ųª ÇÁ·Î±×·¥ÀÌ setgid ·çÆ®¶ó¸é, °¢º°ÇÑ ÁÖÀÇ°¡
ÇÊ¿äÇÏ´Ù.
setgid
ÇÔ¼ö´Â È£ÃâÇÑ ÇÁ·Î¼¼½ºÀÇ À¯È¿ gid¸¦ °Ë»çÇÏ¿© ¸¸ÀÏ ½´ÆÛÀ¯Àú¶ó¸é ÇØ´ç
±×·ì IDÀÇ ¸ðµç ÇÁ·Î¼¼½º¸¦
gid·Î
¼³Á¤ÇÑ´Ù. ÀÌÈÄ ÇÁ·Î±×·¥Àº ´Ù½Ã ·çÆ® ±ÇÇÑÀ» ¾ò´Â °ÍÀº ºÒ°¡´ÉÇÏ´Ù.
±×·¡¼, ÀϽÃÀûÀ¸·Î ·çÆ® ±ÇÇÑÀ» ¹ö¸®°í, ·çÆ®°¡ ¾Æ´Ñ ±×·ìÀÇ ±ÇÇÑÀ» °®°í
¼öÇàµÈ ÈÄ ´Ù½Ã ·çÆ® ±ÇÇÑÀ» ȸº¹ÇÏ·ÁÇÏ´Â setgid-root ÇÁ·Î±×·¥Àº
setgid¸¦
»ç¿ëÇÒ ¼ö ¾ø´Ù.
ÀÌ·¸°Ô Çϱâ À§Çؼ´Â (non-POSIX, BSD)
setegid¸¦
»ç¿ëÇÒ ¼ö ÀÖ´Ù.
¹Ýȯ°ª
¼º°ø½Ã, 0ÀÌ ¸®ÅϵȴÙ. ¿¡·¯À̸é, -1ÀÌ ¸®ÅϵǸç,
errno´Â
Àû´çÇÑ °ªÀ¸·Î ¼³Á¤µÈ´Ù.
¿¡·¯
- EPERM
-
»ç¿ëÀÚ°¡ ½´ÆÛ À¯Àú°¡ ¾Æ´Ï¸ç,
uid°¡
È£ÃâÇÑ ÇÁ·Î¼¼½ºÀÇ À¯È¿ ¶Ç´Â ÀúÀåµÈ »ç¿ëÀÚ ID¿Í ÀÏÄ¡ÇÏÁö ¾Ê´Â´Ù.
ȣȯ
SVr4, SVID.
°ü·Ã Ç׸ñ
getgid(2),
setregid(2),
setegid(2)
¿ªÀÚ
Á¤°ÈÆ <skyeyes@soback.kornet.net>, 2000³â 4¿ù 30ÀÏ
Index
- À̸§
-
- »ç¿ë¹ý
-
- ¼³¸í
-
- ¹Ýȯ°ª
-
- ¿¡·¯
-
- ȣȯ
-
- °ü·Ã Ç׸ñ
-
- ¿ªÀÚ
-
This document was created by
man2html,
using the manual pages.
Time: 08:07:01 GMT, March 25, 2004