[Midnightbsd-cvs] src [10497] trunk/lib/libutil/login_cap.c: use O_CLOEXEC

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jun 6 21:37:46 EDT 2018


Revision: 10497
          http://svnweb.midnightbsd.org/src/?rev=10497
Author:   laffer1
Date:     2018-06-06 21:37:45 -0400 (Wed, 06 Jun 2018)
Log Message:
-----------
use O_CLOEXEC

Modified Paths:
--------------
    trunk/lib/libutil/login_cap.c

Modified: trunk/lib/libutil/login_cap.c
===================================================================
--- trunk/lib/libutil/login_cap.c	2018-06-07 01:37:15 UTC (rev 10496)
+++ trunk/lib/libutil/login_cap.c	2018-06-07 01:37:45 UTC (rev 10497)
@@ -239,7 +239,7 @@
 		break;	/* Don't retry default on 'me' */
 	    if (i == 0)
 	        r = -1;
-	    else if ((r = open(login_dbarray[0], O_RDONLY)) >= 0)
+	    else if ((r = open(login_dbarray[0], O_RDONLY | O_CLOEXEC)) >= 0)
 	        close(r);
 	    /*
 	     * If there's at least one login class database,



More information about the Midnightbsd-cvs mailing list