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
1b56a36c
Commit
1b56a36c
authored
Mar 08, 2000
by
Niels Möller
Browse files
* src/userauth.h (user): Added uid attribute, and a bunch of
methods. Rev: src/userauth.h:1.20
parent
d24614da
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/userauth.h
View file @
1b56a36c
...
...
@@ -28,6 +28,12 @@
#include "lsh.h"
#include "exception.h"
/* For pid_t and uid_t */
#include <unistd.h>
/* Forward declaration */
struct
env_value
;
#define GABA_DECLARE
#include "userauth.h.x"
#undef GABA_DECLARE
...
...
@@ -40,16 +46,59 @@
(reply string)))
*/
struct
exception
*
make_userauth_special_exception
(
struct
lsh_string
*
reply
,
const
char
*
msg
);
struct
env_value
{
const
char
*
name
;
struct
lsh_string
*
value
;
};
struct
exception
*
make_userauth_special_exception
(
struct
lsh_string
*
reply
,
const
char
*
msg
);
/* GABA:
(class
(name user)
(vars
; Th
ese
string include a terminating NUL-character, for
; Th
is
string include a terminating NUL-character, for
; compatibility with library and system calls.
(name string)))
(name string)
(uid . uid_t)
; Verify a password
(verify_password method int "struct lsh_string *pw" "int free")
; Check if a file in the user's home directory exists.
; Used by the current publickey userauth method.
(file_exists method int "struct lsh_string *name" "int free")
; chdir to the user's home directory
(chdir_home method int)
; Fork a user process.
; FIXME: For non-UN*X-systems, we need a method
; that combines fork() and exec(). It would have lots of
; input arguments, perhaps a tag list, and return
; an object containing the stdin file objects and perhaps some
; other info.
(fork_process method int "pid_t *")
; This modifies the argv vector, in particular its first
; element. So the vector must have at least two elements,
; (argv[0], NULL).
(exec_shell method void "int login"
"char **argv"
"unsigned env_length"
"const struct env_value *env")))
*/
#define USER_VERIFY_PASSWORD(u, p, f) ((u)->verify_password((u), (p), (f)))
#define USER_FILE_EXISTS(u, n, f) ((u)->file_exists((u), (n), (f)))
#define USER_CHDIR_HOME(u) ((u)->chdir_home((u)))
#define USER_FORK(u, c) ((u)->fork_process((u), (c)))
#define USER_EXEC(u, m, a, l, e) ((u)->exec_shell((u), (m), (a), (l), (e)))
#endif
/* LSH_USERAUTH_H_INCLUDED */
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