mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
Handle pam_console permissions in finit-alt for Mandriva
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user