[Pkg-shadow-devel] Patch for chowntty - login on read-only filesystem

Nicolas François nicolas.francois@centraliens.net
Fri, 10 Jun 2005 01:26:58 +0200


--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello Tomasz,

This patch permits to login on read-only root file system.

i.e. if the chown or chmod of the tty fails because the file system is
read-only, the login is still authorized (not only if the user is root).

Kind Regards,
-- 
Nekral

--d6Gm4EdcadzBjdND
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=006_libmisc_chowntty_ro_root_fs

Index: libmisc/chowntty.c
===================================================================
RCS file: /cvsroot/shadow/libmisc/chowntty.c,v
retrieving revision 1.11
diff -u -r1.11 chowntty.c
--- libmisc/chowntty.c	31 Mar 2005 05:14:50 -0000	1.11
+++ libmisc/chowntty.c	9 Jun 2005 23:19:45 -0000
@@ -110,7 +110,7 @@
 			 info->pw_name));
 		closelog ();
 
-		if (!(err == EROFS && info->pw_uid == 0))
+		if (err != EROFS)
 			exit (1);
 	}
 #ifdef __linux__

--d6Gm4EdcadzBjdND--