1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

Finally nuke auth.conf, nine years after it was deprecated. The only

thing it was still used for was to set the "global default" password
hash.  Since the stock auth.conf contained nothing but comments, the
global default was actually the first algorithm in crypt(3)'s list,
which happens to be DES; I take the fact that nobody noticed as proof
that it was not used outside of crypt(3).

The only other use in our tree was in the Kerberos support code in
in tinyware's passwd(1).  I removed that code in an earlier commit;
it would not have compiled anyway, as it only supported Kerberos IV.

The auth_getval() function is now a stub that always returns NULL,
which has the same effect as a functional auth_getval() with an
empty auth.conf.

MFC after:	3 weeks
This commit is contained in:
Dag-Erling Smørgrav 2012-06-12 17:02:53 +00:00
parent d3d19ef9c2
commit 7c5a921699
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236965
9 changed files with 8 additions and 139 deletions

View File

@ -7,8 +7,7 @@
SUBDIR= sendmail
.endif
BIN1= auth.conf \
crontab \
BIN1= crontab \
devd.conf \
devfs.conf \
ddb.conf \

View File

@ -1,8 +0,0 @@
#
# $FreeBSD$
#
# Configure some authentication-related defaults. This file is being
# gradually subsumed by user class and PAM configuration.
#
# crypt_default = md5 des

View File

@ -42,7 +42,6 @@
/* Locate system binaries. */
#define _PATH_SYSPATH "/sbin:/usr/sbin"
#define _PATH_AUTHCONF "/etc/auth.conf"
#define _PATH_BSHELL "/bin/sh"
#define _PATH_CAPABILITY "/etc/capability"
#define _PATH_CAPABILITY_DB "/etc/capability.db"

View File

@ -25,14 +25,13 @@ CFLAGS+= -DINET6
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../libc/gen/
MAN+= auth.3 expand_number.3 flopen.3 fparseln.3 hexdump.3 \
MAN+= expand_number.3 flopen.3 fparseln.3 hexdump.3 \
humanize_number.3 kinfo_getallproc.3 kinfo_getfile.3 \
kinfo_getproc.3 kinfo_getvmmap.3 kld.3 login_auth.3 login_cap.3 \
login_class.3 login_ok.3 login_times.3 login_tty.3 pidfile.3 \
property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \
_secure_path.3 trimdomain.3 uucplock.3
MAN+= auth.conf.5 login.conf.5
MLINKS+= auth.3 auth_getval.3
MAN+= login.conf.5
MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3
MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3
MLINKS+=login_cap.3 login_close.3 login_cap.3 login_getcapbool.3 \

View File

@ -1,56 +0,0 @@
.\"
.\" Copyright (c) 1998 Jordan Hubbard
.\"
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\" "
.Dd October 7, 1998
.Dt AUTH_GETVAL 3
.Os
.Sh NAME
.Nm auth_getval
.Nd functions for reading values from
.Pa /etc/auth.conf
.Sh LIBRARY
.Lb libutil
.Sh SYNOPSIS
.In sys/types.h
.In libutil.h
.Ft char *
.Fn auth_getval "const char *name"
.Sh DESCRIPTION
The function
.Fn auth_getval
returns the value associated with the field called
.Fa name
or NULL if no such field is found or the auth file cannot be opened.
.Sh FILES
.Pa /etc/auth.conf
contains the name=value pairs looked up by
.Fn auth_getval .
.Sh SEE ALSO
.Xr properties_free 3 ,
.Xr properties_read 3 ,
.Xr property_find 3 ,
.Xr auth.conf 5

View File

@ -31,40 +31,14 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
#include <libutil.h>
#include <paths.h>
#include <syslog.h>
#include <unistd.h>
static properties P;
static int
initauthconf(const char *path)
{
int fd;
if (!P) {
if ((fd = open(path, O_RDONLY)) < 0) {
syslog(LOG_ERR, "initauthconf: unable to open file: %s", path);
return 1;
}
P = properties_read(fd);
close(fd);
if (!P) {
syslog(LOG_ERR, "initauthconf: unable to parse file: %s", path);
return 1;
}
}
return 0;
}
char *
auth_getval(const char *name)
{
if (!P && initauthconf(_PATH_AUTHCONF))
return NULL;
else
return property_find(P, name);
(void)name;
return (NULL);
}

View File

@ -1,35 +0,0 @@
.\" Copyright (c) 1998 Jordan Hubbard
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, is permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice immediately at the beginning of the file, without modification,
.\" this list of conditions, and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" $FreeBSD$
.\"
.Dd October 7, 1998
.Dt AUTH.CONF 5
.Os
.Sh NAME
.Nm auth.conf
.Nd authentication capability database
.Sh SYNOPSIS
.Pa /etc/auth.conf
.Sh DESCRIPTION
.Nm
contains various attributes important to the authentication
code, most notably
.Xr crypt 3
for the time being.
This documentation will be updated as the
.Pa /etc/auth.conf
file, which is very new, evolves.
.Sh SEE ALSO
.Xr auth_getval 3 ,
.Xr crypt 3

View File

@ -90,8 +90,6 @@ are desired, the entire value should be enclosed in { } (curly-bracket)
characters.
Any line beginning with a # or ; character is assumed to
be a comment and will be ignored.
.Sh SEE ALSO
.Xr auth_getval 3
.Sh AUTHORS
.An Jordan Hubbard
.Sh BUGS

View File

@ -9,7 +9,6 @@ This directory contains the following files:
amd.map - filesystem automounter lookup resolution map (see amd(8))
apmd.conf - configuration file for apmd(8)
auth.conf - authentication capability database (see auth.conf(5))
bsd-style-copyright - copyright style for bsd system
crontab - system scheduled command table (see crontab(5))
csh.cshrc - sample .cshrc (see csh(1))