Commit Graph

7868 Commits

Author SHA1 Message Date
lukem ed83e0847a add DPADD 2005-01-08 09:54:36 +00:00
christos 68adb09d42 - avoid calling pam_end twice if pam failed in fatal
- make fatal proper macros
- fix typos in comments
- fix logical error initializing pam
XXX: Seems to work now, but the whole process is awkward.
Asking for an ssh passphrase and using this to do unix authentication is wrong.
Falling back to the old style auth is awkward. We should really provide a
pam_rootauth module if we want to support that.
2005-01-08 08:45:53 +00:00
kim 61f9450361 Make -w flag apply to the WHAT field also (command and args).
Use at most half of ttywidth for WHERE field (hostname) instead
of a hardcoded maximum width.  (XXX: this is still not a good
default for displays under 80 columns.  Should probably count
the width of all the other columns, using 8 for the WHAT field.)
2005-01-08 05:08:53 +00:00
kim 2bb4a74034 Line up "days" style output in the IDLE field. 2005-01-08 05:04:34 +00:00
kim ee64b0d712 The w command does not display a CPU time, so don't talk about it. 2005-01-08 04:58:08 +00:00
yamt 075d5146c6 correct examples. 2005-01-08 03:46:05 +00:00
ginsbach 02d2680603 getuid() returns a uid_t not int, so make uid uid_t. 2005-01-08 03:23:15 +00:00
manu e628e84aaa Add PAM support to su 2005-01-07 22:34:20 +00:00
lukem 9683394bbb fix copyright year 2005-01-04 23:59:11 +00:00
fredb 6eda52d041 Invoke "join" using POSIX syntax. Should fix a problem cross-building from
Linux reported to tech-toolchain by Jesse Off.
2005-01-04 18:09:33 +00:00
lukem b918fc0803 Forbid filenames returned from mget that aren't in (or below) the
current directory.
The previous behaviour (of trusting the remote server's response when
retrieving the list of files to mget with prompting disabled) has been
in ftp ~forever, and has been a "known issue" for a long time.
Recently an advisory was published by D.J. Bernstein on behalf of
Yosef Klein warning of the problems with the previous behaviour, so
to alleviate concern I've fixed this with a sledgehammer.

Remember the local cwd after any operation which may change it.
Use "remotecwd" instead of "remotepwd".
2005-01-03 09:50:09 +00:00
lukem 4d41fe6044 Style/consistency cleanup:
* libcrypto & libz are provided by ../Makefile.inc
* <bsd.own.mk> isn't required by most of these
* be consistent in the layout
2005-01-03 06:05:50 +00:00
lukem ecfeee924b Use the public libssh that's now available. 2005-01-03 06:04:08 +00:00
wiz 59461d12f9 Add RCS Id, bump date for when it appeared in NetBSD, mention
NetBSD appearance in HISTORY section, fmt a paragraph.
2005-01-02 18:41:23 +00:00
christos 5f325e6da0 Shift assignment operators were handled incorrectly. On 64 bit machines,
unsigned long x, y;
	x <<= y;
always produces a warning because y is casted to int. Handle them instead
the same way as regular shifts.
2005-01-02 17:59:47 +00:00
thorpej 7ec7b5b2f6 Add a getextattr(1)/setextattr(1)/rmextattr(1)/lsextattr(1) utility
that gets, sets, removes, and lists file system extended attributes.

From FreeBSD.
2005-01-02 17:55:48 +00:00
christos 2f2c6dc261 say from what type to what time we are converting. 2005-01-02 10:40:49 +00:00
yamt 712038f82a sync with kernel. (vm_map_entry::flags) 2005-01-01 21:17:47 +00:00
atatat fa01c2e835 Add "dirname"- and "basename"-like functionality to stat(1) by way of
the "high" and "low" selectors on the filename.
2004-12-31 03:24:31 +00:00
christos f3ff62b84d Add comments in the pmake style, and factor out a local variable.
No functional change.
2004-12-29 01:55:25 +00:00
christos 8415275dbd Dir_MTime did not search for a file using the correct parh; i.e. it was
ignoring suffix-specific path search. So if a node was marked .MADE,
then suffix rules would not be applied to it, and we would look for
the file only in the default path, not the suffix-specific path.

