Commit Graph

9794 Commits

Author SHA1 Message Date
jmmv cacc05fe11 Drop trailing whitespace. On behalf of me. 2007-11-16 17:31:13 +00:00
christos 7c16cc9e3b From Anon Ymous
- Fix a stupid typo: sizeof(sizeof(a)) isn't very useful.
- Use emalloc(3) and erealloc(3) instead of malloc(3) and realloc(3),
  resp.
2007-11-14 22:06:04 +00:00
jmmv 9d5a9c0d86 Add the atf tools
This adds reachover Makefiles to build and install the atf tools.
Some are public, thus installed in /usr/bin, and others are internal
and therefore installed in /usr/libexec.
2007-11-12 15:00:00 +00:00
cube 66a59dcc4f Don't defattr machinearch if it's NULL. Pointed out by
Juergen Hannken-Illjes.
2007-11-11 17:35:27 +00:00
yamt bea40b2aa3 don't bother to print unmaintained statistics. (m_drops, m_wait) 2007-11-10 12:05:08 +00:00
atatat e1aff854df Put back the NetBSD tag 2007-11-10 03:12:10 +00:00
cube 66796c65e4 Make the "machine" statement define attributes for `machine', `arch' and
all the `subarch' given as parameters.  This is useful in combination with
ifdef...
2007-11-10 00:15:43 +00:00
cube 656cdcc8fb Add support for "ifdef <attribute>" blocks. It goes like this:
ifdef <attr> / ifndef <attr>
elifdef <attr>
elifndef <attr>
else
endif

No indentation is possible for now, it will come later.
2007-11-09 23:41:08 +00:00
plunky e5a7441d16 Add a new utility 'btkey' for managment of Bluetooth Link Keys stored
in the NetBSD key cache (/var/db/bthcid.keys) and Bluetooth controller
memory.
2007-11-09 21:18:22 +00:00
cube baec5c01fc Don't pollute fsopttab with duplicate options for the sake of a test that
has probably been gone for a very long time.  Produces identical output.
2007-11-09 05:21:30 +00:00
cube f51c36b80a - Make include/cinclude/package eat up to the next new-line character.
- Fix casts in getincludepath() and re-work it to ignore the unused end of
  the line.
2007-11-09 05:06:08 +00:00
christos 2668450a7f include stdbool.h instead of typedefing bool to int 2007-11-09 04:11:47 +00:00
wiz ed200f5855 Document the flags displayed by the default format, and mention their short
names. From espie@openbsd via jmc@openbsd.
2007-11-07 23:01:33 +00:00
wiz e2d8a15c15 Make sentence easier to parse. From jsing@openbsd via jmc@openbsd. 2007-11-07 22:27:50 +00:00
dsl bffcdd2c73 Apply the -N (show syscalls by number) to the system return trace.
Change 'USER' to 'MISC' since they get used for misc kernel traces as well.
2007-11-07 22:22:31 +00:00
dsl 1e4971a8ff Verify that the system call is within the negative range before
deciding that it is a 'mach' system call.
XXX - shouldn't this translation only happen for certain emulations?
2007-11-07 22:20:20 +00:00
ad 9b336836df Add -C option to display pool_cache info, eg:
Pool cache statistics.
Name          Spin  Full Empty   PoolLayer  CacheLayer  Hit%    CpuLayer  Hit%
pipepl           0     1     3         385       42862  99.1      985780  95.7
fdescpl          0     0     2         310       31133  99.0     1029620  97.0
cwdipl           0     0     2         310       31227  99.0     1029714  97.0
filepl           0     1     4         680      141415  99.5    24011135  99.4
2007-11-07 00:24:18 +00:00
plunky bbbbeb6a46 use stderr for printing usage messages 2007-11-06 21:35:52 +00:00
ad 73a3bf6536 Don't bias priority by PZERO. 2007-11-06 00:43:25 +00:00
ad 75ab2e6537 Test p_pctcpu instead of p_estcpu (the latter is specific to SCHED_4BSD). 2007-11-05 20:46:08 +00:00
plunky 89eb056b33 remove the lower bound limitation on UUID, it is not necessary or mandated 2007-11-04 09:02:47 +00:00
christos fef32d862e From Anon Ymous: Make this compile without MIME_SUPPORT. 2007-10-30 16:08:11 +00:00
christos e988ecba95 bump date 2007-10-30 02:29:22 +00:00
christos 349d978117 From Anon Ymous:
- Add a "forward" command as requested by garbled@.
  From the manpage:

  forward
	  Takes a list of messages and prompts for an address (or
	  addresses) to forward each message to.  If no message list is
	  specified, the current message is used.  The mail editor is run
	  for each message allowing the user to enter a message that will
	  precede the forward message.  The message is sent as a multi-
	  part/mixed MIME encoded message.

- Add the ability to match messages that do (or do not) contain a
  header field.  E.g., the command "f ! /Subject:" will display the
  list of messages that are missing a "Subject" field.

- Teach savemail() to prefix fake headlines so the mbox doesn't get
  broken.

- Fixed a couple of "bugs" in the attachment editing routine.
2007-10-30 02:28:30 +00:00
christos 2283d346cb From Anon Ymous:
knf changes:
- s/sizeof x/sizeof(x)/.
- remove unnecessary malloc typecasts.
- whitespace nits.
2007-10-29 23:20:37 +00:00
ragge 1990d3d4ad x86 -> i386.
Fix include paths, now compiles.
2007-10-28 10:06:41 +00:00
christos b4403619e0 bump date. 2007-10-27 18:43:37 +00:00
christos 59604b5887 uncomment the group handling documentation. 2007-10-27 18:42:42 +00:00
abs 9e1ca15c9c Add somewhat inelegant logic to handle config.h for now - obviously not
crossbuildable
2007-10-27 18:14:45 +00:00
christos 3670ce19dd - move grutil code to newgrp.
- enable user:group and :group code.
2007-10-27 15:37:45 +00:00
christos 542b6466e3 Move the grutil code from su to here. Requested by ginsbach@ 2007-10-27 15:36:21 +00:00
christos 40a10c757f From Anon Ymous:
- Fix a memory leak in newgrp().  (Noted by ginsbach@.)

- If the new and old groups are the same, addgrp() does nothing so
  exit early.  (Noted by ginsbach@.)

- In newgrp(), if the new group isn't found in the in-core, check the
  group membership list anyway as the in-core list may be full or
  /etc/groups may have been edited since login.  (Requested by
  ginsbach@.)

- Deal with a full in-core group[] array in addgid() rather than
  silently ignoring it and ending up with a group[] array that is
  inconsistent with the current group.

- More explicit error handling in addgroup().
2007-10-27 15:33:25 +00:00
christos 4556f89a2d From Anon Ymous:
- Add a "bounce" command as requested by garbled@.
  From the manpage:

 bounce  Takes a list of messages and prompts for an address to bounce the
         messages to.  All the original header fields are preserved except
         for the ``Delivered-To'', ``X-Original-To'' and ``Status''
         fields.  The new ``To'' field contains the bounce address(es)
         plus any addresses in the old ``To'' field minus the user's local
         address and any on the alternates list.  (See the alternates com-
         mand.)
2007-10-27 15:14:50 +00:00
christos d727506fb5 From Anon Ymous:
- Introduce date_to_tm() and hl_date_to_tm() to parse the date and
  headline date a bit more efficiently.
- If 'tm_isdst' is determined, let strftime(3) handle the '%Z' and
  '%z' formats.  Otherwise, output "-0000" and "???", respectively, to
  help preserve with alignment; strftime(3) will output an empty
  string in these case.
- Change fail() to use the '-d' flag (which sets the 'debug' variable)
  rather than the "debug" _environment_ variable.  This is more
  consistent with other warnings.
- Don't use gcc C extensions, e.g., "case LOW ... HIGH:".
- Define is_WSP() in def.h to be an inline function that for checks
  whitespace (WSP = ' ' or '\t'), as defined in RFC 2822.  Use it
  consistently in place of isblank().
- For consistency, rename skip_blank() to skip_WSP().
- Add inline skip_space() to complement skip_blank() (now skip_WSP).
- Check all ctype(3) calls for argument range issues.
- Whitespace and comment cleanup/changes.
2007-10-23 14:58:43 +00:00
sjg 401ecd47f5 Allow .PATH<suffix> to be used for .include "". 2007-10-22 15:36:13 +00:00
christos 3e94d8f384 Handle 2 digit years, from Anon Ymous 2007-10-19 15:59:55 +00:00
christos 1b946384ef Make the license match to grutil.c 2007-10-18 15:41:50 +00:00
christos e16da7f1bc Put the proper license on this file, using the newgrp.c one. 2007-10-18 13:04:06 +00:00
christos 961c73981f From Anon Ymous:
- general whitespace, lint fixes, error checking
- document the exit status of the command per POSIX
- use the shared with su group adding utilities.
2007-10-17 21:07:49 +00:00
christos 40d5720e00 From Anon Ymous:
- general cleanup [e-funcs, lint fixes, exit values, more error checking]
- add the ability to change the primary group group as login:group, or :group
  *disabled*, until it is discussed.
- remove krb4 code since there is no more krb4 code in the tree.
- also make the old su behave like the pam su: su to the same user, does
  not ask for a password.
- split out shared code into a separate file.
2007-10-17 21:05:39 +00:00
ad 9c3109d6c5 Add _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF for sysconf(). These
are extensions but are provided by many Unix systems.
2007-10-15 14:12:54 +00:00
sjg 1d55b1afc4 If we don't have emalloc, we won't have strndup either.
Allows building current make on 2.0.
2007-10-15 01:07:34 +00:00
apb d15c1edea0 Make it easier for the build environment (such as a configure script)
to override the default shell:

* Rename _BASENAME_DEFSHELL to DEFSHELL_CUSTOM, because it's no longer
  always a basename, it might be a full path;
* Rename DEFSHELL to DEFSHELL_INDEX, because it's actually an index into
  an array;
* Provide symbolic names for the possible values if DEFSHELL_INDEX;
* Document how the build environment may set DEFSHELL_INDEX or
  DEFSHELL_CUSTOM to choose the default shell;
* Move the fallback definition of DEFSHELL_INDEX from config.h to job.c,
  because it's used only in job.c.

Discussed with sjg.
2007-10-14 20:22:53 +00:00
jnemeth ba708bffb8 typo 2007-10-14 11:30:37 +00:00
lukem 5a1df86c01 Convert to using raise_default_signal(3). 2007-10-14 11:21:32 +00:00
lukem bd560fde31 Convert to using raise_default_signal(3). 2007-10-14 04:54:34 +00:00
apb ec2d191f5e Revert to revision 1.128. Now that the Var* functions no longer try to
write into const strings, it's safe to pass a truly constant string to
Var_Subst.
2007-10-13 20:01:33 +00:00
apb 7da86686ca Don't write into const strings; not even if we intend to
reinstate the original contents later.
2007-10-13 19:59:52 +00:00
christos a59b81d6d8 strlen returns size_t 2007-10-13 18:28:35 +00:00
apb 67bb324312 * Convert all uses of strdup() to estrdup();
* Use estrndup() in a few cases where it simplifies the code;
* Provide compatibility definitions of strndup and estrndup;
2007-10-13 16:16:41 +00:00
apb 781e1efd0c Oops, missed a few more comments in previous. 2007-10-13 14:32:18 +00:00
apb a8bf2a2f8a Correct documentation for Var_Parse's freePtr arg. It's a pointer to
the thing to be freed (or NULL if nothing to free), not to a pointer to
boolean saying whether or not to free the result.
2007-10-13 13:54:06 +00:00
dsl 5dc59d0d4b When processing .include "../../foo.mk" lexically process the leading ../
against the directory name of the makefile being processed.
Shortens a lot of pathnames (especially in pkgsrc) and significantly
reduces the number of duplicate entries in .MAKE.MAKEFILES
2007-10-13 11:08:05 +00:00
dsl 5651920158 The 'job_prefix' string can be static but not const 'hi xtos'. 2007-10-13 08:58:48 +00:00
dsl fad077a68d If we are going to save the names of all opened makefiles, do so when files
are first processed, not for every line of every loop inside the file.
When (attempting) to check for duplicate names, use the spaces between names
as separators rather than using strstr() - which is slow and wont find
duplicates after an incorect early match.
However the duplicate check is rather broken (especially for pkgsrc) where
names like ../../devel/atk/../../devel/glib2/../../devel/gettext-lib/ \
../../devel/gettext-lib/../../mk/buildlink3/../../mk/bsd.prefs.mk
which need (some form of) realpath() processing.
'cd pkgsrc/xaa/gtk2; make show-var VARNAME=.MAKE.MAKEFILES' shows the problem.
2007-10-12 23:38:27 +00:00
christos 0f19d8c420 static a const string. 2007-10-12 23:13:16 +00:00
christos 31bed26f71 improve on previous 2007-10-12 23:07:04 +00:00
dsl bb4beef604 Var_Subst() seems to write into its input string! So we do need a copy. 2007-10-12 22:49:36 +00:00
dsl 215593ad6c Remove tmp[] buffer and strncpy() call. 2007-10-12 21:47:25 +00:00
sjg 1050c04a22 If _BASENAME_DEFSHELL is defined, it might be a full path,
in which case we should not prepend _PATH_DEFSHELLDIR.
2007-10-11 21:19:28 +00:00
ginsbach 18072a963c More code clean up (KNF): de-__P and ANSI'ify function declarations 2007-10-11 03:42:38 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
ginsbach 09b20b9b68 - add const qualifiers where necessary
- remove unnecessary argument from error(); first argument was always NULL
[changes mostly from FreeBSD]
2007-10-10 02:34:18 +00:00
sjg 3a5409e4eb Fix an off-by-one error in handing mal-formed modifiers.
The issue seems to have been present for some time, only showed up
when running unit-tests on SunOS.
Make sure we get an error message, but otherwise behave as before.
2007-10-09 05:55:03 +00:00
sjg e73405e272 Use .MAKE.MAKEFILES to track all the makefiles that have been read
so they can be used in dependency rules.
2007-10-08 20:26:36 +00:00
christos 3833b1d829 call sysconf, before add paths. From Kurt Schreiner 2007-10-08 12:51:21 +00:00
christos 33631b9b4a call xfree instead of free so that we don't bring in libc's free. 2007-10-08 00:15:05 +00:00
ginsbach 8b26595b3a Changes for standards compliance:
- "If no $set directive is specified in a message text source file,
   all messages shall be located in an implementation-defined default
   message set NL_SETD."
- The n argument to $delset indicates the set number which should be
  in the range 1 to NL_SETMAX.

Standards: The Open Group Base Specifications Issue 6
           IEEE Std 1003.1, 2004 Edition
2007-10-06 02:55:56 +00:00
sjg f28827375c Add the ability to .export variables to the environment. 2007-10-05 15:27:45 +00:00
christos 76f3e041b7 don't zero out the wrong pointer. from Anon Ymous 2007-10-05 14:48:10 +00:00
lukem c9c455bf1d Convert to using raise_default_signal(3). 2007-10-05 07:36:45 +00:00
lukem 5d427989ff Convert to raise_default_signal(3). 2007-10-05 07:27:41 +00:00
lukem db822d2217 Convert to using raise_default_signal(3). 2007-10-05 07:22:23 +00:00
christos 790ed387b2 Use warnx(3) not warn(3); timegm(3) does not set errno. Use the
unconverted time if the date is invalid. (from Anon Ymous)
2007-10-04 17:05:01 +00:00
christos f704726942 Fix reversed test (from Anon Ymous) 2007-10-04 14:05:45 +00:00
sjg 216e9ba475 Add the ability to tweak the token output before targets in job mode.
Eg.
.MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}]
would produce
---make[1234] target ---
2007-10-01 22:14:09 +00:00
uwe 17bb5b2554 tlst[inptype(...)] is bad C code because inptype() can realloc tlst
and there's no intermediate sequence point!  We actually hit this on
sh3 with -O2 where gcc4 caches tlst in a register prior to recursive
call to inptype() and if you are unlucky the recursive call needs to
realloc tlst.

Introduce a temp variable to force a sequence point.
2007-09-28 21:53:50 +00:00
uwe 7a8181d0dc Revert 1.34 (CFLAGS+=-g) that have been commited by mistake (hi, xtos). 2007-09-25 21:28:26 +00:00
lukem a213122ebe remove unnecessary #include 2007-09-25 04:36:30 +00:00
lukem 1db82cf8e6 revert previous thinko 2007-09-25 04:10:12 +00:00
lukem 2212f6b672 remove unnecessary #include 2007-09-25 04:09:03 +00:00
plunky 04ced1f2dd new lines for new sentences 2007-09-24 19:29:01 +00:00
abs a49e168197 Initial version of reachover Makefiles for pcc 2007-09-21 21:10:54 +00:00
ragge d141d2a094 Needs errno.h if !gcc. 2007-09-16 18:44:19 +00:00
christos ecde76d5ff Support obsolete zone info in date field. (See obs_zone of RFC 2822,
sec 4.3.) from Anon Ymous
2007-09-12 13:09:46 +00:00
cube 7a185660d8 Some more licence clean up. 2007-09-10 10:54:20 +00:00
christos b1749a12b7 PR/36957: sm: whois does not follow AfriNIC referral 2007-09-09 18:31:45 +00:00
christos c3b08dc40f PR/36955: Ighighi: Use fseeko instead of fseek. 2007-09-09 12:20:27 +00:00
dyoung ca1b22492a Bug fix: filed.fd_ofiles is always a pointer to the open files
table, so always read the table from kernel virtual memory at that
address.  Do not ever try to read the table from filed0.fd_dfiles,
because it just isn't necessary, and sometimes we read a stale
table from there.
2007-09-09 01:26:55 +00:00
cube 14a82de83a Improve the structure of the man page to make it more usual, with the hope
that people might actually read it some day.  Yeah, I know, dream on, dream
on.

Thanks schmonz@ for a quick english check.
2007-09-09 00:35:14 +00:00
rmind 2cecf9bbe9 Implementation of POSIX message queues.
Reviewed by: <ad>, <tech-kern>
2007-09-07 18:56:02 +00:00
jnemeth b408277b4f PR/36867 - Zafer Aydogan -- trsp is no longer 2007-08-30 18:56:51 +00:00
jnemeth e98c476705 bump date 2007-08-30 18:52:36 +00:00
jnemeth 1ff05f7784 PR/36867 - Zafer Aydogan -- trsp is no longer 2007-08-30 18:51:32 +00:00
hubertf a1bb1e3040 aspell 2007-08-27 21:58:16 +00:00
dsl 932f8298e3 Remove 'U' (was scheduler activations) from the list of default trace points. 2007-08-27 16:35:47 +00:00
reed d256941473 Add author's names for two books. 2007-08-27 14:34:17 +00:00
reed 2680c8169c 3 typos/mispellings.
A lot more to do in here as many spellings are wrong or inconsistent.
2007-08-24 14:35:17 +00:00
reed 85a0c6744d Edit the "Women get the vote" entry to say "get the right to vote".
(Since "get the vote" doesn't tell much here about how a legislator
made the last vote to put this in effect.)
And so this calendar entry mentions U.S. also mention the 19th
Amendment to US Constitution.
2007-08-24 14:28:04 +00:00
lukem f1fbb660ed Cast the field precision calculation to int.
Should fix the amd64 build problem noticed by Paul Goyette.
2007-08-22 23:47:13 +00:00
christos 02f63bec71 change error printing to signed for consistency. From Anon Ymous 2007-08-22 16:59:19 +00:00
lukem 91c7169d78 Improve parsing of chunked transfer chunks per RFC2616:
* more stringent chunk-size parsing
* ignore optional trailing ';chunk-ext' stuff, instead of barfing
* detect EOF before final \r\n.
2007-08-22 06:51:41 +00:00
dogcow fc68757006 A prophylactic patch: change offsetof -> blkoffsetof 2007-08-22 03:42:06 +00:00
christos dc2a5030fc provide more detailed messages with -l. From Anon Ymous 2007-08-21 14:09:53 +00:00
perry e34be9798b Never use "utilize". It means exactly the same thing as "use", but it
is longer and more cumbersome. It can always be replaced with "use"
without any change in meaning.
2007-08-20 16:07:05 +00:00
christos 3f074821a5 Apparently seeking forward on a FIFO does not work (why?). Read instead.
Patch from Jukka Salmi.
2007-08-20 03:44:17 +00:00
christos c40c743211 deal with non-regular files. 2007-08-19 10:31:13 +00:00
oster 53ff49720c Fix a display problem observed when transitioning from "nn processes" to
"n processes" (and "nnn" to "nn", and so forth...)
2007-08-17 21:49:26 +00:00
reed 4f402e3972 Add the year for:
08/15  Beatles replace drummer Pete Best with Richard Starkey, 1962
(While http://en.wikipedia.org/wiki/Ringo_Starr
says this happened on August 16 not the 15th.)
2007-08-14 13:15:06 +00:00
rillig 3911c95333 A small word can sometimes express things clearer ... 2007-08-13 06:14:08 +00:00
agc babe0fc9d8 Apply fix from PR 35283 from David Holland:
ensure that kdump properly escapes newlines in argv
2007-08-08 20:28:11 +00:00
lukem 394f30e855 reorder location of "-s srcaddr" in synopsis 2007-08-06 04:42:13 +00:00
lukem cf78066d81 Update version for:
Replace  HAVE_SOCKADDR_SA_LEN  with defined(HAVE_STRUCT_SOCKADDR_SA_LEN
2007-08-06 03:41:14 +00:00
yamt a67f31f445 remove nqnfs leftovers. 2007-08-05 22:06:14 +00:00
reed 3a6e61c6ab Remove "that" from a long calendar entry that wrapped over two lines.
While there remove a "that" from another entry too.
2007-08-04 15:14:05 +00:00
ad f8239b2e5b Deal correctly with mulithreaded processes. Among other problems this mixed
up return values for system calls between threads, leading to much confusion.
2007-08-01 21:39:36 +00:00
pavel c723e7a07c Add xref to sockstat, from Zafer Aydogan in PR misc/36706.
Bump date.
2007-07-30 19:59:42 +00:00
reed cd2b62d931 Add lastlogin(8) to see also. 2007-07-27 16:59:25 +00:00
christos 8c26d38e7b WARNS=4, pass lint 2007-07-22 17:03:13 +00:00
lukem 6470c9506d Replace HAVE_SOCKADDR_SA_LEN with defined(HAVE_STRUCT_SOCKADDR_SA_LEN) 2007-07-22 05:02:50 +00:00
ad 9a40651fc7 VM_MAP_BUSY, VM_MAP_WANTLOCK are no more. 2007-07-21 20:54:12 +00:00
dyoung 458b31be33 rt_key() is no more. Use rt_getkey(). 2007-07-19 20:51:04 +00:00
daniel 02dcfb175e Add the '-E' option to interpret regexes as extended regexes. While we
are here, fix ordering in usage information by putting '-X' in the proper
place.

Addition of '-E' was discussed on tech-userlevel.
2007-07-19 07:49:30 +00:00
lukem 9159f5b246 Support an explicit Q_error return from inquire(), which is returned
if there was an error on reading the reply.
Stops an infinite loop if you ^D the query.
2007-07-19 05:43:23 +00:00
lukem 00ff9c6dba Document about:ftp and about:version. 2007-07-18 06:40:01 +00:00
lukem 3ae239d786 Attempt to raise the default signal handler (SIG_DFL) when exiting
because of a signal, rather than just relying upon _exit(2).
2007-07-18 01:32:33 +00:00
lukem 2c1030d08e Attempt to raise the default signal handler (SIG_DFL) when exiting because
of a signal, rather than just relying upon exit(3).
2007-07-18 01:13:42 +00:00
lukem a93b9bed51 Remove duplicate printing of program name in panic().
Remove now-unnecessary global variable "namep".
2007-07-18 01:06:08 +00:00
christos 6660b4f3b5 eliminate MFSTYPENAME 2007-07-17 21:36:18 +00:00
christos b1b89f5d46 eliminate MFSNAMELEN 2007-07-17 21:35:29 +00:00
christos 9d497371ab PR/36644: Edgar Fuss: vacation does not work if homedir not present
Don't care about it failing if all paths needed are absolute.
2007-07-13 14:52:15 +00:00
christos 0ec618debc bump warns to 4. 2007-07-13 13:22:05 +00:00
christos 3a2d5ef17c PR/36643: Edgar Fu: -m missing from getopt.
While there:
- mark usage noreturn
- remove prototype for main
2007-07-13 13:21:49 +00:00
ad 75ff053010 Make netstat build again. I don't see why it has any business dumping
the raw contents of tcpcb but that's another story.
2007-07-10 21:12:32 +00:00
christos 9b2b49a478 off by one fix from Anon Ymous 2007-07-07 18:04:17 +00:00
christos 68a6fb4652 protect against null. 2007-07-07 17:53:13 +00:00
christos c9033e1918 Don't expand % escapes in headers. 2007-07-06 20:14:33 +00:00
agc ca741c4a3f Fix minor grammar nit. 2007-07-05 19:44:02 +00:00
christos d4e1d48f81 Anon Ymous says that this should fix the lwp display core-dump. 2007-07-04 18:27:46 +00:00
christos b3af16c2d3 PR/36583: Aleksey Cheusov: /usr/bin/cut: -[bcf] positions are limited to 2048
Fix provided by Anon Ymous.
2007-07-02 18:41:03 +00:00
rumble 6912898dc8 Add read-only support for SGI's Extent File System.
Reviewed by pooka@.
2007-06-29 23:30:16 +00:00
dmcmahill 096f2d0ee4 Replace "awk" with "${AWK:-awk}".
Needed to be able to cross-build on systems with a feeble awk (SunOS-5.9
for example).  Example error message is:
awk: record `#define CTL_IPPROTO_...' has too many fields
 record number 404
