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
LSH
lsh
Commits
c81262c7
Commit
c81262c7
authored
Feb 22, 2000
by
Niels Möller
Browse files
* src/server_password.c (make_userauth_password): New function.
Rev: src/server_password.c:1.27
parent
0b03b153
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server_password.c
View file @
c81262c7
/* server_password.c
*
* System dependant password related functions.
*
* $Id$
*/
/* lsh, an implementation of the ssh protocol
...
...
@@ -30,8 +32,18 @@
#include
"werror.h"
#include
"xalloc.h"
#include
"server_password.c.x"
/* GABA:
(class
(name userauth_password)
(super userauth)
(vars
(db object user_db)))
*/
static
void
do_authenticate
(
struct
userauth
*
ignored
UNUSED
,
do_authenticate
(
struct
userauth
*
s
,
struct
ssh_connection
*
connection
UNUSED
,
struct
lsh_string
*
username
,
UINT32
service
UNUSED
,
...
...
@@ -39,8 +51,9 @@ do_authenticate(struct userauth *ignored UNUSED,
struct
command_continuation
*
c
,
struct
exception_handler
*
e
)
{
CAST
(
userauth_password
,
self
,
s
);
struct
lsh_string
*
password
=
NULL
;
/* struct unix_service *service; */
int
change_passwd
;
username
=
utf8_to_local
(
username
,
1
,
1
);
...
...
@@ -77,7 +90,7 @@ do_authenticate(struct userauth *ignored UNUSED,
return
;
}
user
=
lookup_user
(
username
,
1
);
user
=
USER_LOOKUP
(
self
->
db
,
username
,
1
);
if
(
!
user
)
{
...
...
@@ -115,10 +128,21 @@ do_authenticate(struct userauth *ignored UNUSED,
PROTOCOL_ERROR
(
e
,
"Invalid password USERAUTH message."
);
}
struct
userauth
*
make_userauth_password
(
struct
user_db
*
db
)
{
NEW
(
userauth_password
,
self
);
self
->
super
.
authenticate
=
do_authenticate
;
self
->
db
=
db
;
return
&
self
->
super
;
}
#if 0
struct userauth unix_userauth =
{ STATIC_HEADER, do_authenticate };
#if 0
struct setuid_service
{
...
...
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