]> Zhao Yanbai Git Server - minix.git/commit
PFS, inet: use static UID to drop privileges 99/2999/1
authorDavid van Moolenbroek <david@minix3.org>
Sat, 6 Jun 2015 11:21:23 +0000 (11:21 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Sat, 6 Jun 2015 21:42:48 +0000 (21:42 +0000)
commitdfc326153594d66dfe6fe8e63ec89bc102b0e050
treef72f54f8f1ce3b1987256cb4fc50636b7c160772
parent7eb698ea4ab08ffe5f6cf9338e85eaee0f4de4c1
PFS, inet: use static UID to drop privileges

Previously, services would obtain the user ID of "service" through
getpwnam(3).  While this approach is conceptually better, it also
imposes linking against libc which in turn causes problems with
printf(3), which already led to PFS no longer dropping privileges at
all.  For now, we hardcode SERVICE_UID and use that instead.

In the future, two changes should allow removal of SERVICE_UID again:
- "service edit" should cause RS to request that a service (such as
  PFS) drop privileges through SEF, using the user ID resolved by
  service(8), or something similar;
- a future devfs should make it possible for inet to start without
  root privileges altogether.

Change-Id: Ie02a1e888cde325806fc0ae76909943ac42c9b96
minix/fs/pfs/pfs.c
minix/include/minix/rs.h
minix/net/inet/inet.c