5 |
* |
* |
6 |
* Copyright (C) 2005-2008 NTT DATA CORPORATION |
* Copyright (C) 2005-2008 NTT DATA CORPORATION |
7 |
* |
* |
8 |
* Version: 1.6.0-pre 2008/02/15 |
* Version: 1.6.0-pre 2008/02/18 |
9 |
* |
* |
10 |
* This file is applicable to both 2.4.30 and 2.6.11 and later. |
* This file is applicable to both 2.4.30 and 2.6.11 and later. |
11 |
* See README.ccs for ChangeLog. |
* See README.ccs for ChangeLog. |
142 |
char *bprm_info = ""; |
char *bprm_info = ""; |
143 |
struct timeval tv; |
struct timeval tv; |
144 |
struct task_struct *task = current; |
struct task_struct *task = current; |
145 |
|
u32 tomoyo_flags = task->tomoyo_flags; |
146 |
const char *domainname = current->domain_info->domainname->name; |
const char *domainname = current->domain_info->domainname->name; |
147 |
do_gettimeofday(&tv); |
do_gettimeofday(&tv); |
148 |
*len += strlen(domainname) + 256; |
*len += strlen(domainname) + 256; |
151 |
if (!bprm_info) return NULL; |
if (!bprm_info) return NULL; |
152 |
*len += strlen(bprm_info); |
*len += strlen(bprm_info); |
153 |
} |
} |
154 |
if ((buf = ccs_alloc(*len)) != NULL) snprintf(buf, (*len) - 1, "#timestamp=%lu profile=%u mode=%u pid=%d uid=%d gid=%d euid=%d egid=%d suid=%d sgid=%d fsuid=%d fsgid=%d %s\n%s\n", tv.tv_sec, profile, mode, task->pid, task->uid, task->gid, task->euid, task->egid, task->suid, task->sgid, task->fsuid, task->fsgid, bprm_info, domainname); |
if ((buf = ccs_alloc(*len)) != NULL) snprintf(buf, (*len) - 1, "#timestamp=%lu profile=%u mode=%u pid=%d uid=%d gid=%d euid=%d egid=%d suid=%d sgid=%d fsuid=%d fsgid=%d state[0]=%u state[1]=%u state[2]=%u %s\n%s\n", tv.tv_sec, profile, mode, task->pid, task->uid, task->gid, task->euid, task->egid, task->suid, task->sgid, task->fsuid, task->fsgid, (u8) (tomoyo_flags >> 24), (u8) (tomoyo_flags >> 16), (u8) (tomoyo_flags >> 8), bprm_info, domainname); |
155 |
if (bprm) ccs_free(bprm_info); |
if (bprm) ccs_free(bprm_info); |
156 |
return buf; |
return buf; |
157 |
} |
} |