.\" Copyright (c) 1997 David Nugent .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, is permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice immediately at the beginning of the file, without modification, .\" this list of conditions, and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. This work was done expressly for inclusion into FreeBSD. Other use .\" is permitted provided this notation is included. .\" 4. Absolutely no warranty of function or purpose is made by the author .\" David Nugent. .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" .\" %FreeBSD: src/lib/libutil/_secure_path. 3, v 1.7. 2.3 2001/12/17 10:08:32 ru Exp % .\" .\" $FreeBSD: doc/ja_JP.eucJP/man/man3/_secure_path. 3, v 1.7 2002/11/03 06:38:28 horikawa Exp $ .Dd May 2, 1997 .Os .Dt _SECURE_PATH 3 .Sh ¸íĪ .Nm _secure_path .Nd ÆÄÀÏÀÌ ¾ÈÀüÇϵµ·Ï º¸ÀÌ´ÂÁö ¾î¶²Áö¸¦ ÆÇÁ¤ÇÑ´Ù .Sh ÇÁ·Î±×·¥ ¶óÀ̺귯¸® .Lb libutil .Sh ¼­½Ä .In sys/types.h .In libutil.h .Ft int .Fn _secure_path "const char *path" "uid_t uid" "gid_t gid" .Sh ÇØ¼³ ÀÌ ÇÔ¼ö´Â, ÁöÁ¤ÀÇ ÆÐ½º¿¡ ´ëÇØ ±âº»ÀûÀÎ º¸¾È üũ¸¦ ½Ç½ÃÇÕ´Ï´Ù. À̰ÍÀº root Ư±ÇÀ¸·Î ½ÇÇàÁßÀÇ ÇÁ·Î¼¼½º°¡ »ç¿ëÇÏ´Â °ÍÀ» ÀǵµÇϰí ÀÖ½À´Ï´Ù. ÁöÁ¤ÀÇ ÆÄÀÏÀÇ ³»¿ëÀ» ½Å·ÚÇÏ´ÂÁö ¾î¶²Áö¸¦ ÆÇÁ¤Çϱâ (À§ÇØ)¶§¹®ÀÔ´Ï´Ù. ÀÌ ÇÔ¼ö´Â, ½Ã½ºÅÛÀÇ À§Ç輺À» °ËÃâÇϱâ À§Çؼ­ »ç¿ëµÇ´Â ¹æ¹ýÀ¸·Î¼­ Àß »ç¿ëµË´Ï´Ù. ÆÄÀÏÀº, ´ÙÀ½ÀÇ Á¶°ÇÀ» ä¿ì´Â °æ¿ì¿¡ .Sq ¾ÈÀüÇÏ´Ù (ÀÌ)¶ó°í »ý°¢µË´Ï´Ù. .Bl -enum .It ÆÄÀÏÀÌ Á¸ÀçÇØ, ±×°ÍÀÌ Åë»óÀÇ ÆÄÀÏÀÌ´Ù (±âÈ£ ¿¬°á, ÆÄÀÏ, µð¹ÙÀ̽º¿¡ °íÀ¯ÀÇ ÆÄÀÏ, ¶Ç´Â À̸§ ÷ºÎÀÇ ÆÄÀÌÇÁ ÆÄÀÏ (ÀÌ)°¡ ¾Æ´Ï´Ù). .It ´©±¸³ª°¡ ±âÀÔÇØ °¡´ÉÇÑ ¼Ó¼ºÀ» °¡Áö°í ÀÖÁö ¾Ê´Ù. .It uid °¡ -1 ³ª¿ÀÁö ¾Ê´Â °æ¿ì´Â, ÁöÁ¤µÈ uid ¶Ç´Â uid 0 ÀÇ À¯Àú¿¡ ÀÇÇØ ¼ÒÀ¯µÇ°í ÀÖ´Ù. .It ±×·ìÀÇ ±âÀÔ ¼Ó¼ºÀÌ ¾ø´Â, ¶Ç´Â gid °¡ -1 ³ª¿ÀÁö ¾Ê´Â °æ¿ì´Â ÁöÁ¤ÀÇ gid ¿¡ ÀÇÇÑ ±×·ì ¼ÒÀ¯±ÇÀÌ ÀÖ´Ù. .El .Sh ¹Ýȯ°ª ÀÌ ÇÔ¼ö´Â, ÆÄÀÏÀÌ Á¸ÀçÇØ, ¾ÈÀüÀ̶ó°í »ý°¢µÇ´Â °æ¿ì´Â 0 À» µ¹·ÁÁÝ´Ï´Ù. ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾Ê´Â °æ¿ì´Â -2 À» µ¹·ÁÁÝ´Ï´Ù. º¸¾È ÀåÇØ¸¦ ³ªÅ¸³»´Â °æ¿ì¿¡´Â -1 À» µ¹·ÁÁÝ´Ï´Ù. .Xr syslog 3 ÇÏÁö¸¸, ÀÌ ÇÔ¼öÀÇ Ã³¸® ½ÇÆÐ¸¦ ÀÌÀ¯¸¦ Æ÷ÇÔÇØ LOG_ERR ¿ì¼± ¼øÀ§ÀÇ ·Î±×¿¡ ±âÀÔÇϱâ À§Çؼ­ »ç¿ëµË´Ï´Ù. .Pp .Sh ¹ö±× ½ÇÇàµÇ´Â üũ´Â ±âº»ÀûÀÎ °ÍÀ̸ç, ÀÌ ÇÔ¼öÀÇ »ç¿ë°ú ÂüÁ¶ ÆÄÀÏ¿¡ÀÇ ¾×¼¼½ºÀÇ »çÀÌÀÇ °æÀï »óȲÀ» Á¦°ÅÇÏ·Á°í ÇÏ´Â ½Ãµµ ÇÏÇà ±úÁöÁö ¾Ê½À´Ï´Ù. .Pp .Sh °ü·Ã Ç׸ñ .Xr lstat 2 , .Xr syslog 3 .Pp .Sh ¿ª»ç ÀÌ ÇÔ¼öÀÇ À¯·¡ÀÎ ÄÚµå´Â, Berkeley Software Design, Inc. ¿¡ ÀÇÇØ .Fx ÇÁ·ÎÁ§Æ®¿¡ ±â¿©µÈ °ÍÀÔ´Ï´Ù.