mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
Compare commits
7 commits
21731dd45e
...
68c89f4a43
Author | SHA1 | Date | |
---|---|---|---|
|
68c89f4a43 | ||
|
b849349e0c | ||
|
242e1dc552 | ||
|
ed318aac59 | ||
|
0bfa3ffcb4 | ||
|
d4938f099d | ||
|
e05e30eaca |
10 changed files with 116 additions and 65 deletions
|
@ -12,10 +12,7 @@ acid, truss, trump \- debugger
|
||||||
.B -m
|
.B -m
|
||||||
.I machine
|
.I machine
|
||||||
] [
|
] [
|
||||||
.I pid
|
.I pid | textfile | pid textfile
|
||||||
]
|
|
||||||
[
|
|
||||||
.I textfile
|
|
||||||
]
|
]
|
||||||
.PP
|
.PP
|
||||||
.B acid
|
.B acid
|
||||||
|
@ -27,10 +24,7 @@ acid, truss, trump \- debugger
|
||||||
.B -l
|
.B -l
|
||||||
.B trump
|
.B trump
|
||||||
[
|
[
|
||||||
.I pid
|
.I pid | textfile | pid textfile
|
||||||
]
|
|
||||||
[
|
|
||||||
.I textfile
|
|
||||||
]
|
]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.I Acid
|
.I Acid
|
||||||
|
@ -38,9 +32,9 @@ is a programmable symbolic debugger.
|
||||||
It can inspect one or more processes that share an address space.
|
It can inspect one or more processes that share an address space.
|
||||||
A program to be debugged may be specified by the process id of
|
A program to be debugged may be specified by the process id of
|
||||||
a running or defunct process,
|
a running or defunct process,
|
||||||
or by the name of the program's text file
|
or by the name of the program's text file. Both a pid and a file
|
||||||
.RB ( 8.out
|
may be specified to supply debugging information for a process
|
||||||
by default).
|
ran from a stripped binary.
|
||||||
At the prompt,
|
At the prompt,
|
||||||
.I acid
|
.I acid
|
||||||
will store function definitions or print the value of expressions.
|
will store function definitions or print the value of expressions.
|
||||||
|
|
57
sys/man/1/totp
Normal file
57
sys/man/1/totp
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
.TH TOTP 1
|
||||||
|
.SH NAME
|
||||||
|
auth/userpasswd, auth/totp \- authentication agent
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.PP
|
||||||
|
.B auth/userpasswd
|
||||||
|
.I fmt
|
||||||
|
.PP
|
||||||
|
.B auth/totp
|
||||||
|
[
|
||||||
|
.B -k
|
||||||
|
.I pattern
|
||||||
|
] | [
|
||||||
|
.B label
|
||||||
|
]
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
.I Totp
|
||||||
|
queries and prints the
|
||||||
|
.B RFC 6238
|
||||||
|
TOTP code
|
||||||
|
for the specified key tuple.
|
||||||
|
The key tuple is selected using the provided label.
|
||||||
|
This can be used to authenticate with services that require time based OTP.
|
||||||
|
.PP
|
||||||
|
.I Userpasswd
|
||||||
|
queries and prints a cleartext user/password pair from factotum
|
||||||
|
for the
|
||||||
|
.B proto=pass
|
||||||
|
key tuple specified in
|
||||||
|
.IR fmt .
|
||||||
|
This can be used by shell scripts to do cleartext password
|
||||||
|
authentication.
|
||||||
|
Using plain password authentication with factotum is discouraged,
|
||||||
|
as it reveals the secrets in plain text.
|
||||||
|
.SH EXAMPLES
|
||||||
|
.PP
|
||||||
|
Adding a TOTP key to factotum:
|
||||||
|
.IP
|
||||||
|
.EX
|
||||||
|
% echo 'key label=mylabel secret=ABCDEF123456' \\
|
||||||
|
> /mnt/factotum/ctl
|
||||||
|
.EE
|
||||||
|
.PP
|
||||||
|
Generating a TOTP key from factotum:
|
||||||
|
.IP
|
||||||
|
.EX
|
||||||
|
% auth/totp mylabel
|
||||||
|
012345
|
||||||
|
.EE
|
||||||
|
.PP
|
||||||
|
Retrieving a password from factotum:
|
||||||
|
.IP
|
||||||
|
.EX
|
||||||
|
% auth/userpasswd 'server=setec service=ssh user=ori'
|
||||||
|
toomanysecrets
|
||||||
|
.EE
|
|
@ -8,37 +8,45 @@ vdiff \- a visual diff viewer
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
.B -p
|
.B -p
|
||||||
.I strip
|
.I nstrip
|
||||||
|
]
|
||||||
|
[
|
||||||
|
.I file
|
||||||
]
|
]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.I vdiff
|
.I vdiff
|
||||||
reads unified diff output from standard input and displays a colored version. Each file diff is displayed in a separate block that can be collapsed by a click on the file name. Right clicking on a line will send a
|
reads unified diff output from
|
||||||
|
.I file
|
||||||
|
or standard input and displays a colored version.
|
||||||
|
Each file within the diff is displayed in a separate block that can be collapsed by clicking on the file name.
|
||||||
|
Right clicking on a line will send a
|
||||||
.IR plumb (6)
|
.IR plumb (6)
|
||||||
message to the
|
message to the
|
||||||
.B edit
|
.B edit
|
||||||
port. Pressing
|
port.
|
||||||
|
Pressing
|
||||||
.B q
|
.B q
|
||||||
or
|
or
|
||||||
.B del
|
.B del
|
||||||
will exit
|
will exit
|
||||||
.B vdiff.
|
.I vdiff.
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.B \-b
|
.B -b
|
||||||
flag changes the color scheme to white text on a black background.
|
flag changes the color scheme to white text on a black background.
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.B \-p
|
.B -p
|
||||||
.I nstrip
|
|
||||||
flag removes
|
flag removes
|
||||||
.I nstrip
|
.I nstrip
|
||||||
path elements from path before plumbing.
|
path elements from the path before plumbing.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
% git/diff |vdiff
|
.EX
|
||||||
|
% git/diff | vdiff
|
||||||
|
.EE
|
||||||
.SH SOURCE
|
.SH SOURCE
|
||||||
/sys/src/cmd/vdiff.c
|
.B /sys/src/cmd/vdiff.c
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.IR diff (1)
|
.IR diff (1)
|
||||||
.SH HISTORY
|
.SH HISTORY
|
||||||
vdiff first appeared in 9front (January, 2024).
|
vdiff first appeared in 9front (January, 2024).
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.TH FACTOTUM 4
|
.TH FACTOTUM 4
|
||||||
.SH NAME
|
.SH NAME
|
||||||
factotum, fgui, userpasswd, totp \- authentication agent
|
factotum, fgui \- authentication agent
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B auth/factotum
|
.B auth/factotum
|
||||||
[
|
[
|
||||||
|
@ -23,17 +23,6 @@ factotum, fgui, userpasswd, totp \- authentication agent
|
||||||
.B ...
|
.B ...
|
||||||
.PP
|
.PP
|
||||||
.B auth/fgui
|
.B auth/fgui
|
||||||
.PP
|
|
||||||
.B auth/userpasswd
|
|
||||||
.I fmt
|
|
||||||
.PP
|
|
||||||
.B auth/totp
|
|
||||||
[
|
|
||||||
.B -k
|
|
||||||
.I pattern
|
|
||||||
] | [
|
|
||||||
.B label
|
|
||||||
]
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.I Factotum
|
.I Factotum
|
||||||
is a user-level file system that
|
is a user-level file system that
|
||||||
|
@ -257,24 +246,6 @@ and
|
||||||
For each requests, it unhides itself and waits for
|
For each requests, it unhides itself and waits for
|
||||||
user input.
|
user input.
|
||||||
See the sections on key confirmation and key prompting below.
|
See the sections on key confirmation and key prompting below.
|
||||||
.PP
|
|
||||||
.I Userpasswd
|
|
||||||
queries and prints a cleartext user/password pair from factotum
|
|
||||||
for the
|
|
||||||
.B proto=pass
|
|
||||||
key tuple specified in
|
|
||||||
.IR fmt .
|
|
||||||
This can be used by shell scripts to do cleartext password
|
|
||||||
authentication.
|
|
||||||
.PP
|
|
||||||
.I Totp
|
|
||||||
queries and prints an
|
|
||||||
.B RFC 6238
|
|
||||||
TOTP code
|
|
||||||
for the
|
|
||||||
.B proto=totp
|
|
||||||
key tuple specified.
|
|
||||||
This can be used to authenticate with services that require time based OTP.
|
|
||||||
.SS "Key Tuples
|
.SS "Key Tuples
|
||||||
.PP
|
.PP
|
||||||
A
|
A
|
||||||
|
|
|
@ -89,6 +89,7 @@ places windows but does not mediate programs' access to the display device.
|
||||||
Other files are unique to
|
Other files are unique to
|
||||||
.IR rio .
|
.IR rio .
|
||||||
.TF window
|
.TF window
|
||||||
|
.PD
|
||||||
.TP
|
.TP
|
||||||
.B cons
|
.B cons
|
||||||
a virtual version of the standard terminal file from
|
a virtual version of the standard terminal file from
|
||||||
|
|
|
@ -1184,14 +1184,22 @@ rhubwrite(Ep *ep, void *a, long n)
|
||||||
if(port > 0){
|
if(port > 0){
|
||||||
dev->rhresetport = 0;
|
dev->rhresetport = 0;
|
||||||
|
|
||||||
/* some controllers have to clear reset and set enable manually */
|
/*
|
||||||
|
* Some controllers have to clear reset and set enable manually.
|
||||||
|
* We assume that clearing reset will transition the bus from
|
||||||
|
* SE0 to idle state, and setting enable starts transmitting
|
||||||
|
* SOF packets (keep alive).
|
||||||
|
*
|
||||||
|
* The delay between clearing reset and setting enable must
|
||||||
|
* not exceed 3ms as this makes devices suspend themselfs.
|
||||||
|
*/
|
||||||
if(hp->portreset != nil){
|
if(hp->portreset != nil){
|
||||||
(*hp->portreset)(hp, port, 0);
|
(*hp->portreset)(hp, port, 0);
|
||||||
tsleep(&up->sleep, return0, nil, 50);
|
tsleep(&up->sleep, return0, nil, 2);
|
||||||
}
|
}
|
||||||
if(hp->portenable != nil){
|
if(hp->portenable != nil){
|
||||||
(*hp->portenable)(hp, port, 1);
|
(*hp->portenable)(hp, port, 1);
|
||||||
tsleep(&up->sleep, return0, nil, 50);
|
tsleep(&up->sleep, return0, nil, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ void loadmoduleobjtype(void);
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprint(2, "usage: acid [-kqw] [-l library] [-m machine] [pid] [file]\n");
|
fprint(2, "usage: acid [-kqw] [-l library] [-m machine] [pid | textfile | pid textfile]\n");
|
||||||
exits("usage");
|
exits("usage");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
argv0 = argv[0];
|
argv0 = argv[0];
|
||||||
pid = 0;
|
pid = 0;
|
||||||
aout = "8.out";
|
aout = nil;
|
||||||
quiet = 1;
|
quiet = 1;
|
||||||
|
|
||||||
mtype = 0;
|
mtype = 0;
|
||||||
|
@ -81,6 +81,8 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
aout = argv[0];
|
aout = argv[0];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
fmtinstall('x', xfmt);
|
fmtinstall('x', xfmt);
|
||||||
|
|
|
@ -22,13 +22,11 @@ main(int argc, char **argv)
|
||||||
if(argc != 1)
|
if(argc != 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
|
quotefmtinstall();
|
||||||
up = auth_getuserpasswd(auth_getkey, "proto=pass %s", argv[0]);
|
up = auth_getuserpasswd(auth_getkey, "proto=pass %s", argv[0]);
|
||||||
if(up == nil) /* bug in factotum, fixed but need to reboot servers -rsc, 2/10/2002 */
|
|
||||||
up = auth_getuserpasswd(nil, "proto=pass %s", argv[0]);
|
|
||||||
if(up == nil)
|
if(up == nil)
|
||||||
sysfatal("getuserpasswd: %r");
|
sysfatal("getuserpasswd: %r");
|
||||||
|
|
||||||
quotefmtinstall();
|
|
||||||
print("%s\n%s\n", up->user, up->passwd);
|
print("%s\n%s\n", up->user, up->passwd);
|
||||||
exits(0);
|
exits(nil);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2026,7 +2026,7 @@ readsnap(Fmsg *m, Fid *f, Fcall *r)
|
||||||
}
|
}
|
||||||
if(s->donescan){
|
if(s->donescan){
|
||||||
r->count = 0;
|
r->count = 0;
|
||||||
return;
|
goto Out;
|
||||||
}
|
}
|
||||||
p = r->data;
|
p = r->data;
|
||||||
n = m->count;
|
n = m->count;
|
||||||
|
@ -2037,7 +2037,7 @@ readsnap(Fmsg *m, Fid *f, Fcall *r)
|
||||||
d.qid.path = UNPACK64(s->kv.v + 1);
|
d.qid.path = UNPACK64(s->kv.v + 1);
|
||||||
if((ns = dir2statbuf(&d, p, n)) == -1){
|
if((ns = dir2statbuf(&d, p, n)) == -1){
|
||||||
r->count = 0;
|
r->count = 0;
|
||||||
return;
|
goto Out;
|
||||||
}
|
}
|
||||||
s->overflow = 0;
|
s->overflow = 0;
|
||||||
p += ns;
|
p += ns;
|
||||||
|
@ -2058,9 +2058,11 @@ readsnap(Fmsg *m, Fid *f, Fcall *r)
|
||||||
n -= ns;
|
n -= ns;
|
||||||
}
|
}
|
||||||
btexit(s);
|
btexit(s);
|
||||||
|
r->count = p - r->data;
|
||||||
|
|
||||||
|
Out:
|
||||||
poperror();
|
poperror();
|
||||||
wunlock(f);
|
wunlock(f);
|
||||||
r->count = p - r->data;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -585,7 +585,7 @@ parse(int fd)
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprint(2, "%s [-b] [-p n]\n", argv0);
|
fprint(2, "usage: %s [-b] [-p nstrip] [file]\n", argv0);
|
||||||
exits("usage");
|
exits("usage");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,6 +615,16 @@ threadmain(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
}ARGEND;
|
}ARGEND;
|
||||||
|
switch(argc){
|
||||||
|
default:
|
||||||
|
usage();
|
||||||
|
case 1:
|
||||||
|
close(0);
|
||||||
|
if(open(argv[0], OREAD) < 0)
|
||||||
|
sysfatal("open: %r");
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
parse(0);
|
parse(0);
|
||||||
if(nblocks==1 && blocks[0]->nlines==0){
|
if(nblocks==1 && blocks[0]->nlines==0){
|
||||||
|
|
Loading…
Reference in a new issue