Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Diff of /trunk/1.6.x/ccs-patch/fs/tomoyo_audit.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 989 by kumaneko, Fri Feb 15 13:33:40 2008 UTC revision 994 by kumaneko, Mon Feb 18 08:36:51 2008 UTC
# Line 5  Line 5 
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.
# Line 142  char *InitAuditLog(int *len, const u8 pr Line 142  char *InitAuditLog(int *len, const u8 pr
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;
# Line 150  char *InitAuditLog(int *len, const u8 pr Line 151  char *InitAuditLog(int *len, const u8 pr
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  }  }

Legend:
Removed from v.989  
changed lines
  Added in v.994

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26