summaryrefslogtreecommitdiff
path: root/libexec/ftpd/logwtmp.c
AgeCommit message (Collapse)Author
2015-08-09Removed unnecessary memset(3) callshm
2015-08-09Clear utmpx struct before writing it to wtmpx filesshm
2006-09-23Apply patch from PR bin/33261 sent by FUKAOMI Naoki:xtraeme
"ftpd does not update wtmpx". Thanks.
2005-06-23cleanup utmp and utmpx support.christos
- make them symmetric - add a function to open the wtmp file explicitly very early in the game
2004-11-11Don't write trash in ut_ss; either initialize it to 0, or put in the properchristos
information.
2004-08-09Fixes from (or inspired by) OpenBSD:lukem
* Fix yacc parser error recovery so that setjmp(3)/longjmp(3) is unnecessary. * Fix SIGURG handler to set an urgflag that's later tested, rather than abusing setjmp(3)/longjmp(3). * Use "volatile sig_atomic_t" as the type of variables modified by sig handlers. * Use sigaction(3) instead of signal(3) to set the signal handlers. * Only set the main SIGALRM handler once. If we need to change it, cache the old handler and restore appropriately... * Remove a bunch of signal races by improving the signal handlers. * Fix memory leak with 'ESPV ALL'. My stuff: * Clean up the debug message in reply(); use vsnprintf(3) instead of vsyslog(3). * Rework parsing of OOB commands to _not_ use the yacc parser, since the latter isn't reentrant and the hacks to work around that are ugly. We now examine urgflag at appropriate locations and call handleoobcmd() if it's set. Since the only OOB commands we currently implement are ABOR and STAT, this isn't an issue. (I also can't find the reference in RFC2228 where MIC, CONF & ENC are OOB-only commands. Go figure.) I could clean up the is_oob stuff some more, but the remaining stuff in ftpcmd.y is harmless and it's unnecessary churn right this moment.
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22284, verified by myself.
2003-06-30Add ftpd_loginx() and ftpd_logwtmpx() and use them to hold wtmpx filetacha
open while a session. Close bin/21692 by bqt@Krille.Update.UU.SE.
2003-02-23rename local copies of login(), logout() and logwtmp() tolukem
ftpd_login(), ftpd_logout() and ftpd_logwtmp() respectively. (makes utmp support much easier in tnftpd). per suggestion in mail from Mike Heffner <mheffner@vt.edu>, who forwarded patch from Michael Ranner <mranner@inode.at>.
2002-09-13revert previous. wtmp{,x} entries need not be \0-terminated, soitojun
strncpy is more proper.
2002-09-12use strl*, not strn*.itojun
2001-02-04fix redundant declarations.christos
2000-05-20convert to ANSI C as per style guidelukem
2000-03-05* don't bother with a version[] string, just use the macro as appropriatelukem
* clean some more of the GLOBAL stuff * fix unused var if -UHASSETPROCTITLE
2000-01-12* add ftpd.conf directive `portrange class min max', which allows specificationlukem
of the port range used by passive connections. based on work in [bin/9158] from Takahiro Kambe <taca@sky.yamashina.kyoto.jp> * change the way global variables are defined and extern-ed to be more consistent.
1999-08-25more kerberos5 fixeschristos
1999-02-24Make this build with KERBEROS5 defined.explorer
1998-12-28* replace LOG(CMD|BYTES) macros with logcmd(), which is a cleanerlukem
solution with less code replication. use realpath() in logcmd() so that all logged filenames are sane. * support `REST STREAM' in `FEAT' reply (from draft-ietf-ftpext-mlst-05) * in 'HELP', suffix unimplemented commands with `-' instead of `*'; the former is easier to differentiate from `+'. * deprecate curdir() now that logcmd() doesn't use it. * ensure all filename buffers are at least MAXPATHLEN+1 in size. * move jmp_buf errcatch out of extern.h, removing need to #include <setjmp.h> in every file.
1998-09-12Need <signal.h> for sig_atomic_t.kleink
1998-09-06* complete fix for `multiple replies returned for single parse error'lukem
problem; move `hasyyerrored' state flag out of yylex() so that check_{login,modify} can also set it. * check result of check_login for PORT command * set initial timeout before the "setjmp(); for(;;) yyparse()", otherwise an invalid command after login incorrectly sets the timeout to 5 minutes (rather than what was set in ftpd.conf) * replace (char *)0 with NULL * move yyerror() from ftpd.c to ftpcmd.y * remove need for -Dunix, by using the version string from ftpd.c (instead of `BSD-199506') * move all extern-ed vars into extern.h
1998-07-27const poisoning.mycroft
1998-04-01Need <time.h> for time() prototype.kleink
1997-06-18- Pass gcc -Wallchristos
- Fix incorrect const poisoning - Fix ftpd_popen to dynamically allocate strings to avoid buffer overruns.
1995-04-11clean up RCS Id's and a couple of stype nits.cgd
Also, fix bug 947 (reported by Luke Mewburn, extraneous vers.c)
1994-06-294.4-lite, plus our local changesderaadt
1993-08-01Add RCS identifiers.mycroft
1993-03-21initial import of 386bsd-0.1 sourcescgd