Commit Graph

232 Commits

Author SHA1 Message Date
lukem 9c437ec754 Change `LNFILES' to `BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.
2003-09-20 06:20:41 +00:00
lukem 49fb32cb30 use LNFILES instead of homegrown equivalent 2003-09-04 06:42:50 +00:00
itojun 4572e734b1 plug memory leak. openbsd-pr-3416 2003-08-27 08:15:16 +00:00
itojun 9088831850 tabify 2003-08-11 16:20:11 +00:00
itojun de3e7a8bf6 debian bug id "sup 1.8-8, bug #175327" - temporary file symlink race 2003-07-28 23:13:17 +00:00
christos f2829c2b54 fix problem with fgets() 2003-04-04 23:10:10 +00:00
christos 8fe39e55bc This Makefile should not need bsdmake! 2003-04-03 20:32:41 +00:00
christos 2f01db86ba add more defines for stuff we have. 2003-04-03 17:56:52 +00:00
christos e2f800d682 put back <sys/ioctl.h> in case we are lunix. 2003-04-03 17:15:22 +00:00
christos c8ee373ee5 Port to linux 2003-04-03 17:14:24 +00:00
drochner 594e5ccb92 remove some #includes which are unneeded since the transition
to getifaddrs(3)
2003-04-01 08:46:10 +00:00
wiz 9115df8c49 success, not sucess. Noted by mjl. 2003-01-28 22:35:02 +00:00
jschauma 432d470724 Fix typos pointed out by Igor Sobrado in PR misc/19621. 2003-01-02 00:22:29 +00:00
wiz ea577b210e Debugging is usually spelled with three gs. 2002-12-22 13:50:35 +00:00
thorpej f33f7a14c5 Avoid strict alias warning. 2002-12-06 15:21:08 +00:00
lukem d348d3d723 tweaks for fparseln(3) move from libutil to libc:
- remove #include <util.h> if nothing else needed it
- remove LDFLAGS+=-lutil if nothing else needed it
2002-11-30 03:10:53 +00:00
provos 32b88027c7 use readlink with bufsize - 1; approved thorpej. 2002-10-19 20:33:17 +00:00
mycroft 45e43d0ec5 select() -> poll()
Also clean up some very ugly code.
2002-09-19 02:49:41 +00:00
lukem c52b93f508 minor makefile delint 2002-09-18 13:31:52 +00:00
soren 7ba72383ee Don't omit third argument to open(2).
PR bin/17885 from mjl.
2002-08-09 11:06:43 +00:00
wiz 4f156aff23 Fix a lint warning by removing some #ifdef lint (!?!). 2002-07-10 23:55:06 +00:00
wiz 790f1e25bd Remove unneeded header file. 2002-07-10 23:49:18 +00:00
wiz c3825c9257 Remove some unneeded typedefs and defines. 2002-07-10 23:47:01 +00:00
wiz 0b6819637f Usge -> Usage in comment. 2002-07-10 21:31:30 +00:00
wiz 09e4390a6e De-lint a bit. 2002-07-10 21:28:13 +00:00
wiz a330b47ad5 Cleanup, part 2:
Remove 'register'. ANSIfy. indent(1). Static -> static.
Change some ``#include <header.h>'' to ``#include "header.h"'' for
local headers.
Fix function declaration mistakes uncovered by ANSIfication.
2002-07-10 20:19:38 +00:00
wiz 6623130407 Remove unused ci.c. 2002-07-10 18:55:34 +00:00
wiz 77085dee52 Cleanup, part 1:
Remove sysent.h, unneeded.
Remove __P().
unifdef __STDC__
Remove some #if 0 parts.
Start ANSIfication.
2002-07-10 18:53:56 +00:00
wiz 6e749bff5c Comment out token after #endif. 2002-05-16 19:48:18 +00:00
heinz 07dc707915 typo 2002-03-23 22:31:36 +00:00
ross 2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz a2d753e3ef Whitespace nits. 2002-01-19 11:44:57 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
wiz 4c99916337 va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
2001-09-24 13:22:25 +00:00
itojun 9a881fc0f7 typo in IPv6 support. listen to wildcard address correctly. 2001-09-18 04:36:28 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
itojun 55e8bc4e8b make sup/supfilesrv IPv6 ready. supfilesrv listens to single socket,
therefore, you will need two instances running for dual stack support
(one with -4 and one with -6).
2001-09-11 03:33:52 +00:00
itojun c976c20dc0 correct 1st arg to select(). 2001-09-11 03:32:55 +00:00
wiz f3f6c5b675 `accessible' only has one `a'. 2001-06-19 12:52:20 +00:00
wiz 40ac848024 Fix various misspellings of compatible/compatibility. 2001-06-11 01:50:48 +00:00
mycroft 5087e52718 Kill .NOPATH, and fix some DPADDs. 2001-01-18 03:28:19 +00:00
cgd d594ce939b comment or delete text after CPP directives. 2001-01-16 02:50:27 +00:00
christos d4f4672be8 move target definition after including bsd.prog.mk so that target protection
works.
2001-01-14 10:36:11 +00:00
christos b4d783f6b6 move target after including bsd.prog.mk so that target protection works. 2001-01-14 10:34:57 +00:00
lukem 443a19e035 convert to using .WAIT 2001-01-09 03:13:39 +00:00
enami 270db080e9 Use PRINTOBJDIR. 2001-01-07 08:00:54 +00:00
martin 8d2fdb358e Don't duplicate system declarations (vsprintf and friends) already
present in system headers. Even worse: those declarations have slightly
different argument types (va_list vs. _BSD_VA_LIST_)
2000-12-30 21:36:23 +00:00
scw eee03f150e No need to initialise a global to zero. 2000-12-13 23:00:32 +00:00
is d8302e2d73 More format string cleanups by sommerfeld. 2000-10-11 20:23:46 +00:00
tron fd8ae9c4ea Use correct argument type in call to "fparseln(3)". Fix supplied by
Motoyuki Konno in PR bin/10645.
2000-07-21 16:03:14 +00:00
enami edea8c9791 You can't just define read_line as fparseln since former keeps the storage
internally but latter allocates everytime.
2000-07-19 07:52:44 +00:00
abs fd407a99b7 If we fail due to not being able to lookup our own hostname, display the
name in question in an attempt to reduce the number of people who have to ask
how to get sup working...
2000-03-12 12:16:49 +00:00
mycroft f5d7100e26 Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
2000-01-21 17:08:33 +00:00
kristerw 2220c68654 Typos (from OpenBSD) 1999-11-18 19:02:31 +00:00
bouyer 28602510ee Add libwrap support to supfilesrv, as annnounced 2 weeks ago on tech-userlevel,
conditioned by #ifdef LIBWRAP (on by default).
I renamed '-l' (the 'live' mode) to '-d' and '-l' is now used to enable
logging of successfull connections, to be consistent with what other NetBSD
daemon use.
These changes are on on sup2.fr.netbsd.org since 2 weeks.
1999-08-24 15:52:52 +00:00
erh 131ee1a7b6 Replace the provided read_line function with calls to the fparseln function in libutil. Maintain compatibility on machines without fparseln through the NEED_READ_LINE define. 1999-08-02 05:36:05 +00:00
christos 717ef4f35b Add -u flag, that prevents sup from attempting to restore a and m times
on the received files.
1999-06-17 05:11:47 +00:00
pk 5c3c96216b Software_Distribution => Software.Distribution. 1999-04-12 20:48:07 +00:00
lukem 7e1c62baf8 set MKLINT=no. noted by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp> 1999-03-13 23:17:46 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
kleink 3ed4fcf61e In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
of errno.
1999-01-11 22:39:59 +00:00
kim be631b22d4 Type mismatch in declaration... NOT (reverted previous change). 1998-11-02 04:00:24 +00:00
kim 98c529f1c2 Type mismatch in declaration. 1998-10-14 08:42:21 +00:00
kim b894c055c6 Before running "rm -rf" on a directory chmod the directory and its parent
to u+rwx to make our chances of success better.  The modes for directories
are reset at the end of a sup run, so we don't need to worry about that.

