return NET_API_STATUS_SUCCESS;
}
+/**
+ * @brief Get the credentials of the libnet context
+ *
+ * @param[in] ctx The netapi context
+ *
+ * @param[in] creds A pointer to hold the creds.
+ *
+ * @return 0 on success, an werror code otherwise.
+ */
+NET_API_STATUS libnetapi_get_creds(struct libnetapi_ctx *ctx,
+ struct cli_credentials **creds)
+{
+ if (ctx == NULL) {
+ return W_ERROR_V(WERR_INVALID_PARAMETER);
+ }
+
+ if (creds != NULL) {
+ *creds = ctx->creds;
+ }
+
+ return NET_API_STATUS_SUCCESS;
+}
+
/****************************************************************
****************************************************************/
NET_API_STATUS libnetapi_set_creds(struct libnetapi_ctx *ctx,
struct cli_credentials *creds);
+NET_API_STATUS libnetapi_get_creds(struct libnetapi_ctx *ctx,
+ struct cli_credentials **creds);
NET_API_STATUS libnetapi_set_username(struct libnetapi_ctx *ctx,
const char *username);