Commit Graph

7729 Commits

Author SHA1 Message Date
christos
323f38bde6 Coverity CID 2751: Avoid NULL deref. 2006-05-25 00:25:00 +00:00
christos
ddd7ee439d Coverity CID 830: Avoid NULL deref. 2006-05-25 00:21:52 +00:00
christos
ede17ba69d Coverity CID 3322: Fix memory leak. 2006-05-25 00:19:27 +00:00
christos
dabaab767f Coverity CID 1463: Change code to unconfuse coverity. 2006-05-25 00:16:48 +00:00
christos
4eb1ef0701 PR/3205: Remove dead code. 2006-05-25 00:12:31 +00:00
christos
2a8477a7f9 Coverity CID 1860: Plug memory leak. 2006-05-25 00:07:59 +00:00
christos
aa0a3ef501 Sprinkle static and use err/errx/warn instead of fprintf/perror 2006-05-25 00:05:45 +00:00
christos
d62ef54061 Coverity CID 1442: Update the table, and use the table size instead of
hard-coded constant; fixes static buffer overflow.
2006-05-24 23:51:39 +00:00
christos
4f8217f507 Coverity CID 796: Add an extra test to pacify coverity. 2006-05-24 23:44:34 +00:00
christos
aecdec648e Coverity CID 834: Add a test to pacify coverity. 2006-05-24 23:43:11 +00:00
christos
84a9244669 Coverity CID 1753: don't leak fp's. 2006-05-24 23:41:44 +00:00
christos
ecae799d9b Coverity CID 803, 804, 805: Avoid NULL deref. 2006-05-24 23:34:59 +00:00
christos
6968fdf466 Coverity CID 1464: fix static overrun by returning an error. 2006-05-24 22:30:15 +00:00
christos
0b53fe2b9f Coverity CID 3233: Be nice and close the file you opened. 2006-05-24 22:08:53 +00:00
christos
675ee2be81 Coverity CID 2460,2459,2458,2457: Don't allocate smaller chunks, it is not
worth it, and it makes coverity mad. Also check the return of malloc, and
allocate using variables instead of types as the sizeof arg.
2006-05-24 22:07:42 +00:00
christos
10dfada83b Coverity CID 1321: False -gative detection. 2006-05-24 21:47:25 +00:00
christos
2a741c25dc Coverity CID 3777: Free envp in the success case too. 2006-05-24 21:43:43 +00:00
christos
bcab7c84bf Coverity CID 3778: set tmp to NULL to shutup coverity. 2006-05-24 21:42:25 +00:00
christos
bc796bc129 Coverity CID 1567: Fix memory leak. 2006-05-24 21:39:33 +00:00
christos
4c1a6c8705 Coverity CID 3671: Cast close to void and don't close negative fds. 2006-05-23 01:36:36 +00:00
christos
1dc235cd39 Coverity CID 2448: Remove extra NULL check. 2006-05-23 01:29:31 +00:00
christos
ae76bda7d7 Coverity CID 3227, 3226: Don't leak fd's 2006-05-23 01:23:49 +00:00
christos
ce35e5d7d7 Coverity CID 1567: Don't leak memory. 2006-05-23 01:18:19 +00:00
christos
1c2d89173e Coverity CID 2534: Avoid use after free; this cannot really happen, but
coverity cannot figure it out.
2006-05-23 01:16:33 +00:00
uwe
5ea47b2f6b That cast doesn't need to add const. 2006-05-22 20:17:03 +00:00
uwe
5efcb4b549 Use proper cast instead of gagging gcc4 with -Wno-pointer-sign. 2006-05-22 20:06:54 +00:00
mrg
ad76e73707 apply -Wno-pointer-sign to tp.c. 2006-05-22 07:36:52 +00:00
christos
1ab2316281 use warn/warnx instead of perror/fprintf
use get/set progname.
2006-05-21 19:26:43 +00:00
christos
fb4d7a1a6e - fix pointer problems and unsigned int -> int confusion that lead to
undetected errors.
- factor out the socket creation code so that we don't have 4 copies.
- add -p <port> argument
- fix the majority of the lint problems.
- change all the strncpy's to strlcpy's.
2006-05-20 20:03:28 +00:00
christos
b956bc8c52 Add a man page derived from the one in the distribution. 2006-05-15 02:17:43 +00:00
christos
588239e93e We don't have a man page yet. 2006-05-15 00:58:46 +00:00
dyoung
bfd03b170f Build and install wpa_passphrase, the utility for making a WPA
pre-shared key (PSK) from an SSID (802.11 "network name") and a
secret passphrase.
2006-05-14 19:51:15 +00:00
dyoung
c0ef0302c7 If ioctl(SIOCS80211) fails, tell which operation was attempted,
and the ioctl length.
2006-05-14 19:49:22 +00:00
simonb
b8fb2aedbe Sync rc.d file list with etc/rc.d/Makefile, adding ftpd, hostapd, and
irdaattach.
2006-05-14 15:46:40 +00:00
christos
ebebb0245d Another uninitialized var XXX: GCC 2006-05-14 01:26:34 +00:00
christos
87e155c5c7 rename alloc() to emalloc(). 2006-05-13 22:34:50 +00:00
christos
01caf31f3a Cleanup KNF, WARNS=4.
Phew, this started just to make set() static so that coverity does not get
confused.
2006-05-13 20:46:15 +00:00
tron
2d77f6d3d5 Add "iscsi" target which install the iSCSI configuration files.
This will stop e.g. "/etc/security" complaining about these files
missing after a sucessful run of "postinstall"
2006-05-12 12:43:28 +00:00
tron
ef526ff868 Check for and install "/etc/rc.d/iscsi_target". 2006-05-12 07:16:47 +00:00
mrg
bf869c6019 apply -Wno-pointer-sign to print-802_11.c as well. 2006-05-12 02:00:46 +00:00
mrg
e13fd87f5f use -Wno-pointer-sign with GCC4. 2006-05-12 01:54:57 +00:00
mrg
132e581078 remove a couple of extra externs 2006-05-12 01:54:32 +00:00
mrg
accf138991 netbsd authunix_create() actually takes an array of int not gid_t. 2006-05-12 01:28:34 +00:00
mrg
3479c0a6a2 can't fit "256" in an 8bit value, don't have a switch case for it. 2006-05-12 01:27:27 +00:00
mrg
126f7e1139 since ar_tha() can return NULL, don't pass it directly to functions
that expect real addresses.  explicitly KASSERT() that it is not
NULL in the kernel and just avoid using it userland.