2007-06-29 16:39:51 +00:00
joerg 12929bba43 - When compiling nbinstall for the tool chain, use the target strip
and not /usr/bin/strip. This makes nbinstall usable for
  cross-compiling in pkgsrc.
- Fix a typo in a comment.
- Fix strip() in the context of (v)fork:
  - Build the argument string first using asprintf (simpler) and
    avoid leaking memory from the child in the parent.
  - Don't use warn in the child, as stdio should be avoided.

OK christos@, tested on Solaris by dmcmahill@.
2007-06-28 19:05:55 +00:00
christos a45a783fdb - use fwrite instead of printf.
- pass lint
- check for 0 len.
2007-06-24 23:23:10 +00:00
ginsbach c82c323deb Add the newgrp(1) utility, which changes effective group ID. This
is a POSIX (IEEE Std 1003.1, 2004 / Open Group Base Specifications
Issue 6) User Portability Utility.
2007-06-21 14:09:23 +00:00
dsl 53bf780833 Under DEBUG(VAR) report when the variable wasn't found.
Disposes of pr bin/15842
2007-06-16 19:47:29 +00:00
christos c5d61cf88b call setprogname(); from anon ymous. 2007-06-13 19:39:54 +00:00
wiz cce3a1d216 Improve description of EXIT CODES. Based on the following OpenBSD commit,
forwarded by jmc@openbsd:
----------------------------
revision 1.14
date: 2007/05/20 23:15:57;  author: jmc;  state: Exp;  lines: +19 -18
rewrite DIAGNOSTICS to avoid confusion about which application returns
what, and when;

