pam UPDATE auth using Linux PAM
Added the ability to authenticate via Linux PAM when using keyboard-interactive SSH authentication method. One new API call was added.
diff --git a/src/session_p.h b/src/session_p.h
index 916e235..b1224ef 100644
--- a/src/session_p.h
+++ b/src/session_p.h
@@ -195,6 +195,8 @@
int (*interactive_auth_clb)(const struct nc_session *session, ssh_message msg, void *user_data);
void *interactive_auth_data;
void (*interactive_auth_data_free)(void *data);
+ char *conf_name;
+ char *conf_dir;
#endif
#ifdef NC_ENABLED_TLS
int (*user_verify_clb)(const struct nc_session *session);
@@ -514,6 +516,18 @@
void (*notif_clb)(struct nc_session *session, const struct lyd_node *envp, const struct lyd_node *op);
};
+#ifdef NC_ENABLED_SSH
+
+/**
+ * @brief PAM callback arguments.
+ */
+struct nc_pam_thread_arg {
+ ssh_message msg; /**< libssh message */
+ struct nc_session *session; /**< NETCONF session */
+};
+
+#endif
+
void *nc_realloc(void *ptr, size_t size);
struct passwd *nc_getpwuid(uid_t uid, struct passwd *pwd_buf, char **buf, size_t *buf_size);