diff options
author | obrien <obrien@FreeBSD.org> | 2004-08-18 06:29:48 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-08-18 06:29:48 +0000 |
commit | 35ca7ce12717b8ce00d69f28d4c77102a32653b7 (patch) | |
tree | cd3128bac756aa673a9a3f30da41651a0fc064c2 /contrib/lukemftpd/src/logutmp.c | |
parent | 0b7bb0599c106a36c7104aa0ec6dd37bc04c2cc4 (diff) | |
parent | 6047e98e5a10d201a9f152e679510774a2d53a02 (diff) | |
download | FreeBSD-src-35ca7ce12717b8ce00d69f28d4c77102a32653b7.zip FreeBSD-src-35ca7ce12717b8ce00d69f28d4c77102a32653b7.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r133936,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/lukemftpd/src/logutmp.c')
-rw-r--r-- | contrib/lukemftpd/src/logutmp.c | 53 |
1 files changed, 45 insertions, 8 deletions
diff --git a/contrib/lukemftpd/src/logutmp.c b/contrib/lukemftpd/src/logutmp.c index cdd05bc..c93a8eb 100644 --- a/contrib/lukemftpd/src/logutmp.c +++ b/contrib/lukemftpd/src/logutmp.c @@ -1,7 +1,6 @@ /* * Portions Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. - * Portions Copyright (c) 1996, Jason Downs. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -11,11 +10,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -32,7 +27,33 @@ * SUCH DAMAGE. */ +/* + * Portions Copyright (c) 1996, Jason Downs. 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 AUTHOR(S) ``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 AUTHOR(S) 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. + */ + #include <sys/types.h> +#include <sys/param.h> #include <fcntl.h> #include <stdio.h> @@ -41,8 +62,13 @@ #include <ttyent.h> #include <unistd.h> #include <utmp.h> +#ifdef SUPPORT_UTMPX +#include <utmpx.h> +#endif #include <util.h> +#include "extern.h" + typedef struct utmp UTMP; static int fd = -1; @@ -54,7 +80,7 @@ static int topslot = -1; */ void -login(const UTMP *ut) +ftpd_login(const struct utmp *ut) { UTMP ubuf; @@ -94,7 +120,7 @@ login(const UTMP *ut) } int -logout(const char *line) +ftpd_logout(const char *line) { UTMP ut; int rval; @@ -118,3 +144,14 @@ logout(const char *line) } return(rval); } + +#ifdef SUPPORT_UTMPX +/* + * special version of loginx which updates utmpx only. + */ +void +ftpd_loginx(const struct utmpx *ut) +{ + (void)pututxline(ut); +} +#endif |