if_mtu_SOURCES = if-mtu.c
dist_man_MANS += if-mtu.1
+## getpass
+bin_PROGRAMS += getpass
+getpass_SOURCES = getpass.c
+dist_man_MANS += getpass.1
+
## xtitle
bin_PROGRAMS += xtitle
xtitle_SOURCES = xtitle.c
Package: nsict-utils
Architecture: all
Section: utils
-Depends: mdwopt-perl, nsict-cdb, locking, qmail-checkspam, nsict-mail,
- if-mtu, shadowfix, zz, gorp, splitconf, xtitle, pause, buf, create, inplace,
- stamp, space
+Depends:
+ mdwopt-perl,
+ nsict-cdb,
+ locking,
+ qmail-checkspam,
+ nsict-mail,
+ if-mtu,
+ shadowfix,
+ zz,
+ gorp,
+ splitconf,
+ xtitle,
+ pause,
+ buf,
+ create,
+ inplace,
+ stamp,
+ space,
+ getpass
Description: Dummy package for convenience.
Package: mdwopt-perl
Section: utils
Description: Like cat, but prefixing each line with a datestamp.
+Package: getpass
+Architecture: any
+Section: utils
+Description: Read a password without echoing; write it to stdout.
+
Package: space
Architecture: any
Section: utils
check-sender.1 nsict-mail /usr/share/man/man1
create create /usr/bin
create.1 create /usr/share/man/man1
+getpass getpass /usr/bin
+getpass.1 getpass /usr/share/man/man1
gorp gorp /usr/bin
gorp.1 gorp /usr/share/man/man1
if-mtu if-mtu /usr/bin
--- /dev/null
+.TH getpass 1 "1 April 2008"
+.SH NAME
+getpass \- read a secret string from the user
+.SH SYNOPSIS
+.B getpass
+.RI [ prompt ]
+.SH DESCRIPTION
+The
+.B getpass
+program reads a message from the user without echoing it to the terminal,
+and writes the message to standard output.
+.SH SEE ALSO
+.BR getpass (3).
+.SH AUTHOR
+Mark Wooding <mdw@distorted.org.uk>
--- /dev/null
+#include <unistd.h>
+#include <stdio.h>
+
+int main(int argc, char *argv[])
+{
+ char *p = getpass(argc > 1 ? argv[1] : "Go on: ");
+ if (!p) {
+ perror("getpass");
+ return (1);
+ }
+ puts(p);
+ return (0);
+}