src/server/security-server-cookie.c
/* Create a default cookie when security server is executed *
 * Default cookie is for root processes that needs cookie */
Create a default cookie when security server is executed
Default cookie is for root processes that needs cookie
Create a default cookie when security server is executed Default cookie is for root processes that needs cookie
cookie_list *create_default_cookie(void)
{
	cookie_list *first = NULL;
	int ret;
	first = malloc(sizeof(cookie_list));
	ret = check_stored_cookie(first->cookie, SECURITY_SERVER_COOKIE_LEN);
	if(ret != SECURITY_SERVER_SUCCESS)
	{
		SEC_SVR_DBG("Error on making random cookie: %d", ret);
		free(first);
		return NULL;
	}
	first->path_len = 0;
	first->permission_len = 0;
	first->pid = 0;
	first->path = NULL;
	first->permissions = NULL;
        first->smack_label = NULL;
	first->prev = NULL;
	first->next = NULL;
	return first;
}
cookie_list * create_default_cookie ( void ) { cookie_list * first = NULL ; int ret ; first = malloc ( sizeof ( cookie_list ) ) ; ret = check_stored_cookie ( first -> cookie , SECURITY_SERVER_COOKIE_LEN ) ; if ( ret != SECURITY_SERVER_SUCCESS ) { SEC_SVR_DBG ( " " , ret ) ; free ( first ) ; return NULL ; } first -> path_len = 0 ; first -> permission_len = 0 ; first -> pid = 0 ; first -> path = NULL ; first -> permissions = NULL ; first -> smack_label = NULL ; first -> prev = NULL ; first -> next = NULL ; return first ; }
Create a default cookie when security server is executed
 Default cookie is for root processes that needs cookie
Create a default cookie when security server is executed Default cookie is for root processes that needs cookie