diff options
author | wollman <wollman@FreeBSD.org> | 2002-05-30 21:26:49 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2002-05-30 21:26:49 +0000 |
commit | 504321aa461394407a6445481e362e432c464590 (patch) | |
tree | ab1203bf7b2e0a5b1f402735572ff992d57a5286 | |
parent | 42a1641010c9c90ce3c04c0b26beb994fc17707f (diff) | |
download | FreeBSD-src-504321aa461394407a6445481e362e432c464590.zip FreeBSD-src-504321aa461394407a6445481e362e432c464590.tar.gz |
Fix conflict with <paths.h> by renaming _PATH_LOGIN to _PATH_SLIP_LOGIN,
and likewise LOGOUT for consistency. Fix a few nearby style bugs.
-rw-r--r-- | usr.sbin/sliplogin/pathnames.h | 7 | ||||
-rw-r--r-- | usr.sbin/sliplogin/sliplogin.c | 18 |
2 files changed, 15 insertions, 10 deletions
diff --git a/usr.sbin/sliplogin/pathnames.h b/usr.sbin/sliplogin/pathnames.h index 3bee951..3ed5d98 100644 --- a/usr.sbin/sliplogin/pathnames.h +++ b/usr.sbin/sliplogin/pathnames.h @@ -30,7 +30,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)pathnames.h 8.1 (Berkeley) 6/6/93 + * From: @(#)pathnames.h 8.1 (Berkeley) 6/6/93 + * $FreeBSD$ */ #ifndef COMPAT @@ -41,7 +42,7 @@ #define _PATH_ACCESS "/etc/sliphome/slip.hosts" #define _PATH_SLPARMS "/etc/sliphome/slip.slparms" -#define _PATH_LOGIN "/etc/sliphome/slip.login" -#define _PATH_LOGOUT "/etc/sliphome/slip.logout" +#define _PATH_SLIP_LOGIN "/etc/sliphome/slip.login" +#define _PATH_SLIP_LOGOUT "/etc/sliphome/slip.logout" #define _PATH_DEBUG "/tmp/sliplogin.XXXXXX" diff --git a/usr.sbin/sliplogin/sliplogin.c b/usr.sbin/sliplogin/sliplogin.c index 2d8925e..8a3bc5e 100644 --- a/usr.sbin/sliplogin/sliplogin.c +++ b/usr.sbin/sliplogin/sliplogin.c @@ -202,14 +202,16 @@ findid(name) * one specific to this host. If none found, try for * a generic one. */ - (void)snprintf(loginfile, sizeof(loginfile), "%s.%s", _PATH_LOGIN, name); + (void)snprintf(loginfile, sizeof(loginfile), "%s.%s", + _PATH_SLIP_LOGIN, name); if (access(loginfile, R_OK|X_OK) != 0) { - (void)strncpy(loginfile, _PATH_LOGIN, sizeof(loginfile)-1); - loginfile[sizeof(loginfile)-1] = '\0'; + (void)strncpy(loginfile, _PATH_SLIP_LOGIN, + sizeof(loginfile) - 1); + loginfile[sizeof(loginfile) - 1] = '\0'; if (access(loginfile, R_OK|X_OK)) { syslog(LOG_ERR, "access denied for %s - no %s\n", - name, _PATH_LOGIN); + name, _PATH_SLIP_LOGIN); exit(5); } } @@ -307,10 +309,12 @@ hup_handler(s) (void) close(0); seteuid(0); - (void)snprintf(logoutfile, sizeof(logoutfile), "%s.%s", _PATH_LOGOUT, loginname); + (void)snprintf(logoutfile, sizeof(logoutfile), "%s.%s", + _PATH_SLIP_LOGOUT, loginname); if (access(logoutfile, R_OK|X_OK) != 0) { - (void)strncpy(logoutfile, _PATH_LOGOUT, sizeof(logoutfile)-1); - logoutfile[sizeof(logoutfile)-1] = '\0'; + (void)strncpy(logoutfile, _PATH_SLIP_LOGOUT, + sizeof(logoutfile) - 1); + logoutfile[sizeof(logoutfile) - 1] = '\0'; } if (access(logoutfile, R_OK|X_OK) == 0) { char logincmd[2*MAXPATHLEN+32]; |