4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
\r
6 * Contact: Bumjin Im <bj.im@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License
22 #ifndef SECURITY_SERVER_COOKIE_H
\r
23 #define SECURITY_SERVER_COOKIE_H
\r
25 #include "security-server-common.h"
\r
27 void free_cookie_item(cookie_list *cookie);
28 cookie_list *delete_cookie_item(cookie_list *cookie);
29 cookie_list *search_existing_cookie(int pid, const cookie_list *c_list);
30 cookie_list *search_cookie(const cookie_list *c_list, const unsigned char *cookie, int * privileges, int privilegesSize);
31 cookie_list *search_cookie_new(const cookie_list *c_list,
32 const unsigned char *cookie,
34 const char *access_rights);
35 int generate_random_cookie(unsigned char *cookie, int size);
36 cookie_list *create_cookie_item(int pid, int sockfd, cookie_list *c_list);
37 cookie_list *create_default_cookie(void);
38 cookie_list * garbage_collection(cookie_list *cookie);
39 cookie_list *search_cookie_from_pid(cookie_list *c_list, int pid);
40 void printhex(const unsigned char *data, int size);
\r