Changeset 485
- Timestamp:
- 05/27/08 08:44:40
(8 months ago)
- Author:
- pebenito
- Message:
OCD whitespace fix
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r483 |
r485 |
|
| 13 | 13 | |
|---|
| 14 | 14 | def sebools(): |
|---|
| 15 | | ''' Returns a hash of all the selinux booleans on a system ''' |
|---|
| 16 | | res = {} |
|---|
| 17 | | for i in listdir("/selinux/booleans"): |
|---|
| 18 | | f = file("/selinux/booleans/" + i, "r") |
|---|
| 19 | | val = f.read(512) |
|---|
| 20 | | res[i] = (val[0] == '1') |
|---|
| 21 | | return res |
|---|
| | 15 | ''' Returns a hash of all the selinux booleans on a system ''' |
|---|
| | 16 | res = {} |
|---|
| | 17 | for i in listdir("/selinux/booleans"): |
|---|
| | 18 | f = file("/selinux/booleans/" + i, "r") |
|---|
| | 19 | val = f.read(512) |
|---|
| | 20 | res[i] = (val[0] == '1') |
|---|
| | 21 | return res |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | def sestatus(): |
|---|
| 24 | | ''' Return selinux status ''' |
|---|
| 25 | | f = file("/selinux/enforce", "r") |
|---|
| 26 | | val = f.read(512) |
|---|
| 27 | | return (val[0] == '1') |
|---|
| | 24 | ''' Return selinux status ''' |
|---|
| | 25 | f = file("/selinux/enforce", "r") |
|---|
| | 26 | val = f.read(512) |
|---|
| | 27 | return (val[0] == '1') |
|---|
| 28 | 28 | |
|---|
| 29 | 29 | def dictsub(a, b): |
|---|
| 30 | | ''' Remove from a all elements where a[k] == b[k] ''' |
|---|
| 31 | | for key in a.keys(): |
|---|
| 32 | | if a.get(key) == b.get(key): |
|---|
| 33 | | del a[key] |
|---|
| 34 | | return a |
|---|
| | 30 | ''' Remove from a all elements where a[k] == b[k] ''' |
|---|
| | 31 | for key in a.keys(): |
|---|
| | 32 | if a.get(key) == b.get(key): |
|---|
| | 33 | del a[key] |
|---|
| | 34 | return a |
|---|
| 35 | 35 | |
|---|
| 36 | 36 | def insert_hash(hash, key, val): |
|---|
Download in other formats:
* Generating other formats may take time.