src/communication/security-server-comm.c
/* Receive check privilege request packet body */
Receive check privilege request packet body
Receive check privilege request packet body
int recv_check_privilege_request(int sockfd, unsigned char *requested_cookie, int *requested_privilege)
{
	int retval;
	retval = read(sockfd, requested_cookie, SECURITY_SERVER_COOKIE_LEN);
	if(retval < SECURITY_SERVER_COOKIE_LEN)
	{
		SEC_SVR_DBG("Received cookie size is too small: %d", retval);
		return SECURITY_SERVER_ERROR_RECV_FAILED;
	}
	retval = read(sockfd, requested_privilege, sizeof(int));
	if(retval < sizeof(int))
	{
		SEC_SVR_DBG("privilege size is too small: %d", retval);
		return SECURITY_SERVER_ERROR_RECV_FAILED;
	}
	return SECURITY_SERVER_SUCCESS;
}
int recv_check_privilege_request ( int sockfd , unsigned char * requested_cookie , int * requested_privilege ) { int retval ; retval = read ( sockfd , requested_cookie , SECURITY_SERVER_COOKIE_LEN ) ; if ( retval < SECURITY_SERVER_COOKIE_LEN ) { SEC_SVR_DBG ( " " , retval ) ; return SECURITY_SERVER_ERROR_RECV_FAILED ; } retval = read ( sockfd , requested_privilege , sizeof ( int ) ) ; if ( retval < sizeof ( int ) ) { SEC_SVR_DBG ( " " , retval ) ; return SECURITY_SERVER_ERROR_RECV_FAILED ; } return SECURITY_SERVER_SUCCESS ; }
Receive check privilege request packet body
Receive check privilege request packet body