XXX: Now that we looked for the suffix, we can save it in the GNode,
but we don't do this yet.
2004-12-29 00:43:02 +00:00
atatat 4b9429a08d Attack of the whiteout police, including the "fix whitespace problems"
department followed by the "and fix the the ifdefs as well" brigade,
leading to a janitorial "just combine those two" strike team.
2004-12-28 05:11:07 +00:00
wiz 3c75d39ba0 New sentence, new line. Add a comma. 2004-12-23 01:55:30 +00:00
christos 25c67c975f Fix usage, and call setprogname()! 2004-12-22 17:20:30 +00:00
christos 5df4136a03 PR/28751: Ed Ravin: Limit host field output by default to 35 characters so
that things don't wrap. Add -w flag to enable full output. Delete mention
of the old and not supported flags. This was 11 years ago, and very few
people even remember what these flags did.
2004-12-22 17:16:07 +00:00
lha c2e518e56e Only include Kerberos 4 headers when compiling in a Kerberos enviroment
From Jukka Salmi in NetBSD PR misc/28727
2004-12-22 01:28:56 +00:00
lha a0dab7aa39 Move linking with libdes to the common kerberos section since
libtelnet depends on the old des functions.

From Jukka Salmi in NetBSD pr misc/28727
2004-12-22 01:25:05 +00:00
yamt 8676c37c10 scmp: don't discard const qualifiers needlessly. 2004-12-21 11:33:07 +00:00
ginsbach e736e1e0c5 Dead code clean up:
* The function speed(), imported from 4.4BSD-Lite2, has never been
  used by NetBSD.  Obtained from FreeBSD.
* Finish removing -L (litout) option.  This has not been supported
  since rev. 1.5 (NetBSD 1.0).  The option still appeared in the
  usage and man page.  Obtained from FreeBSD.
* In function doit(), dead code imported from 4.4BSD-Lite2, dealing
  with termios.  NetBSD cracked this nut differently long before this
  import.  Obtained from FreeBSD.
2004-12-21 02:39:00 +00:00
dsainty 555352630f Correct typo in an error message: allocatior -> allocator 2004-12-20 08:20:50 +00:00
atatat 63fae01c7d Slurp in the struct mount at vp->v_mount and the struct specinfo at
vp->v_specinfo to get the proper st_dev and st_rdev numbers.  We're
already picking over the kernel, so let's do it right.  That means
also asserting the file type for the /dev/pts directory (S_IFDIR) and
nodes therein (S_IFCHR).

Remove getptsmajor(), since we no longer need it.  Besides, it was
being used wrongly.
2004-12-14 03:10:23 +00:00
atatat a92869d7ef Cast fst.fileid to unsigned long and print it as such. Inode numbers
are never negative.
2004-12-14 03:09:24 +00:00
christos 09c258b188 Add ptyfs. 2004-12-12 22:41:03 +00:00
aymeric 8d1f13638c . wait only for 10 ms instead of 100 ms before updating the screen
. fix a variable reuse bug

It has been broken since the conversion from select() to poll().
2004-12-10 16:27:29 +00:00
lukem a76c6e6173 * Always decode %xx in a url's user & pass components.
* Only remember {WWW,Proxy}-Authenticate "Basic" challenges; no point
  in tracking any others since ftp doesn't support them.
* Improve the parsing of HTTP responses.
2004-12-10 06:44:15 +00:00
mycroft 33131ab95f Fix an array overrun in option parsing.
Fixes PR 26732, PR 26775, PR 28416 and PR 28589.
2004-12-09 18:06:10 +00:00
wiz b7ceeca8dd New sentence, new line. Bump date for **. 2004-12-08 15:44:21 +00:00
jmc 40c0737463 Fixed for PR#28581. If stdin is the input stream, fstat it and check if it's
file. If so, use it's mtime for the mtime in the header. Otherwise use
time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as well.
2004-12-08 06:38:40 +00:00
jwise 8e40de5fcb Since we fall back to /etc/calendar now (if present), put that path properly
in pathnames.h.
2004-12-07 16:47:32 +00:00
jwise 4f1d9bdb73 Play with calendar syntax a little, allowing both of month and day
to be wildcarded.

As a side effect, this allows '**' in the date field to match every
day of the year, which is very useful for TODO items.

It's important to note that the syntax has a lot of hardcoded (and
undocumented) ambiguity resolution stuff, and is crying out for a
simplification, and maybe some use of yacc and lex.

