Commit 708bbe8d authored by Niels Möller's avatar Niels Möller
Browse files

* src/userauth.h: Renamed class user to lsh_user, to avoid name

clash with glibc.

Rev: src/lookup_verifier.h:1.6
Rev: src/lsh.c:1.103
Rev: src/lsh.h:1.14
Rev: src/lsh_proxy.c:1.9
Rev: src/server_authorization.c:1.11
Rev: src/server_password.c:1.29
Rev: src/server_publickey.c:1.12
Rev: src/server_session.c:1.31
Rev: src/server_session.h:1.8
Rev: src/server_userauth.h:1.8
Rev: src/unix_user.c:1.7
parent 201367f9
......@@ -49,7 +49,7 @@
(vars
(lookup method (object verifier)
"int method"
"struct user *user"
"struct lsh_user *user"
"struct lsh_string *key")))
*/
......
......@@ -333,7 +333,7 @@ make_options_command(struct lsh_options *options,
static struct verifier *
do_lsh_lookup(struct lookup_verifier *c,
int method,
struct user *keyholder UNUSED,
struct lsh_user *keyholder UNUSED,
struct lsh_string *key)
{
CAST(lsh_host_db, self, c);
......
......@@ -123,6 +123,6 @@ struct sexp;
struct sexp_iterator;
/* userauth.h */
struct user;
struct lsh_user;
#endif /* LSH_H_INCLUDED */
......@@ -398,7 +398,7 @@ main_argp =
static struct verifier *
do_host_lookup(struct lookup_verifier *c UNUSED,
int method UNUSED,
struct user *user UNUSED,
struct lsh_user *user UNUSED,
struct lsh_string *key)
{
assert(method == ATOM_SSH_DSS);
......
......@@ -51,7 +51,7 @@
static struct verifier *
do_key_lookup(struct lookup_verifier *c,
int method,
struct user *keyholder,
struct lsh_user *keyholder,
struct lsh_string *key)
{
CAST(authorization_db, closure, c);
......
......@@ -79,7 +79,7 @@ do_authenticate(struct userauth *s,
if ( (password = parse_string_copy(args))
&& parse_eod(args))
{
struct user *user;
struct lsh_user *user;
password = utf8_to_local(password, 1, 1);
......
......@@ -86,7 +86,7 @@ do_authenticate(struct userauth *s,
&& parse_eod(args))
: parse_eod(args)))
{
struct user *user;
struct lsh_user *user;
lookup = ALIST_GET(self->verifiers, algorithm);
......
......@@ -156,7 +156,7 @@ struct resource *make_process_resource(pid_t pid, int signal)
(super ssh_channel)
(vars
; User information
(user object user)
(user object lsh_user)
(initial_window . UINT32)
......@@ -240,7 +240,7 @@ do_close(struct ssh_channel *c)
}
struct ssh_channel *
make_server_session(struct user *user,
make_server_session(struct lsh_user *user,
UINT32 initial_window,
struct alist *request_types)
{
......@@ -278,7 +278,7 @@ make_server_session(struct user *user,
(name open_session)
(super channel_open)
(vars
(user object user)
(user object lsh_user)
(session_requests object alist)))
*/
......@@ -311,7 +311,7 @@ do_open_session(struct channel_open *s,
}
struct channel_open *
make_open_session(struct user *user,
make_open_session(struct lsh_user *user,
struct alist *session_requests)
{
NEW(open_session, closure);
......@@ -344,7 +344,7 @@ do_login(struct command *s,
struct exception_handler *e UNUSED)
{
CAST(server_connection_service, closure, s);
CAST_SUBTYPE(user, user, x);
CAST_SUBTYPE(lsh_user, user, x);
werror("User %pS authenticated for ssh-connection service.\n",
user->name);
......
......@@ -34,14 +34,14 @@
#include <string.h>
struct ssh_channel *
make_server_session(struct user *user,
make_server_session(struct lsh_user *user,
UINT32 initial_window,
struct alist *request_types);
struct command *
make_server_connection_service(struct alist *session_requests);
struct channel_open *
make_open_session(struct user *user,
make_open_session(struct lsh_user *user,
struct alist *session_requests);
struct channel_request *
......
......@@ -49,13 +49,13 @@
* o cd:ing to the home directory
*
* When this is done, the lookup method in user_db should return a
* struct user *, not struct unix_user *.
* struct lsh_user *, not struct unix_user *.
*/
/* ;; GABA:
(class
(name unix_user)
(super user)
(super lsh_user)
(vars
(uid simple uid_t)
(gid simple gid_t)
......@@ -72,7 +72,7 @@
(class
(name user_db)
(vars
(lookup method "struct user *"
(lookup method "struct lsh_user *"
"struct lsh_string *name" "int free")))
*/
......
......@@ -54,7 +54,7 @@
/* GABA:
(class
(name unix_user)
(super user)
(super lsh_user)
(vars
(gid simple gid_t)
......@@ -69,7 +69,7 @@
/* NOTE: Calls functions using the *ugly* convention of returning
* pointers to static buffers. */
static int
do_verify_password(struct user *s,
do_verify_password(struct lsh_user *s,
struct lsh_string *password,
int free)
{
......@@ -107,7 +107,7 @@ do_verify_password(struct user *s,
/* NOTE: No arbitrary file names are passed to this function, so we don't have
* to check for things like "../../some/secret/file" */
static int
do_file_exists(struct user *u,
do_file_exists(struct lsh_user *u,
struct lsh_string *name,
int free)
{
......@@ -138,7 +138,7 @@ do_file_exists(struct user *u,
* as the same user, perhaps it's better to use $HOME? */
static int
do_chdir_home(struct user *u)
do_chdir_home(struct lsh_user *u)
{
CAST(unix_user, user, u);
......@@ -191,7 +191,7 @@ change_uid(struct unix_user *user)
}
static int
do_fork_process(struct user *u, pid_t *pid)
do_fork_process(struct lsh_user *u, pid_t *pid)
{
CAST(unix_user, user, u);
pid_t child;
......@@ -240,7 +240,7 @@ format_env_pair_c(const char *name, const char *value)
}
static void
do_exec_shell(struct user *u, int login,
do_exec_shell(struct lsh_user *u, int login,
char **argv,
unsigned env_length,
const struct env_value *env)
......@@ -320,7 +320,7 @@ do_exec_shell(struct user *u, int login,
execve(user->shell->data, argv, envp);
}
static struct user *
static struct lsh_user *
make_unix_user(struct lsh_string *name,
uid_t uid, gid_t gid,
const char *passwd,
......@@ -371,7 +371,7 @@ make_unix_user(struct lsh_string *name,
* An account that is disabled in /etc/passwd should have a value for
* the login shell that prevents login; replacing the passwd field
* only doesn't prevent login using publickey authentication. */
static struct user *
static struct lsh_user *
do_lookup_user(struct user_db *s,
struct lsh_string *name, int free)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment