hooks.c (002345925e6c45861f60db6f4fc6236713fd8847) | hooks.c (d78ca3cd733d8a2c3dcd88471beb1a15d973eed8) |
---|---|
1/* 2 * NSA Security-Enhanced Linux (SELinux) security module 3 * 4 * This file contains the SELinux hook function implementations. 5 * 6 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 7 * Chris Vance, <cvance@nai.com> 8 * Wayne Salamon, <wsalamon@nai.com> --- 2045 unchanged lines hidden (view full) --- 2054{ 2055 int rc; 2056 2057 rc = cap_syslog(type, from_file); 2058 if (rc) 2059 return rc; 2060 2061 switch (type) { | 1/* 2 * NSA Security-Enhanced Linux (SELinux) security module 3 * 4 * This file contains the SELinux hook function implementations. 5 * 6 * Authors: Stephen Smalley, <sds@epoch.ncsc.mil> 7 * Chris Vance, <cvance@nai.com> 8 * Wayne Salamon, <wsalamon@nai.com> --- 2045 unchanged lines hidden (view full) --- 2054{ 2055 int rc; 2056 2057 rc = cap_syslog(type, from_file); 2058 if (rc) 2059 return rc; 2060 2061 switch (type) { |
2062 case 3: /* Read last kernel messages */ 2063 case 10: /* Return size of the log buffer */ | 2062 case SYSLOG_ACTION_READ_ALL: /* Read last kernel messages */ 2063 case SYSLOG_ACTION_SIZE_BUFFER: /* Return size of the log buffer */ |
2064 rc = task_has_system(current, SYSTEM__SYSLOG_READ); 2065 break; | 2064 rc = task_has_system(current, SYSTEM__SYSLOG_READ); 2065 break; |
2066 case 6: /* Disable logging to console */ 2067 case 7: /* Enable logging to console */ 2068 case 8: /* Set level of messages printed to console */ | 2066 case SYSLOG_ACTION_CONSOLE_OFF: /* Disable logging to console */ 2067 case SYSLOG_ACTION_CONSOLE_ON: /* Enable logging to console */ 2068 /* Set level of messages printed to console */ 2069 case SYSLOG_ACTION_CONSOLE_LEVEL: |
2069 rc = task_has_system(current, SYSTEM__SYSLOG_CONSOLE); 2070 break; | 2070 rc = task_has_system(current, SYSTEM__SYSLOG_CONSOLE); 2071 break; |
2071 case 0: /* Close log */ 2072 case 1: /* Open log */ 2073 case 2: /* Read from log */ 2074 case 4: /* Read/clear last kernel messages */ 2075 case 5: /* Clear ring buffer */ | 2072 case SYSLOG_ACTION_CLOSE: /* Close log */ 2073 case SYSLOG_ACTION_OPEN: /* Open log */ 2074 case SYSLOG_ACTION_READ: /* Read from log */ 2075 case SYSLOG_ACTION_READ_CLEAR: /* Read/clear last kernel messages */ 2076 case SYSLOG_ACTION_CLEAR: /* Clear ring buffer */ |
2076 default: 2077 rc = task_has_system(current, SYSTEM__SYSLOG_MOD); 2078 break; 2079 } 2080 return rc; 2081} 2082 2083/* --- 3770 unchanged lines hidden --- | 2077 default: 2078 rc = task_has_system(current, SYSTEM__SYSLOG_MOD); 2079 break; 2080 } 2081 return rc; 2082} 2083 2084/* --- 3770 unchanged lines hidden --- |