(the kernel could be more defensive about this, but, until now it
would have just crashed anyway.)
2006-05-12 01:20:33 +00:00
mrg
16efbf8575 don't do the -Wno-pointer-sign dance for host programs. 2006-05-12 01:18:25 +00:00
mrg
43419a069b sprinkle a little (char *) to quell GCC4. 2006-05-11 23:50:15 +00:00
mrg
aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
mrg
2a5124235b if we are going to cast the 3rd argument to accept_info_request(),
use the right type.
2006-05-11 21:17:02 +00:00
mrg
4a7d55e29a our recvfrom() uses socklen_t *. 2006-05-11 19:25:28 +00:00
tron
203b156add Include "bsd.own.mk" to get the definition of "HAVE_GCC". 2006-05-11 10:32:37 +00:00
mrg
86533d64ca sprinkle some -fno-strict-aliasing with GCC4. 2006-05-11 09:08:09 +00:00
mrg
10c621b36e sprinkle some -Wno-pointer-sign for now. 2006-05-11 08:55:10 +00:00
mrg
9f5cbae0f8 res_search() takes u_char * as 4th argument - pass one. 2006-05-11 08:44:56 +00:00
mrg
757868b20a include <string.h> 2006-05-11 08:44:07 +00:00
mrg
953a812e66 le64 "big endian" is not printable by PRIu64 - cast via (u_int64_t). 2006-05-11 08:43:16 +00:00
mrg
c6d4b90983 use -fno-strict-aliasing with GCC4. 2006-05-11 08:41:07 +00:00
mrg
c48f394145 assign to wd.wd_recvtime rather than casting a pointer to it
to a time_t pointer to call time(3).
2006-05-11 08:40:28 +00:00
mrg
74e0882190 rs_data is u_char *, so assign it from a u_char *. 2006-05-11 08:38:38 +00:00
mrg
c23edde436 inet_ntop() wants char[] not u_char[]. 2006-05-11 08:37:24 +00:00
mrg
9aae0c27f9 u_char -> char for several things:
- inet_ntop()
- if_indextoname()
- variable assignment matching
char -> u_char in one place for variable assignment matching
2006-05-11 08:35:47 +00:00
mrg
5b2e2e784b use -fno-strict-aliasing for dump.c with GCC4 2006-05-11 07:20:19 +00:00
mrg
8f1fc6cc86 use -fno-strict-aliasing for utils.c with GCC4 2006-05-11 07:19:33 +00:00
mrg
58d1fc7bc5 use -fno-strict-aliasing with GCC4. 2006-05-11 07:17:41 +00:00
mrg
c90e965e45 only do the previous for GCC4 2006-05-11 07:15:17 +00:00
mrg
fde08302e9 use -Wno-pointer-sign and -fno-strict-aliasing for now. 2006-05-11 07:13:24 +00:00
mrg
1eb16ad182 properly match char * with char * instead of u_char *. 2006-05-11 07:12:11 +00:00
mrg
9ef684e646 pass an array of gid_t, not int, to getgrouplist(). 2006-05-11 07:11:08 +00:00
mrg
0dc9fb54b5 u_char -> char in one place. 2006-05-11 07:08:40 +00:00
mrg
a7416240a5 add -fno-strict-aliasing when using GCC4. 2006-05-11 07:07:08 +00:00
mrg
3bf6d5997d since i2ostrvis() is passed always passed u_char *, make it so. 2006-05-11 07:02:01 +00:00
mrg
1fa98f5b05 - use socklen_t where appropriate
- avoid lvalue casts
2006-05-11 06:59:40 +00:00
mrg
4bc6feceb6 end the argument list to exec*(3) with a NULL instead of a bare '0', as
the latter isn't a pointer context in these varargs functions.
2006-05-11 00:22:52 +00:00
rpaulo
12d9aaea8c PR 33462: default maxinterval was not being initialized properly.
From Matthias Scheller.