When this is done, a minor flag day (and probably a compatibility
flag :-( ) should be included, for current users who are making
use of some of the corner cases.  I'll raise this on tech-userlevel
before going there.  CVS:
----------------------------------------------------------------------
2004-12-06 20:38:43 +00:00
snj d4d8a90495 Remove a duplicate entry. 2004-12-06 06:33:03 +00:00
lukem e3fa45c35e add some HISTORY about the inspiration for this command 2004-12-03 23:05:32 +00:00
ginsbach b275490943 Remove stray ; in comment. 2004-12-02 21:46:52 +00:00
wiz 5dfef2f2bd Fix typo. 2004-12-01 12:03:55 +00:00
wiz 2f78a9f782 Fix typo reported by Jeff Ito in PR 28496. 2004-12-01 12:02:08 +00:00
wiz 7b04d43e4c Document -x, from Jeff Ito in PR 28494.
While here, sort options and fix various minor stuff.
2004-12-01 12:01:05 +00:00
perry e45cb21451 Mike Cheponis noted that I didn't list the edition of Knuth that the
page number refers to. Fixed.
2004-12-01 00:03:45 +00:00
wiz c6dfed6dc5 Sort options in SYNOPSIS, bump date for -x, and misc. cleanup. 2004-11-30 10:41:20 +00:00
wiz 53693aebe6 Add -x to usage and to getopt options string (hi Jim!). 2004-11-30 10:39:53 +00:00
christos 67a132acdc PR/28474: Geoff C. Wing: write does some weird checking and can't handle ptyfs 2004-11-30 04:08:38 +00:00
jwise 69de851d35 Now that cpp(1) understands the CPP_RESTRICTED environment variable, set
that before invoking cpp -- and provide (with appropriate man page warnings)
an option to run cpp without this set.
2004-11-30 01:54:17 +00:00
wiz 68f709428b Bump date for new calendar searching behaviour; new sentence, new line. 2004-11-29 20:22:31 +00:00
jwise fe72e40594 Note switch to searching home directory, and add a note to the COMPATIBILITY
section describing how to get the historical behavior.
2004-11-29 18:33:45 +00:00
jwise e7f10875fa On further thought, always search for calendar files in the caller's home
directory when called directly (this was already done for calendar -a, by
definition).

Old behavior is still available by setting "CALENDAR_DIR=.".
2004-11-29 18:25:14 +00:00
jwise 9720571221 Note new behavior for finding calendar files when none specifically given. 2004-11-29 17:58:07 +00:00
jwise d728174e30 Instead of searching only for a calendar file named `calendar' in the current
directory, use the first found of:

	./calendar
	./.calendar
	/etc/calendar

Note that currently only the first found of these is used (so that users may
override a system calendar placed in /etc if desired).  Users who want can always
use #include to continue the chain...
2004-11-29 17:03:43 +00:00
lukem 77966ade4d WARNS=3 2004-11-29 05:02:52 +00:00
lukem 7fde79333c Improve printing of various items to be more human-readable.
Display all the supported databases in the usage.
2004-11-29 05:02:40 +00:00
lukem 6d8ce32cbf Implement "services" 2004-11-29 04:13:15 +00:00
wiz bd8c343563 No dot at end of SEE ALSO. 2004-11-26 10:15:37 +00:00
lukem 309eefda19 implement "protocols" 2004-11-26 05:07:12 +00:00
lukem f6f918f7c3 implement "networks" 2004-11-26 04:52:45 +00:00
ginsbach 1468e327a8 Fix what appears to be a typo in the description. 2004-11-24 16:37:44 +00:00
aymeric 0339e1e087 bump version: coredump fixed when autocompleting a filename wider than screen 2004-11-23 14:36:50 +00:00
aymeric 0b416121a6 Move a line of code which was "obviously" misplaced.
This fixes a core dump when auto-completing filenames and at least one of the
file names is larger than the screen width.

Bug report and fix by Peter Bex in PR#28382
2004-11-23 14:35:45 +00:00
wiz db85937f2b "..." does not need to be quoted. 2004-11-23 09:06:24 +00:00
lukem 10f5ef24c1 add getent(1) 2004-11-23 07:35:38 +00:00
lukem 6fc4e8553d getent(1) - get entries from administrative database. 2004-11-23 07:35:06 +00:00
simonb e38c2f36ba Show more information about page types in use, and free pages. 2004-11-23 03:11:33 +00:00
peter 2c12af6a77 Sort options, standardize usage message.
ok wiz@
2004-11-22 17:34:24 +00:00
peter 75e76988cc WARNS=3 clean. 2004-11-22 17:32:08 +00:00
peter cd2105a43a Add some missing static/const.
ok wiz@
2004-11-22 17:31:38 +00:00
peter 52f947197e ANSIfy & KNF.
ok wiz@
2004-11-22 17:28:58 +00:00
peter 3a0b5da47f Print the correct usage message for whoami(1) and groups(1).
ok wiz@
2004-11-22 17:21:36 +00:00
peter 1a4cb94e52 Sort options.
ok wiz@
2004-11-22 17:20:02 +00:00
grant 0bfb4106b0 no trailing comma at end of enum. 2004-11-20 06:40:01 +00:00
grant 3e28f586c0 +pkgsrc/OSF1 2004-11-20 06:37:15 +00:00
christos ccd2e5bea8 use sockaddr_snprintf() 2004-11-19 21:41:25 +00:00
wiz a65671d259 Remove some whitespace. 2004-11-19 18:41:00 +00:00
peter 5dc9788b36 Fix a typo, dependancy -> dependency
ok wiz@
2004-11-19 14:18:53 +00:00
peter e8ec0dc16f id(1) -p supports optional [user] arg;
from matthew clarke via OpenBSD

ok wiz@
2004-11-19 14:18:01 +00:00
christos 6b2a6f8a02 Be a bit more careful with errors; if you cannot find the pty to stat for
time, then report ? instead of the previous random contents of struct stat.
2004-11-19 13:17:06 +00:00
matt d0560e80c6 When adding text due to an a, c, or i command, don't eat the space(s) at
the beginning of the lines since the addition is supposed to be "verbatim".
Fix a comment for compile_text indicating it's also used for the 'c' command.
2004-11-17 22:17:54 +00:00
wiz 9f522a4dd3 Merge single-letter options; sync order in man page and usage. 2004-11-17 14:57:48 +00:00
itojun da88342476 NI_WITHSCOPEID was not picked up by IETF standardization process 2004-11-16 06:04:12 +00:00
itojun b95181fc9b NI_WITHSCOPEID was not picked up by IETF standardization process. 2004-11-16 05:59:32 +00:00
christos 81726ab7e3 Print the full pty name; reported by atatat 2004-11-16 04:52:46 +00:00
christos 4a9bb0c8f3 Add a -a option to pass the host address of the host we logged in from in
addition to the host name. This option is needed by programs suchs as
telnetd, because at the point they invoke login, they already have opened
a pty, and the stdin of login is no longer the socket connected to the
remote host. In addition don't chop the hostname up to the first dot if
the domain matches. These practices are 70's fashion and they only serve
to lose information. These days we have long enough fields in utmpx and
wtmpx to store the full names.
2004-11-14 18:01:21 +00:00
christos 692346d6f0 PR/28264: Miles Nordin: finger does not consult utmp if a username is specified 2004-11-12 21:48:58 +00:00
wiz 4050e4b376 Add -n to usage. 2004-11-11 01:01:22 +00:00
wiz c62efc1052 Options without arguments are combined in SYNOPSIS; new sentence, new line. 2004-11-11 01:00:34 +00:00
christos 8583098c75 Add -n flag to print numeric entries. 2004-11-11 00:54:23 +00:00
christos 280dbafe67 PR/28185: Brian Marcotte: w command broken when user specified 2004-11-11 00:09:07 +00:00
christos 51beb09565 Kill remnant function decl. 2004-11-10 20:26:43 +00:00
christos bdba0e8400 Add V_PTY 2004-11-10 17:54:47 +00:00
christos c7ead5d42d Don't print just two characters for the tty; change the field width of the
tty to 7.
2004-11-10 16:58:10 +00:00
wiz 0ff196cd8a pathconf(2), not (3). 2004-11-10 13:43:39 +00:00
lukem 8a5e21e9cf Document where the system_var and path_var variable names are determined from. 2004-11-10 04:29:56 +00:00
lukem 246f6fd919 Implement sysconf(3) _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX for
the 1003.1-2001 Thread Safe Functions (TSF) getgrnam_r(3) and getpwnam_r(3).

These are not implemented in sysctl(3) "user.*", since that adds a lot
of complexity in the implementation for no real benefit.
2004-11-10 04:02:52 +00:00
lukem d7ef73e561 fix an error message 2004-11-10 00:29:07 +00:00