summaryrefslogtreecommitdiffstats
path: root/pw/pw.c
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2004-01-11 18:28:08 +0000
committerIan Dowse <iedowse@FreeBSD.org>2004-01-11 18:28:08 +0000
commitf015270b002b6686a3eaeb3af8327e64fea8230d (patch)
tree48275e17b207b988f32f1ef4aac17025d1edb5a4 /pw/pw.c
parent0a6734e331d26f587416a8cfb2d1296845b67864 (diff)
downloadpw-darwin-f015270b002b6686a3eaeb3af8327e64fea8230d.tar.gz
pw-darwin-f015270b002b6686a3eaeb3af8327e64fea8230d.tar.zst
pw-darwin-f015270b002b6686a3eaeb3af8327e64fea8230d.zip
Add a `-H <fd>' option that is like `-h <fd>', but accepts an already
encrypted password on the specified file descriptor. PR: bin/22033 MFC after: 2 weeks
Diffstat (limited to 'pw/pw.c')
-rw-r--r--pw/pw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pw/pw.c b/pw/pw.c
index 01ba43a..4010e84 100644
--- a/pw/pw.c
+++ b/pw/pw.c
@@ -106,18 +106,18 @@ main(int argc, char *argv[])
static const char *opts[W_NUM][M_NUM] =
{
{ /* user */
- "V:C:qn:u:c:d:e:p:g:G:mk:s:oL:i:w:h:Db:NPy:Y",
+ "V:C:qn:u:c:d:e:p:g:G:mk:s:oL:i:w:h:H:Db:NPy:Y",
"V:C:qn:u:rY",
- "V:C:qn:u:c:d:e:p:g:G:ml:k:s:w:L:h:FNPY",
+ "V:C:qn:u:c:d:e:p:g:G:ml:k:s:w:L:h:H:FNPY",
"V:C:qn:u:FPa7",
"V:C:q",
"V:C:q",
"V:C:q"
},
{ /* grp */
- "V:C:qn:g:h:M:pNPY",
+ "V:C:qn:g:h:H:M:pNPY",
"V:C:qn:g:Y",
- "V:C:qn:g:l:h:FM:m:NPY",
+ "V:C:qn:g:l:h:H:FM:m:NPY",
"V:C:qn:g:FPa",
"V:C:q"
}
@@ -315,6 +315,7 @@ cmdhelp(int mode, int which)
"\t-o duplicate uid ok\n"
"\t-L class user class\n"
"\t-h fd read password on fd\n"
+ "\t-H fd read encrypted password on fd\n"
"\t-Y update NIS maps\n"
"\t-N no update\n"
" Setting defaults:\n"
@@ -357,6 +358,7 @@ cmdhelp(int mode, int which)
"\t-s shell name of login shell\n"
"\t-w method set new password using method\n"
"\t-h fd read password on fd\n"
+ "\t-H fd read encrypted password on fd\n"
"\t-Y update NIS maps\n"
"\t-N no update\n",
"usage: pw usershow [uid|name] [switches]\n"