From KAME sources.
2006-05-10 22:30:33 +00:00
mrg
084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
mrg
67c9075410 rename clog to sup_clog. (ugh. we don't even have clog()) 2006-05-10 21:45:40 +00:00
perseant
49b22a9fa1 Fix yesterday's patch: use the correct field when printing partial segment
creation time in the version > 1 case.
2006-05-10 18:47:45 +00:00
perseant
b1c92f5a16 Report segment and partial-segment timestamps correctly on big-endian systems. 2006-05-09 22:20:38 +00:00
mrg
0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
christos
449dbee9f0 Compile with OPENSSL. 2006-05-06 17:51:46 +00:00
rpaulo
de8db47547 Add support for RFC 3542 Adv. Socket API for IPv6 (which obsoletes 2292).
* RFC 3542 isn't binary compatible with RFC 2292.
* RFC 2292 support is on by default but can be disabled.
* update ping6, telnet and traceroute6 to the new API.

From the KAME project (www.kame.net).
Reviewed by core.
2006-05-05 00:03:21 +00:00
skrll
e8f1031be8 RCSId police. 2006-04-28 07:20:39 +00:00
drochner
741f357fc1 Build libpcap-0.9.4 from src/dist.
While there are some open issues, particulary wrt support of old
NetBSD-specific interfaces, it is better to get the code some public
testing before NetBSD-4 is branched.
2006-04-25 18:36:44 +00:00
christos
313c1811bf Coverity CID 1774, 1773: Don't leak open file descriptors or leave temp
file turds on error.
2006-04-25 18:02:02 +00:00
dillo
d67db6407e HOMEPAGE is not required, noted by wiz. 2006-04-25 13:28:10 +00:00
wiz
7f1b30bfd9 Sort. 2006-04-24 22:04:12 +00:00
dsl
f62f858cc2 Coverty CID 1643: free(ino_buf) on error return.
(There is only 1 call to print_inodes(), so it doesn't really matter...)
2006-04-24 21:20:44 +00:00
dsl
666b712c4d Coverty CID 1693: free() buffer used reading fs info.
(I think this leaks 1 buffer per LFS segment being dumped!)
2006-04-24 21:14:59 +00:00
snj
a640fe8c43 It's "its." 2006-04-24 19:00:29 +00:00
dillo
845f7524ad Add support for creating summary file containing all information
about a package repository needed by package managing software.
This allows better use of remote binary package repositories.

Discussed on tech-pkg.
2006-04-24 13:36:22 +00:00
wiz
66784c2d94 Add -T to SYNOPSIS. 2006-04-23 16:51:56 +00:00
wiz
c658b10ae0 Fix typo. 2006-04-23 16:51:18 +00:00
wiz
bffaecaf07 Bump date for previous. Remove trailing comma in SEE ALSO. 2006-04-23 16:50:25 +00:00
christos
98a919c136 Coverity CID 55: Do things in a different order to appease coverity. 2006-04-22 19:57:04 +00:00
wiz
7e78208091 i.e. without a space. PR 33328 by Igor Sobrado. 2006-04-22 19:35:35 +00:00
christos
2e3cc3a126 Coverity CID 174: Add extra NULL test to appease coverity. 2006-04-22 17:40:49 +00:00
christos
d9b764e5f1 Coverity CID 548: Fix resource leak. 2006-04-22 17:38:20 +00:00
christos
be722641b9 Coverity CID 550: Resource leak. 2006-04-22 17:33:55 +00:00
yamt
8613dc06f0 update a comment. 2006-04-21 13:46:37 +00:00
christos
df4a13ef08 New version from David Boggs 2006-04-20 16:53:19 +00:00
blymn
10df330c85 Prefix iostat structure elements with io_ 2006-04-20 12:13:51 +00:00
hannken
52d2a20915 Build and install the man page on all machine archs. 2006-04-20 11:29:08 +00:00
rittera
f672e2e9eb Added the -f firmware information back, but commented it out. Now it should
be easy to add once support for these firmware files is added to NetBSD.
2006-04-20 02:56:42 +00:00
pavel
43bd0b5956 PR 32579: Add a -T flag to syslogd, which causes it to use local time for
messages received from the network. Useful for collecting logs from
devices which do not have correct time.

Add it to usage.

Document it, also document that syslogd adds a timestamp with the local
time if it does not recognize the original timestamp field. Bump date.

Approved by wrstuden@.
2006-04-19 21:18:50 +00:00
martin
36c96e27d5 Backout previous and redo it by eliminating a superflous production
instead - this eliminates the reduce/reduce conflict but leaves the
accepted language alone.
2006-04-19 20:38:49 +00:00
martin
8f6ebaa09e Remove a reduce/reduce conflict by splitting the "assign" non-terminal
into a assign_list one (comma separated list of assigns) and the simple
assign one.
2006-04-19 17:52:24 +00:00
rittera
d4fa82ba2a Removed the entire section on firmware from ndiscvt.8 as I don't think this is
currently working for NetBSD (I don't have any cards available that use the
firmware modules discussed).  I also removed referances to the non-existing
man-pages ndis(4) and ndisapi(9) from FreeBSD.
2006-04-19 17:01:50 +00:00
christos
ab0d027f23 Do the lex/yacc portions the sanctioned way, instead of adding Makefile gunk. 2006-04-19 15:45:21 +00:00
he
14efda3f28 Be sure to prefix explicitly mentioned source files with ${.CURDIR}/,
so that this can build with objects placed elsewhere.
2006-04-19 15:10:40 +00:00
hubertf
0161f34fc6 Bump for today's timeout change in ftpio.c 2006-04-18 20:40:48 +00:00
rittera
be97fc5a95 A number of minor changes for NDIS. (OK'd by phil)
1. Removed the makeoptions line from arch/i386/conf/GENERIC.  Now
ndis_driver_data.h is simply copied into the kernel build directory instead
of editing the config file to specify its location.

2. Uncommented lines in files.i386 and files.pci related to NDIS.  NDIS will
not be compiled into the kernel unless the two lines are uncommented from
GENERIC (I checked using nm), so there is no reason for this to be commented
out.

3. Added ndiscvt to usr.sbin/Makefile.
2006-04-18 16:49:19 +00:00
hubertf
19ef9ca981 unpackURL():
Make timeout mechanism's granularity always per-file (inside package)
instead of per-package (if not -v) or per-file (inside package, if -v).
2006-04-18 13:11:05 +00:00
rpaulo
43c3d200d1 Remove -k. Should no longer be needed. 2006-04-17 20:55:28 +00:00
rpaulo
6e7b39c917 ipwctl is no longer used to load the firmware. 2006-04-17 17:50:51 +00:00
jmmv
b345e2a3a3 WSDISPLAY_CHARFUNCS is gone. 2006-04-15 17:53:03 +00:00
blymn
8cf43bce86 New io statistics collection. 2006-04-14 13:20:48 +00:00
blymn
906131e6f3 Update to use the new kernel io statistics. 2006-04-14 13:14:57 +00:00
christos
71547fcffa Revert part of the previous coverity fix (Urban Boquist) 2006-04-13 21:48:54 +00:00
dsl
c0b0ba1f18 If parameter don't have values, then 'continue' after setting the flag bit.
Fixes coverty CID 776 and removes the need for a 'val = NULL' added to
appease gcc's undefined variable tests.
This parsing code sucks though, it doesn't correctly check for the '='
between a parameter and its value, whitespace can be used instead.
2006-04-12 19:49:59 +00:00
rpaulo
5d6fb58006 Descend into hostapd{,_cli}. 2006-04-12 15:37:48 +00:00
rpaulo
dc8d4a9fd1 Build framework for hostapd. Based on FreeBSD.
hostapd.conf.5 man page still incomplete.
2006-04-12 15:37:07 +00:00
rpaulo
f8258633d6 NetBSD driver for hostapd based on FreeBSD driver. 2006-04-12 15:36:26 +00:00
rpaulo
33dfcd8fe4 Build framework for hostapd_cli. 2006-04-12 15:35:59 +00:00
rpaulo
927a27fefc Pull ../Makefile.inc and override PATH.c.
Adapt to WPA supplicant 0.4.8.
Change the logic behind ENABLE_WPA_SUPPLICANT_EAPOL: it's now enabled by
default (EAP code has been reviewed by FreeBSD folks according to Sam Leffer).
2006-04-12 15:35:34 +00:00
rpaulo
6d70fc8f1b Pull ../Makefile.inc and define PATH.c. 2006-04-12 15:32:45 +00:00
rpaulo
af039b42a3 Don't define .PATH here as it'll be overridden by subdir Makefiles.
Add HOSTAPD_DISTDIR.
2006-04-12 15:31:51 +00:00
rpaulo
179fb23056 New functions/changes required by wpa_supplicant and hostapd 0.4.8. 2006-04-12 15:29:14 +00:00
hubertf
2e3214a0d4 Bump ftp timeout from 10 minutes to 1 hour.
When installing teTeX over a dog slow VPN, this can be necessary.
2006-04-11 10:36:19 +00:00
chuck
d09fe2c467 modified man(1):
- avoid double slashes when displaying man pages (got tired
   of '/usr/share/man//cat1/man.0').
 - got rid of __P() while working on it.
 - incorporate some of my old notes explaining how manpath works into the
   comments of the code itself.
 - renamed some of the vars so that the code is consistent throughout
   (and hopefully clearer and easier to understand)
 - fixed relative man paths for multiple man pages (man did a chdir()
   on the first man page it had to format --- this broke any remaining
   relative path man pages left to process).   save old directory and
   fchdir() back to it after formatting.
 - improved doc on "man -h" which does more than just whatis(1) [e.g.
   "man -h fopen" prints the required include files and the prototypes
   rather than just the one-liner you get with whatis(1)]
 - manconf.c now fills in the "len" length field in the TAG/ENTRY
   structures (man now uses len).

revise man.conf file reading stuff to return error on failure in
addentry/gettag (fka getlist) rather than just err()ing out.   this
allows man(1) to call cleanup and delete its tmp files rather than
just leave them floating.  revise other apps using this code
(makewhatis, apropos, catman, whatis) to expect this.  also remove
__P on updated files.
2006-04-10 14:39:06 +00:00
wiz
91bfc3f2c9 Formatting nits. 2006-04-08 23:05:38 +00:00
reed
0078fc2ced pkg_add also now check for USE_ABI_DEPENDS.
Check if USE_ABI_DEPENDS or IGNORE_RECOMMENDED was set
when this package was built. IGNORE_RECOMMENDED is now historical.

Remove on space in warning (and add "ABI")
so will fit on standard 80 column console.
2006-04-06 06:45:08 +00:00
hubertf
3cdb8f0a5c http_expand_URL(): fclose() the fdopen()'ed filedescriptor
before leaving the function (for all cases).

Actual fix and sanity checking by Dillo & Wiz
Coverity CID 2340
2006-04-05 18:01:20 +00:00
hubertf
a4ff1305f4 When recognizing a broken package version/name,
make sure to error out really, don't just print a warning
and the run into further problems.

Coverity CID 2739.
2006-04-05 17:50:48 +00:00
wiz
9f0633f5c3 Sort options. Add RCS Id. Adapt a bit for NetBSD; needs more work
(e.g. removing kldloader references)
2006-04-04 20:25:14 +00:00
martti
b52bb48fee Fix compilation problems. 2006-04-04 16:18:27 +00:00
wiz
da9647bfba Bump date, so that version in src and pkgsrc have the same
version _and_ the same code.
2006-04-04 06:38:53 +00:00
rittera
9f5b030f1a #included sys/lock.h which is apparently needed in order for ndiscvt to
compile on NetBSD.
2006-04-03 16:29:57 +00:00
christos
3cd2d0576e rename salloc to estrdup. 2006-04-02 01:39:48 +00:00
rpaulo
e288e9d823 Show ECN ECE and CWR flags too. 2006-03-31 10:20:21 +00:00
rittera
6f0360f3e9 applied zul's ndiscvt patch 2006-03-30 23:21:06 +00:00
rittera
9f9573165d added the original files from FreeBSD in usr.sbin/ndiscvt/ 2006-03-30 23:00:02 +00:00
dsl
58cc83950f Remove a splurious check for a NULL pointer (always passed as &struct->member).
Stops Coverty SID:2362 complaint
2006-03-30 21:05:07 +00:00
tron
0b2d4e954a Use sigaction(2) to setup automatic disposal of child processes after
daemonizing. This is more portable and avoids zombie "rpc.statd"
processes after an NFS client running e.g. Mac OS X shuts down.

Reviewed by christos@.
2006-03-28 15:21:00 +00:00
christos
3b6811d33b PR/33123: Murray Armfield: standards compliance & glob.h
Certain fields in glob.h need to be size_t; fix this and version glob(3).
    http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
2006-03-26 18:11:22 +00:00
wiz
2950a17537 Remove last Kerberos 4 support in non-3RDPARTY code. 2006-03-23 23:51:25 +00:00
wiz
417f570853 Remove some more references to kerberosIV. 2006-03-23 21:51:14 +00:00
dogcow
028f696b68 Since KerberosIV has gone away, so should NFSKERB. 2006-03-23 15:37:02 +00:00
riz
a27001b755 Coverity CID 2757: Don't leak memory in error conditions. 2006-03-23 01:27:08 +00:00
bouyer
17cb72c505 In add_secure(), change
(status > 0) to (status == 0 && value). It doesn't make sense to handle value
only if there was an error.
Fix coverity ID 1709.
2006-03-22 19:54:13 +00:00
joerg
368cb1b951 Garbage collect cc in moduser, it is only set once, but never read as
noticed by lint.
2006-03-22 18:02:46 +00:00