* Test out PAM support, extend PAM support by providing environment

is specified by /etc/pam.d/init
 * Move utmp/wtmp before the execvp() in spawn() to be sure to
   use the correct pid even on a controlling tty
 * Remaining problem is that the pid of the second fork() for
   getting a controlling tty isn't that reported by spawn()
 * Re-enable writting utmp/wtmp for boot scripts
 * Provide a simply /etc/pam.d/init as without it will not work (sigh!)
This commit is contained in:
Werner Fink
2010-03-26 16:31:05 +00:00
parent 598cfa8acd
commit b2fec03199
4 changed files with 134 additions and 52 deletions

View File

@@ -80,7 +80,9 @@ endif
# Additional libs for GNU libc.
ifneq ($(findstring -DUSE_PAM,$(CPPFLAGS)),)
INITLIBS += -lpam -lpam_misc
INITLIBS += -lpam
PAMDOTD = /etc/pam.d
PAMINIT = $(PAMDOTD)/init
endif
# Additional libs for GNU libc.
@@ -158,7 +160,13 @@ install:
$(STRIP) $$i ; \
$(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
done
# $(INSTALL_EXEC) etc/initscript.sample $(ROOT)/etc/
ifneq ($(findstring -DUSE_PAM,$(CPPFLAGS)),)
$(INSTALL_DIR) $(ROOT)$(PAMDOTD)
test -s $(ROOT)$(PAMINIT) || \
$(INSTALL_DATA) init.sample $(ROOT)$(PAMINIT)
endif
# $(INSTALL_DIR) $(ROOT)/etc/
# $(INSTALL_EXEC) initscript.sample $(ROOT)/etc/
ln -sf halt $(ROOT)/sbin/reboot
ln -sf halt $(ROOT)/sbin/poweroff
ln -sf init $(ROOT)/sbin/telinit