started by Jeffrey 'jf' Lim, with some correction from Ingo Schwarze;
ok otto
----------------------------
2007-06-08 18:20:42 +00:00
briggs ac798ebce1 Dynamically allocate the buffer used for reading data from the input
handle and default to 64k instead of the 1k (BUFSIZ) static buffer.
This makes a large difference in performance of some applications.
Make the buffer size tunable from the command line.
2007-06-06 17:49:14 +00:00
christos 41101b58c8 Add RCSID's to help files and centralize the function to cat the help files. 2007-06-05 17:50:22 +00:00
lukem d5855ca07b Enforce restriction that (http) proxied URL fetchs don't support
being restarted at this time.
PR #28697.
2007-06-05 00:31:20 +00:00
christos c3f4be5b97 make sure we have args before we try to parse numbers in the compat argument
parsing. From Gary Duzan
2007-06-03 22:39:21 +00:00
dsl 5a557927e4 When displaying 'KTR_USER' data, exclude the header from the length, don't
enclose in ", and output using the hexdump function if -x (or -X) given.
2007-06-01 19:05:50 +00:00
jschauma e1925bdef9 Add a new command-line option "-n chunk_count", that splits the input
file into chunk_count smaller files.  Each file will be size/chunk_count
bytes large, with whatever spillover there is ending up in the chunk_counth
file.
2007-05-31 01:35:35 +00:00
christos 3d9ab41d78 - getopt parsing
- add raw mode [-r]
- add -g and -m to get the goal and max respectively.
- document that lines that start with a period or look like mail headers
  don't get formatted.
