Handle pam_console permissions in finit-alt for Mandriva

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
Claudio Matsuoka
2008-04-18 16:01:11 -03:00
parent 0857a0846f
commit 4e3d6ec976
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -4,6 +4,7 @@ O.4 ()
- create loopback device node in finit-alt (for squashfs)
- add option to use built-in run-parts instead of /bin/run-parts
- ignore signal instead of setting to an empty handler (Metalshark)
- handle pam_console permissions in finit-alt for Mandriva
0.3 (20080223)
- Change poweroff method to reboot(RB_POWER_OFF) (Metalshark)
+9
View File
@@ -61,6 +61,7 @@ THE SOFTWARE.
#define RUNPARTS "/usr/bin/run-parts"
#define REMOUNT_ROOTFS_RW
#define MAKE_DEVICES
#define PAM_CONSOLE
#else /* original Eeepc distribution */
#define RANDOMSEED "/var/lib/urandom/random-seed"
#define SYSROOT "/mnt"
@@ -267,6 +268,14 @@ int main()
makepath("/var/run/console");
touch("/var/run/console/" DEFUSER);
#ifdef PAM_CONSOLE
if ((fd = open("/var/run/console.lock", O_CREAT|O_WRONLY|O_TRUNC, 0644)) >= 0) {
write(fd, DEFUSER, strlen(DEFUSER));
close(fd);
system("/sbin/pam_console_apply");
}
#endif
/*
* Misc setup
*/