Remove explicit auth_stop_session() call

Now that authentication/authorization and session creation are
happening in the same process, there is no need for a separate call
to finish an auth session. This change prevents the upper software
layers from needing to track whether auth_start_session() has been
called or not.
This commit is contained in:
matt335672
2023-04-13 15:43:14 +01:00
parent 82ede29388
commit 1a9d15bef0
6 changed files with 5 additions and 29 deletions
+3 -10
View File
@@ -53,6 +53,7 @@ auth_userpass(const char *user, const char *pass,
*
* @param uid User ID
* @param[out] Error code for the operation. E_SCP_LOGIN_OK on success.
* Can be NULL if this information isn't required.
* @return auth handle on success, NULL on failure
*
*/
@@ -66,20 +67,12 @@ auth_uds(const char *user, enum scp_login_status *errorcode);
* @param display_num Display number
* @return 0 on success, 1 on failure
*
* The resources allocated when the session is started are de-allocated
* by auth_end() - there is no separate way to do this.
*/
int
auth_start_session(struct auth_info *auth_info, int display_num);
/**
*
* @brief Stops a session previously started with auth_start_session()
* @param auth_info. Auth handle created by auth_userpass
* @return 0 on success, 1 on failure
*
*/
int
auth_stop_session(struct auth_info *auth_info);
/**
*
* @brief Deallocates an auth handle and releases all resources
-8
View File
@@ -180,14 +180,6 @@ auth_start_session(struct auth_info *auth_info, int display_num)
return 0;
}
/******************************************************************************/
/* returns error */
int
auth_stop_session(struct auth_info *auth_info)
{
return 0;
}
/******************************************************************************/
int
auth_end(struct auth_info *auth_info)
-8
View File
@@ -229,14 +229,6 @@ auth_start_session(struct auth_info *auth_info, int display_num)
return 0;
}
/******************************************************************************/
/* returns error */
int
auth_stop_session(struct auth_info *auth_info)
{
return 0;
}
/******************************************************************************/
int
auth_set_env(struct auth_info *auth_info)
+1 -1
View File
@@ -438,7 +438,7 @@ auth_start_session(struct auth_info *auth_info, int display_num)
/******************************************************************************/
/* returns error */
int
static int
auth_stop_session(struct auth_info *auth_info)
{
int rv = 0;
+1 -1
View File
@@ -248,7 +248,7 @@ auth_start_session(struct auth_info *auth_info, int display_num)
/******************************************************************************/
/* returns error */
int
static int
auth_stop_session(struct auth_info *auth_info)
{
int rv = 0;
-1
View File
@@ -308,7 +308,6 @@ main(int argc, char **argv)
rv = g_system(amp.command);
LOG(LOG_LEVEL_INFO, "command \"%s\" returned %d",
amp.command, rv);
auth_stop_session(auth_info);
}
}
if (auth_info != NULL)