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