-h, --help option

William Ahern william at 25thandclement.com
Wed Jun 25 07:54:51 EST 2014


On Tue, Jun 24, 2014 at 05:05:47PM -0400, Darren Tucker wrote:
> On Tue, Jun 24, 2014 at 3:56 PM, William Ahern <william at 25thandclement.com>
> wrote:
> >
> > OpenSSH uses chroot, which is technically a BSD extension not in POSIX.
> 
> 
> You have a source for that?  It was in Unix System 7:
> http://plan9.bell-labs.com/7thEdMan/vol1/man2.bun
> and it's in SuSv2:
> http://pubs.opengroup.org/onlinepubs/007908799/xsh/chroot.html
> 

chroot was removed in POSIX.1-2001 / SUSv3.

	B.3.2 System Interfaces Removed in the Previous Version

	The following system interfaces, headers, and external variables
	were removed in the previous version of this standard:

	...
	chroot()

See http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html

The most recent version is POSIX.1-2008 / SUSv4 TC1 (2013), which actually
includes a ton of erstwhile GNU extensions, as Red Hat and other Linux
vendors actively pushed for adoption of glibc interfaces. OpenBSD has been
busy over the past several years slowly adding some of these. I'm surprised
getopt_long never made the cut (or wasn't proposed) given how widely it was
already supported compared to interfaces like fmemopen, which previously
existed nowhere else except on Linux.

But other than maybe RHEL and AIX, nobody supports POSIX.1-2008, not even
Solaris. But POSIX.1-2008 added many functions that people took for granted,
like dirfd, fopendir, strsignal, and mkdtemp.

So POSIX-compatible isn't a very useful term alone. Sticking to POSIX.1-2001
is too limiting, but you can't actually depend on POSIX.1-2008 (definitely
don't define _POSIX_C_SOURCE to 200809 unless you're a masochist) because
then you wouldn't be portable by an stretch of the imagination.



More information about the openssh-unix-dev mailing list