mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00:00
Handle pam_console permissions in finit-alt for Mandriva
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
0857a0846f
commit
4e3d6ec976
2 files changed
+10
No files matched your search
@@ -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