2007-05-29 15:27:37 +00:00
tls 36a21907e2 Since Christos cleaned up the use of libc internals here, we can switch
these from USE_SSP to USE_FORT as they should be.
2007-05-28 18:12:06 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos 8231a12bf8 remove the rest of the libc cruft. 2007-05-26 23:00:22 +00:00
christos 26cf69237f This does not appear to need rpc_generic.c 2007-05-26 22:58:43 +00:00
ad 085b4a04e0 Add new keys to the help screen. 2007-05-24 20:09:44 +00:00
ad 009dcab90b - Allow a single process to be selected by pid.
- Add a 'thread mode' that displays LWPs.
2007-05-24 20:04:04 +00:00
lukem f4f2ed1c79 Display times in RFC2822 form rather than using ctime(3), since
the former is more explicit about the timezone offset.
2007-05-24 05:05:18 +00:00
lukem 6ca11a7da7 Revert previous "64bit fix" because it actually removed desired functionality.
Instead, use the appropriate format specifier & cast to display the time_t.
2007-05-24 02:51:41 +00:00
dsl 1752887780 Delete some comments that refer to long-extinct code. 2007-05-23 19:03:56 +00:00
tnn fd95c698a3 Unbreak debug printf on 64-bit arches. 2007-05-22 18:02:18 +00:00
lukem 3ba7505832 * main: call tzset() to ensure TZ is setup for other <time.h> functions.
* remotemodtime(): use strptime() to parse the reply.
* fetch_url(): ensure struct tm is zeroed before calling strptime().
2007-05-22 05:16:48 +00:00
dogcow 2fa8120f7e fallout from si_sigval -> si_value 2007-05-21 19:29:44 +00:00
christos be632c9205 make this compile again. Thanks Kurt Schreiner. 2007-05-19 15:35:04 +00:00
lukem c007c5280e * Modify parse_url() to consistently strip the leading `/' off ftp URLs.
Fixes PR 17617.
* Use 'RFCnnnn' (with leading 0) instead of 'RFC nnnn', to be
  consistent with the style in the RFC index.
* Refer to RFC3916 instead of 1738 or 2732.
* Expand the list of supported RFCs in ftp(1) to contain the document
  name as well.
2007-05-15 23:54:18 +00:00
veego 9ec62257da Using ${NETBSDSRCDIR} requires <bsd.own.mk> 2007-05-13 20:22:45 +00:00
dsl e934daaae7 Enable the code that adds global constants to every kernel object file
that uses each configuration parameter.
This will stop kernel objects build with different options (that come from
config files) being linked together or loaded as a LKM.
Currently some options that have an effect on the kernel DDI/KI are passed
directly as parameters to cc.
An aim (for anyone adequately bored) would be to reduce the number of these
constants that appear in each .o file.  .o files with the same constants
should be sharable between kernels (even between XEN and i386).
2007-05-12 10:15:31 +00:00
dsl c1079eace9 Use '.equ' instead of '.set' when defining global constants.
On alpha '.set' has a non-standard purpose.
2007-05-10 21:01:14 +00:00
lukem 8b1e1fad90 Switch from fparseln() to the internal getline() when parsing HTTP headers.
Makes ftp a bit more portable (not needing fparseln()) at the expense of not
supporting arbitrary long header lines, which I'm not concerned about
because we don't support header line continuation either...
2007-05-10 12:22:04 +00:00
lukem aeb5730de8 Replace references from draft-ietf-ftpext-mlst-NN to RFC 3659. 2007-05-10 05:59:30 +00:00
lukem 2294f71cef Use getline() instead of fparseln() 2007-05-10 05:35:31 +00:00
lukem 82552a7668 Implement copy_bytes() to copy bytes from one fd to another via the
provided buffer, with optional rate-limiting and hash-mark printing,
using one loop and handle short writes.
Refactor sendrequest() and recvrequest() to use copy_data().
Addresses PR 15943.
2007-05-10 05:17:10 +00:00
christos 81d59b255c PR/36294: De Zeurkous: login(1) -- inconsistent exit behavior on EOF
- Always EXIT_FAILURE when login fails.
- Cleanup fork code in krb5 (old login).
2007-05-09 01:56:25 +00:00
jnemeth 2e994af332 Display a message indicating who's password is being changed, as per
Jeremy Reed on tech-userlevel.
2007-05-06 09:19:44 +00:00
martin 0c85e08d0f const-as-const-can: make the "suffixes" pointers const, as probably was
intended, but done wrong originally (redundant const was removed
per PR bin/36280)
2007-05-05 18:09:24 +00:00
christos ac6a20066f PR/36280: Christer Folkesson: Remove extra const 2007-05-05 16:57:54 +00:00
christos d0d49a5805 PR/36278: David A. Holland: hard-coded paths in finger 2007-05-05 16:55:17 +00:00
rmind 0994dd0691 - Create sysctl nodes for AIO.
- Add POSIX defined system variables and constants of AIO_LISTIO_MAX and
  AIO_MAX values.  Both with _POSIX_ASYNCHRONOUS_IO, provide them in
  sysconf(3) and getconf(1) interfaces.
- Clean up sysconf(3) for handling sysctl nodes dynamically.
2007-05-01 01:01:25 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
mlelstv 0de32b854f Fall back to kvm interface for protocols that do not yet
offer a sysctl interface. Fixes PR bin/36210.
2007-04-27 18:37:53 +00:00
tron b25d1b890f Correct documentation:
NetBSD 4.0 will be the first release which supports digital transfer
mode. The feature made it into this release because of the rebranch.

This fixes PR bin/36199 by Andreas Burghardt.
2007-04-23 11:47:55 +00:00
dsl 858e924206 Fix 64bit build, strlen() doesn't return int. 2007-04-21 10:39:30 +00:00
plunky f5db72e7b7 Add 'service level' security for L2CAP and RFCOMM connections, following
the Linux (BlueZ) API.

    - L2CAP or RFCOMM connections can require the baseband radio link
    mode be any of:
	authenticated (devices are paired)
	encrypted (implies authentication)
	secured (encryption, plus generate new link key)

    - for sockets, the mode is set using setsockopt(2) and the socket
    connection will be aborted if the mode change fails.

    - mode settings will be applied during connection establishment, and
    for safety, we enter a wait state and will only proceed when the mode
    settings are successfuly set.

    - It is possible to change the mode on already open connections, but
    not possible to guarantee that data already queued (from either end)
    will not be delivered. (this is a feature, not a bug)

    - bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
    "secure" options

    - btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
    keyboards (which are required to support it)
2007-04-21 06:15:22 +00:00
christos a173e99af6 Bring in xargs from FreeBSD to gain -I, -J etc. but keep our GNU compatible
exit values.
2007-04-18 15:56:06 +00:00
lukem bab591a531 fix rev 1.144: initconn() may be called with verbose==-1 (e.g., during remote
completion), so only print out the successful EPSV response if verbose>0.
2007-04-18 01:50:45 +00:00
lukem 036f5d17ed Clean up use of confirm() and mbort() so that the current operation
is always passed in (instead of depending upon the 'mname' global).
For confirm(), if the second argument is NULL print the "Continue with <cmd>"
prompt.  This fixes up the the display of interrupted prompts.
2007-04-18 01:39:04 +00:00
christos 80cd289830 provide _POSIX2_LINE_MAX if not there. 2007-04-17 20:30:29 +00:00
lukem 8a06b9bff0 * Implement -s srcaddr; uses srcaddr as the local IP address for all
connections.
  Based on code in the version of ftp that FreeBSD had before they
  replaced it with lukemftp.
* Move error message handling into ftp_connect() rather than in the
  caller, so that more specific error reporting can occur.
* Improve consistency of various warning and error messages.
2007-04-17 05:52:03 +00:00
lukem 31835c3a13 Replace a "while" with an "if" since the code path only gets executed once. 2007-04-16 00:43:43 +00:00
plunky f824358540 use { | } for required alternates 2007-04-14 09:28:39 +00:00
plunky a68c837f26 use \*[Le] for <= 2007-04-14 09:22:51 +00:00
plunky 668aa7df44 fix mdoc warning: use -width instead of -column 2007-04-13 18:15:21 +00:00
lukem 3d05e3a2bc Update example to use KiB per recent change to ../ftp/progressbar.c 2007-04-12 06:31:20 +00:00
lukem 7898b5e0a8 Use the IEC 60027-2 2^n based "KiB", "MiB", "GiB", (etc)
suffixes for byte displays since we're using 2^n scaling,
instead of the SI 10^n based "KB", "MB", "GB" (etc).
2007-04-12 06:13:02 +00:00
lukem 98b66d0b78 Fix using /usr/bin/ftp as a slave process on the end of a pipe by calling
fflush(stdout) before each command.
Taken from FreeBSD's pre-lukemftp version of ftp.
2007-04-12 04:25:00 +00:00
lukem 00e5aa03ea whitespace pedantry 2007-04-12 04:18:22 +00:00
lukem b1e08b00c3 Various fixes from Nicholas Marriott sent to openbsd-tech and in private email:
* Prevent segfault if a .netrc token is too long.
* Prevent segfault when using a macro from an empty macdef.
* Check more return values.
2007-04-12 01:28:13 +00:00
lukem ea73350dac Suppress printing non-COMPLETE reply strings from EPSV and EPRT, as we're
going to fall back to PASV / PORT (respectively) if the former fail,
and this avoids printing a failure reply followed by a success reply.
Should fix a problem with the emacs ftp wrapper.
2007-04-11 05:03:25 +00:00
lukem 7aab13aa67 Revert rename of "debug" command from "ftp_debug" back to "debug". 2007-04-11 04:40:19 +00:00
lukem 06cab527ea getpass() can return NULL upon error in some implementations
(as documented in older standards documents, before the API was obsoleted).
Problem observed in tnftp on Solaris by Emil Mikulic.
2007-04-11 00:52:38 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
cube bfc250f292 Add some sanity checking in order to avoid some segfaults. There might be
other ways of producing a segfault, but keep in mind those happens when the
negation applies to an erroneous instance.
2007-04-06 19:21:09 +00:00
christos fc1f18e6ca kill clobbered warning from Tobias Nygren 2007-04-05 14:11:35 +00:00
lukem b234edd83d * Support reading multiple keys with the same name if '-D' is given,
using db->seq() and match comparison rather than db->get().
* Deleting multiple keys of the same name appears to already work as-is
  with a single db->del() call; I had code to implement this if '-D'
  is given but it appears to be unnecessary.
* Cosmetic/KNF tweaks.
2007-04-03 04:52:32 +00:00
plunky 89f52265ce fix warnings produced by -Wextra
fix warnings produced by lack of const
2007-03-31 07:14:44 +00:00
plunky 8238f45994 fix warnings produced by -Wextra 2007-03-30 21:25:00 +00:00
dillo 42b1cd44dc Make example consistent (fix typo in file names). 2007-03-24 23:16:11 +00:00
erh de96a26e31 Allow the -l (long format) option to be used with pkill too. 2007-03-21 20:05:18 +00:00
hubertf b1eaefe397 Xref shuffle(1) from random(6), and vice versa 2007-03-20 16:12:40 +00:00
njoly f7ed257809 When decoding ioctl commands type; do not output non printable
characters, but the corresponding hexadecimal values.

ok by christos
2007-03-19 18:51:09 +00:00
mlelstv 0e442136ae allow time to be specified as 'now' instead of 'now + 0 minutes'
and avoid a rounding error for this case.
2007-03-12 21:28:48 +00:00
hubertf ac4dc31da1 - removes unused ctype.h headers
- ANSI'fy prototype for main() function

From: Slava Semushin <php-coder@altlinux.ru>, with minfor fixes by me
2007-03-10 00:22:57 +00:00
hubertf cfb51b951e Move #include <libgen.h> from tip.h to the place where it's really needed.
From: Slava Semushin <php-coder@altlinux.ru>
2007-03-09 23:45:21 +00:00
wiz 08287ce407 Remove macrobreaking whitespace. 2007-03-08 21:23:00 +00:00
plunky ca0b33b2ff cut and paste error meant you could only use "-s <num>" as the last
option on the commandline..
2007-03-08 19:13:14 +00:00
plunky e55e3c248c only turn off input processing if it is on 2007-03-08 19:10:49 +00:00
liamjfoy 5e73ba0829 Add new IPv6 Fast Forward statistics 2007-03-07 22:22:50 +00:00
dillo 56c3e41252 Complete rename of hfsp to hfs, requested by thorpej. 2007-03-06 11:28:44 +00:00
dillo 2d2ddd2830 Integrate apmlabel and HFS+ file system. 2007-03-05 23:19:17 +00:00
he b2898f296c Add two more ioctl values which are the same. 2007-03-05 17:38:25 +00:00
christos d4a3b72ad2 add casts. 2007-03-04 09:43:54 +00:00
wiz d8d952c242 Fix typo. 2007-03-02 20:45:45 +00:00
plunky d7e75bcc12 rework the -c and -s options to make them a bit more consistent.
when EOF is reached, we are done.
2007-03-01 21:44:30 +00:00
ad 487f0ed78f Remove ref to SA. 2007-02-27 12:42:00 +00:00
matt d6dd160750 Make -p, -l, and -c exclusive (any one turns off the other two). 2007-02-26 21:56:17 +00:00
matt c77dd0a2cb .include <bsd.own.mk> 2007-02-26 00:17:37 +00:00
matt 902dda5b53 Add '-c' option for csh-style time output. Use the csh time format code
to print the new csh-style time output.
2007-02-24 21:30:27 +00:00
dsl 69a5cd957a Don't increment 'cp' twice when looking for commands following ';' on a
dependency line.
This makes the line "foo:;echo bar" not try to execute "cho bar", and the
line "baz:;" not treat the rest of the makefile as commands.
Pointed out by Takahiro Kambe on current-users.
2007-02-24 17:55:54 +00:00
hubertf e730edb6a7 Be a good citizen and close files that are no longer used.
Also s/exit/return/;

Filedescriptor patch from Slava Semushin <slava.semushin@gmail.com>,
return-change and testing by me.
2007-02-21 20:45:27 +00:00
hubertf 4c60e998e1 pw_lock(3): ``You should finish writing to and close the file descriptor
returned by pw_lock() before calling pw_mkdb().'' While there, also
close another open file descriptor that's no longer used.

Patch from Slava Semushin <slava.semushin@gmail.com>, tested by me.
2007-02-21 20:32:10 +00:00
hubertf f2799c52e5 <ctype.h> is unused. What's still needed is <sys/cdefs.h> (which is
usually included at that place anyways).

From Slava Semushin <slava.semushin@gmail.com>.
2007-02-21 20:15:17 +00:00
rmind 07f5c15ae5 Enable sdiff(1) in usr.bin, disable GNU sdiff(1).
lists seems to be compatible.
2007-02-18 22:44:44 +00:00
rmind 5533f1ebfd PR/34630: GNU sdiff(1) replacement
Import new sdiff(1). Compatible with GNU sdiff(1), has various bugfixes
and licensed in public domain.

christos@: "I am ok with it"
No objections in tech-userlevel@
2007-02-18 22:13:42 +00:00
dsl eebb2036b8 Document 'systat syscall'. 2007-02-18 17:29:26 +00:00
dsl 49c5f0e9e5 Include code to display per system call counts and times. 2007-02-18 17:00:08 +00:00
hubertf 96ed6e7862 Make this compile after TSEL() const poisoning
OK'd by dyoung@
2007-02-18 01:56:17 +00:00
pavel f5e7ca2447 Revert the changes done after newlock2 merge, except for the removal of
the now unused LSDEAD state. The current kernel headers are now
source-compatible with pre-newlock2 kernel headers again.

Approved by Andrew Doran.
2007-02-17 22:49:56 +00:00
hubertf 94c137d519 Teach 'cut -c' about multibyte characters. Fixes PR 34244,
using the patch from the PR and some hacking by myself to avoid code
redundancy.

Passes the regression tests I've added.

(How many weeks of purgatory do I get for the cpp(1) hack to avoid
 code redundancy? I guess I can always say it was inspired by some old
 version of our md5 sources...)
2007-02-17 19:10:00 +00:00
wiz 8571efaf27 Bump date for previous. 2007-02-17 09:39:11 +00:00
plunky d00be208b6 expand list of service classes that we know 2007-02-17 09:19:06 +00:00
hubertf 6a0e6d5715 Moved ctype.h from header to source file in usr.bin/tip.
Also removed unused getopt header.

Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
2007-02-16 20:25:33 +00:00
dogcow 60918448c9 dipotre -> dioptre.
(nobody's noticed this typo since the file was originally added in 1993...)
2007-02-15 22:37:27 +00:00
christos bccb1cb6c7 bump version, from Anon Ymous 2007-02-15 17:18:15 +00:00
reed a87b66bd95 Add "catman" to the SEE ALSO. 2007-02-10 19:27:39 +00:00
ad 8966ad6a93 Further changes to use compat process flags mapped by sysctl. To be
revisited soon.
2007-02-10 18:20:12 +00:00
ad 401499f30e Sync with kernel changes introduced by merging the newlock2 branch. 2007-02-09 22:08:48 +00:00