This possibly might mess up the mode of the parent of the top-level dir,
if the top-level changed to a non-directory.  This is probably rare enough
not to care too much about.

XXX: Should probably chmod the containing directory for each non-directory
removal as well, so there wouldn't be complaints about them.  Please feel
free to send in your opinions on that...
1998-10-12 05:19:48 +00:00
kim cc01fea167 Before running "rm -rf" on a directory try to turn on the S_IRWXU bits. 1998-09-12 07:36:49 +00:00
kim 06f0e05806 Fix paths to match the current code. 1998-09-06 06:25:59 +00:00
lukem 72549586a8 distclean is a synonym for cleandir 1998-09-05 14:57:41 +00:00
ross b1934d6034 {} fixes from Erik Bertelsen <erik@erik-be.uni-c.dk> (PR 6047) to shut up egcs. 1998-08-27 20:31:00 +00:00
mikel f48c684893 handle negative arguments correctly 1998-08-04 04:33:15 +00:00
frueauf d7e113cce6 Use the variable u instead of p in line 641 to prevent sup coredumping. 1998-07-30 21:03:48 +00:00
mycroft c77b5a980c const poisoning. 1998-07-27 01:07:01 +00:00
mycroft 160249f79c const poisoning. 1998-07-26 15:48:43 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
mrg 5ddb76d383 remove some register 1998-03-30 02:29:14 +00:00
perry 75a6e03535 change includes to fix compiler warning 1998-02-03 04:55:59 +00:00
mikel 332409ce59 update to match new reality (/usr/lib/supfiles -> /etc/supfiles) 1998-01-21 09:10:40 +00:00
mikel ef33c3eddc Add -DEE_XXX to CPPFLAGS so that system supfiles are obtained from
/etc/supfiles instead of /usr/lib/supfiles.
1998-01-21 09:07:04 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
msaitoh 6bbe51cef1 fix typo 1997-11-15 17:42:07 +00:00
thorpej 0e42d89fac Oops! Forgot this yesterday: Add read_line.o goo. 1997-11-13 17:09:04 +00:00
thorpej 481e558f6c Oops! Forgot to commit this: build read_line.o 1997-11-13 17:05:20 +00:00
thorpej e6889efbce Make sup(1) handle lines continued with '\'. Fixes PR #4430, from
Ty Sarna <tsarna@endicor.com>.
1997-11-13 01:05:28 +00:00
lukem 0a94f4f077 use CPPFLAGS instead of CFLAGS 1997-10-25 06:57:53 +00:00
mycroft 6af5bbb01a Use S_IS*(), not S_IF*. 1997-10-19 19:53:54 +00:00
mrg a62207fee8 fix compile warnings on the alpha. 1997-10-19 09:56:10 +00:00
lukem 9f6ff4ad6f use string.h instead of strings.h 1997-10-18 07:05:31 +00:00
lukem 31bc9c50ba WARNSify 1997-10-17 13:59:34 +00:00
mikel 0ed58c18f2 fix typo in CLEANFILES 1997-10-16 08:26:50 +00:00
veego 98d951955c s/CURDIR/.CURDIR/ and add a missing " 1997-10-08 18:59:38 +00:00
thorpej b7b213b4f5 Add a README describing how to build this on a non-NetBSD system (yes,
that's actually useful :-) using the Makefile in the source/ subdirectory.
1997-10-07 01:33:30 +00:00
thorpej b92a5b9b37 Add NetBSD Makefile infrastructure for building the sup programs. 1997-10-07 01:31:07 +00:00
thorpej 42d99e64c5 Garbage-collect the USE_CRYPT stuff. 1997-10-07 01:27:14 +00:00
christos 1b45de5df5 String overflow bugs (from OpenBSD) 1997-09-22 13:57:36 +00:00
christos 8c55e294ce Add -q flag for quiet operation. 1997-08-04 22:03:52 +00:00
christos afc018f838 If a directory gets deleted in the master tree, but the client has it in
his last.<collection> list, this directory did not get removed in the client
since the code just tried rmdir(foo) and gave up when that failed. This
has been changed to be more agressive and do an rm -fr when rmdir fails.
1997-07-30 15:35:13 +00:00
christos 6613161476 - Don't botch varargs: the are not always an array of void * in the stack...
Write a separate function to convert a list of function parameters to
  an argv array.
- explain why execv failed.
1997-07-30 15:33:22 +00:00
christos 7d52497961 When in compress mode, don't overwrite the destination file directly,
write a temp file and use rename when it is done. (From James Mathiesen
<james@deshaw.com>)
1997-07-15 18:15:55 +00:00
perry b5b0d91666 c-style rcsid comments changed to nroff style, from Dave Huang in pr-3855 1997-07-12 14:50:44 +00:00
mikel abbcc05d81 avoid last.temp filename collision by using rel-suffix;
from Scott Stevens <s.k.stevens@ic.ac.uk>
1997-07-08 05:01:15 +00:00
mikel e513e4a964 include release suffix when reporting update times; from my PR bin/1344. 1997-07-08 04:37:11 +00:00
christos 801ce09dea Make sure you set _base, otherwise we core dump. 1997-06-18 15:25:42 +00:00
christos c7a226af02 When creating directories, make sure you remove previous non-directories
before doing so, otherwise sup fails.
1997-06-18 15:23:52 +00:00
christos 1933233e0b Cleanup unsigned char -> char and #if __STDC__ -> #ifdef __STDC__
inconsistencies
1997-06-17 21:38:23 +00:00
christos 7a1ede0553 - add $NetBSD$
- remove all $Log$ instances and the extra logs caused by our local changes.
1997-06-17 18:56:02 +00:00
christos 12f6930b5a Avoid coredump in svrfinishup. 1997-06-17 18:37:59 +00:00
christos cb8aa82b0c compare only the prefix "nfs", not the whole word, so we match "nfs3" too. 1997-02-26 15:06:46 +00:00
christos 2c22a216ba 64 bit patches (mostly long -> time_t) from Matthew Jacob (?)
sup now works on the alpha!
1996-12-31 18:08:00 +00:00
christos 9d10a25919 - add missing prototypes.
- fix function call inconsistencies
- fix int <-> long and pointer conversions
It should run now on 64 bit machines...
1996-12-23 19:42:01 +00:00
christos 4a55cd8d26 Use a better fix for vsnprintf on svr4. Apparently, svr4 stdio does not
have _IOSTRG, but it uses _IOREAD to indicate that _doprnt() should print
to the buffer and not to the file stream.
1996-09-30 04:19:55 +00:00
christos b33b1aed5c - for portability make sure that we never use "" as a pathname, always convert
it to "."
- include sockio.h if needed to define SIOCGIFCONF (for svr4)
- use POSIX signals and wait macros
- add -S silent flag, so that the client does not print messages unless there
  is something wrong
- use flock or lockf as appropriate
- use fstatfs or fstatvfs to find out if a filesystem is mounted over nfs,
  don't depend on the major() = 255 hack; it only works on legacy systems.
- use gzip -cf to make sure that gzip compresses the file even when the file
  would expand.
- punt on defining vsnprintf if _IOSTRG is not defined; use sprintf...

To compile sup on systems other than NetBSD, you'll need a copy of daemon.c,
vis.c, vis.h and sys/cdefs.h. Maybe we should keep those in the distribution?
1996-09-05 16:50:01 +00:00
christos 1949f5ea6b - runio fails when result != 0 not only < 0
- print vis-encoded file in the scanner.
1995-10-29 23:54:45 +00:00
glass 8d3a219347 if the function returns nothing, declare it void 1995-09-16 19:12:14 +00:00
glass 9f5762d576 if the function returns nothing, declare it void 1995-09-16 19:01:25 +00:00
christos 363e119397 - Don't use system(3) to fork processes. It is a big security hole.
- Encode the filenames in the scan files using strvis(3), so filenames
  that contain newlines or other weird characters don't break the scanner.
1995-06-24 16:21:33 +00:00
christos 695670c5fa fixed bug related to the ascii `when' files previous fix, where the -t
option would fail to read the timestamp files.
1995-06-09 04:33:34 +00:00
christos a6d86f0535 Changes to write ascii timestamps in the when files.
Looked into making it 64 bit clean, but it is hopeless.
Added little program to convert from the old timestamp files
into the new ones.
1995-06-03 21:21:48 +00:00
mycroft 4c34be6b52 Clean up deleted files. 1995-03-01 00:00:00 +00:00
cgd f82d05e1d7 always include libcrypt; it's a dummy if exported... 1994-02-27 23:30:34 +00:00
brezak 2dd2888263 Add HAS_POSIX_DIR to CFLAGS. 1994-01-09 17:14:53 +00:00
brezak 0ba3f69cb7 Change <sys/dir.h> to <dirent.h> 1994-01-03 14:47:23 +00:00
brezak be6634a0fb Add __NetBSD__ to __386BSD__ ifdefs 1993-12-06 17:17:37 +00:00
brezak 3e9304df33 Changes from nate for gzip'ed sup 1993-08-04 17:46:14 +00:00
cgd 048389b2ee make package makefiles deal with "all", "clean", and "cleandir" if they
don't already.
1993-07-13 08:12:53 +00:00
brezak af4554d4e0 Close misbehaving connections instead of exiting. 1993-06-22 17:20:23 +00:00
cgd eb192ab885 use daemon() to put supfilesrv into daemon mode... 1993-06-05 21:32:15 +00:00
cgd 0b58ac8cc8 make non-use of "EXPORTABLE_SYSTEM=true" do the right thing;
before, it didn't really check to see if you really did have the
real crypt.c before making a system with crypt.
1993-05-26 12:19:45 +00:00
brezak 8d3b13729a Use EXPORTABLE_SYSTEM=true to build sup w/o crypt 1993-05-25 20:00:47 +00:00
brezak 83cb1e2940 Use /var/tmp for NetBSD 1993-05-24 18:57:48 +00:00
mycroft 01d7c3a029 Clean up deleted files. 1993-05-24 17:57:34 +00:00
brezak 256dbd11db Remove netcrypt.c. Remove unneeded files. Cleanup make. 1993-05-24 17:57:19 +00:00
cgd 0c0fba5509 clean up a bit, and add install target 1993-05-21 15:02:34 +00:00
cgd a1e510b12f initial import of CMU's SUP to NetBSD 1993-05-21 14:52:16 +00:00