Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
a86f0211
Commit
a86f0211
authored
Mar 07, 2002
by
Mac Newbold
Browse files
Add new strings to catch non-rsa authentication (like publickey or password).
parent
55dabdba
Changes
1
Hide whitespace changes
Inline
Side-by-side
security/genlastlog.c
View file @
a86f0211
...
@@ -248,24 +248,39 @@ doit(gzFile *infp)
...
@@ -248,24 +248,39 @@ doit(gzFile *infp)
* FreeBSD: "Accepted rsa for USER"
* FreeBSD: "Accepted rsa for USER"
* Linux 6.2: "log: RSA authentication for USER"
* Linux 6.2: "log: RSA authentication for USER"
* Linux 7.1: "session opened for user USER"
* Linux 7.1: "session opened for user USER"
* (several): "Accepted publickey for USER"
* (several): "Accepted password for USER"
*/
*/
#define L1 "Accepted rsa for "
#define L1 "Accepted rsa for "
#define L2 "session opened for user "
#define L2 "session opened for user "
#define L3 "log: RSA authentication for "
#define L3 "log: RSA authentication for "
#define L4 "Accepted publickey for "
#define L5 "Accepted password for "
/* Skip to end of program[pid]: and trailing space */
/* Skip to end of program[pid]: and trailing space */
bp
=
strchr
(
bp
,
':'
);
bp
=
strchr
(
bp
,
':'
);
bp
+=
2
;
bp
+=
2
;
if
(
strncmp
(
bp
,
L1
,
strlen
(
L1
))
==
0
)
{
if
(
strncmp
(
bp
,
L1
,
strlen
(
L1
))
==
0
)
{
/*fprintf(stdout,"Hit L1: ");*/
bp
+=
strlen
(
L1
);
bp
+=
strlen
(
L1
);
}
}
else
if
(
strncmp
(
bp
,
L2
,
strlen
(
L2
))
==
0
)
{
else
if
(
strncmp
(
bp
,
L2
,
strlen
(
L2
))
==
0
)
{
/*fprintf(stdout,"Hit L2: ");*/
bp
+=
strlen
(
L2
);
bp
+=
strlen
(
L2
);
}
}
else
if
(
strncmp
(
bp
,
L3
,
strlen
(
L3
))
==
0
)
{
else
if
(
strncmp
(
bp
,
L3
,
strlen
(
L3
))
==
0
)
{
/*fprintf(stdout,"Hit L3: ");*/
bp
+=
strlen
(
L3
);
bp
+=
strlen
(
L3
);
}
}
else
if
(
strncmp
(
bp
,
L4
,
strlen
(
L4
))
==
0
)
{
/*fprintf(stdout,"Hit L4: ");*/
bp
+=
strlen
(
L4
);
}
else
if
(
strncmp
(
bp
,
L5
,
strlen
(
L5
))
==
0
)
{
/*fprintf(stdout,"Hit L5: ");*/
bp
+=
strlen
(
L5
);
}
else
{
else
{
continue
;
continue
;
}
}
...
@@ -275,6 +290,7 @@ doit(gzFile *infp)
...
@@ -275,6 +290,7 @@ doit(gzFile *infp)
*/
*/
if
(
!
(
user
=
strsep
(
&
bp
,
" "
)))
if
(
!
(
user
=
strsep
(
&
bp
,
" "
)))
continue
;
continue
;
/*fprintf(stdout,"%s on %s\n",user,node);*/
/* We do not care about ROOT logins. */
/* We do not care about ROOT logins. */
if
(
strcasecmp
(
user
,
"ROOT"
)
==
0
)
if
(
strcasecmp
(
user
,
"ROOT"
)
==
0
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment