From: Ben Gras Date: Fri, 20 Jan 2006 12:43:19 +0000 (+0000) Subject: Let other uids (temporarily) set their mapping. X-Git-Tag: v3.1.2a~424 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-keyfromlabel.html?a=commitdiff_plain;h=3bddaaf580f43fd0f58ca2ff69a744892ad70663;p=minix.git Let other uids (temporarily) set their mapping. --- diff --git a/servers/fs/const.h b/servers/fs/const.h index b978ea2a3..139503fe3 100644 --- a/servers/fs/const.h +++ b/servers/fs/const.h @@ -28,6 +28,7 @@ /* Miscellaneous constants */ #define SU_UID ((uid_t) 0) /* super_user's uid_t */ +#define SERVERS_UID ((uid_t) 11) /* who may do FSSIGNON */ #define SYS_UID ((uid_t) 0) /* uid_t for processes MM and INIT */ #define SYS_GID ((gid_t) 0) /* gid_t for processes MM and INIT */ #define NORMAL 0 /* forces get_block to do disk read */ diff --git a/servers/fs/misc.c b/servers/fs/misc.c index 59f96d825..4fd694784 100644 --- a/servers/fs/misc.c +++ b/servers/fs/misc.c @@ -496,7 +496,8 @@ PUBLIC int do_svrctl() struct fssignon device; int r, major; - if (fp->fp_effuid != SU_UID) return(EPERM); + if (fp->fp_effuid != SU_UID && fp->fp_effuid != SERVERS_UID) + return(EPERM); /* Try to copy request structure to FS. */ if ((r = sys_datacopy(who, (vir_bytes) m_in.svrctl_argp,