The unified diff between revisions [833d0ade..] and [6bbab836..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'auth.h'
#
#
# patch "auth.h"
# from [15c3cde23ddce7783b47c81148c4ef89c8e3a5d8]
# to [404d52a03f577f4c0f41f9fa97bf56eaba044aae]
#
============================================================
--- auth.h 15c3cde23ddce7783b47c81148c4ef89c8e3a5d8
+++ auth.h 404d52a03f577f4c0f41f9fa97bf56eaba044aae
@@ -26,6 +26,7 @@
#define _AUTH_H_
#include "includes.h"
+#include "chansession.h"
void svr_authinitialise();
void cli_authinitialise();
@@ -38,6 +39,25 @@ void svr_auth_pam();
void svr_auth_pubkey();
void svr_auth_pam();
+#ifdef ENABLE_SVR_PUBKEY_OPTIONS
+int svr_pubkey_allows_agentfwd();
+int svr_pubkey_allows_tcpfwd();
+int svr_pubkey_allows_x11fwd();
+int svr_pubkey_allows_pty();
+void svr_pubkey_set_forced_command(struct ChanSess *chansess);
+void svr_pubkey_options_cleanup();
+int svr_add_pubkey_options(buffer *options_buf, int line_num, const char* filename);
+#else
+/* no option : success */
+#define svr_pubkey_allows_agentfwd() 1
+#define svr_pubkey_allows_tcpfwd() 1
+#define svr_pubkey_allows_x11fwd() 1
+#define svr_pubkey_allows_pty() 1
+static inline void svr_pubkey_set_forced_command(struct ChanSess *chansess) { }
+static inline void svr_pubkey_options_cleanup() { }
+#define svr_add_pubkey_options(x,y,z) DROPBEAR_SUCCESS
+#endif
+
/* Client functions */
void recv_msg_userauth_failure();
void recv_msg_userauth_success();
@@ -91,8 +111,15 @@ struct AuthState {
logged. */
/* These are only used for the server */
- char *printableuser; /* stripped of control chars, used for logs etc */
- struct passwd * pw;
+ uid_t pw_uid;
+ gid_t pw_gid;
+ char *pw_dir;
+ char *pw_shell;
+ char *pw_name;
+ char *pw_passwd;
+#ifdef ENABLE_SVR_PUBKEY_OPTIONS
+ struct PubKeyOptions* pubkey_options;
+#endif
};
@@ -113,4 +140,18 @@ struct SignKeyList {
};
+#ifdef ENABLE_SVR_PUBKEY_OPTIONS
+struct PubKeyOptions;
+struct PubKeyOptions {
+ /* Flags */
+ int no_port_forwarding_flag;
+ int no_agent_forwarding_flag;
+ int no_x11_forwarding_flag;
+ int no_pty_flag;
+ /* "command=" option. */
+ unsigned char * forced_command;
+
+};
+#endif
+
#endif /* _AUTH_H_ */