-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPORTABILITY
48 lines (40 loc) · 1.93 KB
/
PORTABILITY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pwfilter is written in POSIX compliant Bourne shell. It also requires the POSIX
utility `cat` and the non-POSIX /dev/stdin device file. Nearly all *nixes should
be able to run pwfilter.
== Shells Known To Work
- sh (old AT&T sh and modern variants. e.g. FreeBSD's sh)
- ash (including busybox's)
- bash
- dash
- ksh88
- ksh93
- lksh
- mksh
- pdksh
- posh
- zsh
== Shells Which Will Never Be Supported
This should go without saying, but given that pwfilter is written using Bourne
shell syntax, it will never be able to run in non-Bourne shells. This includes
the C shell family (csh, tcsh) and any "exotic" shells like fish.
== Portability Notes
Chances are good that the default (/bin/sh) will point to a compatible shell.
Though, if you have a choice, I recommend dash; it is sane and /very/ fast.
Some older, commercial *nixes (HP-UX, some versions of IRIX, and possibly
others) do not provide the /dev/stdin device file. Either create a named-pipe at
that location (`mkfifo`) or just avoid piping input into pwfilter and rely on
the --file option for your non-system-default needs.
=== High-Digit UIDs
Traditionally, UIDs/GIDs only went up to 65535; however, some systems allow for
ranges up to at least 4294967295. Some sysadmins may take advantage of this
expanded range to match user ids in other directory services.
POSIX states that shell integers must be a signed long; thus, on 32-bit systems
it's 2147483647 (which is less than 4294967295). Further complicating this, mksh
limits integers to 32-bit regardless of the architecture, while other shells
go so far as to provide 64-bit integers on 32-bit systems.
Thus, before using pwfilter with UIDs > 2147483647 --- especially on 32-bit
systems --- please make sure your shell-of-choice supports 64-bit integers.
== Man Page
pwfilter's man page is written using mdoc (which is largely based off of roff).
Most modern *nixes, with the exception of Solaris, have support to correctly
display mdoc man pages.