tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

add login.conf to getent(1)



May I commit the following?  It adds "login.conf" to getent(1) and minor 
manual page improvements.

Index: getent.1
===================================================================
RCS file: /cvsroot/src/usr.bin/getent/getent.1,v
retrieving revision 1.23
diff -u -r1.23 getent.1
--- getent.1    11 Oct 2011 20:39:40 -0000      1.23
+++ getent.1    25 Jun 2014 17:51:33 -0000
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 11, 2011
+.Dd June 25, 2014
 .Dt GETENT 1
 .Os
 .Sh NAME
@@ -45,8 +45,8 @@
 .Nm
 program retrieves and displays entries from the administrative
 database specified by
-.Ar database ,
-using the lookup order specified in
+.Ar database .
+If applicable, it uses the lookup order specified in
 .Xr nsswitch.conf 5 .
 The display format for a given
 .Ar database
@@ -63,6 +63,7 @@
 .It gettytab Ta entry
 .It group Ta group:passwd:gid:[member[,member]...]
 .It hosts Ta address name [alias ...]
+.It login.conf Ta entry
 .It netgroup Ta (host,user,domain) [...]
 .It networks Ta name network [alias ...]
 .It passwd Ta user:passwd:uid:gid:gecos:home_dir:shell
@@ -100,6 +101,8 @@
 .Xr cgetcap 3
 style databases
 .Sy ( disktab ,
+.Sy gettytab ,
+.Sy login.conf ,
 .Sy printcap )
 specifying a key, lists the entry for that key, and specifying more arguments
 after the key are used as fields in that key, and only the values of the keys
@@ -126,6 +129,8 @@
 .Xr gettytab 5 ,
 .Xr group 5 ,
 .Xr hosts 5 ,
+.Xr login.conf 5 ,
+.Xr netgroup 5 ,
 .Xr networks 5 ,
 .Xr nsswitch.conf 5 ,
 .Xr passwd 5 ,
Index: getent.c
===================================================================
RCS file: /cvsroot/src/usr.bin/getent/getent.c,v
retrieving revision 1.19
diff -u -r1.19 getent.c
--- getent.c    15 Mar 2012 02:02:23 -0000      1.19
+++ getent.c    25 Jun 2014 17:51:33 -0000
@@ -41,6 +41,7 @@
 #include <errno.h>
 #include <grp.h>
 #include <limits.h>
+#include <login_cap.h>
 #include <netdb.h>
 #include <netgroup.h>
 #include <pwd.h>
@@ -72,6 +73,7 @@
 static int     ethers(int, char *[]);
 static int     group(int, char *[]);
 static int     hosts(int, char *[]);
+static int     login_conf(int, char *[]);
 static int     netgroup(int, char *[]);
 static int     networks(int, char *[]);
 static int     passwd(int, char *[]);
@@ -97,6 +99,7 @@
        {       "gettytab",     gettytab,       },
        {       "group",        group,          },
        {       "hosts",        hosts,          },
+       {       "login.conf",   login_conf,             },
        {       "netgroup",     netgroup,       },
        {       "networks",     networks,       },
        {       "passwd",       passwd,         },
@@ -666,6 +669,16 @@
 }
 
                /*
+                * login.conf
+                */
+
+static int
+login_conf(int argc, char *argv[])
+{
+       return handlecap(_PATH_LOGIN_CONF, argc, argv);
+}
+
+               /*
                 * printcap
                 */
 


Home | Main Index | Thread Index | Old Index