diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-15 13:36:30 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-02-15 13:36:30 -0500 |
| commit | 52833e897fd8c6f62b3e5e27291fa9bc803f7460 (patch) | |
| tree | cfe90047ee6c7402674a29ec7258319142b96ff1 /kernel/audit.c | |
| parent | 8d042218b075de3cdbe066198515b3521553746e (diff) | |
| parent | 4ee29f6a52158cea526b16a44ae38643946103ec (diff) | |
Merge branch 'linus_origin' into hotfixes
Diffstat (limited to 'kernel/audit.c')
| -rw-r--r-- | kernel/audit.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index c8555b180213..2eeea9a14240 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -1312,26 +1312,26 @@ void audit_log_untrustedstring(struct audit_buffer *ab, const char *string) | |||
| 1312 | 1312 | ||
| 1313 | /* This is a helper-function to print the escaped d_path */ | 1313 | /* This is a helper-function to print the escaped d_path */ |
| 1314 | void audit_log_d_path(struct audit_buffer *ab, const char *prefix, | 1314 | void audit_log_d_path(struct audit_buffer *ab, const char *prefix, |
| 1315 | struct dentry *dentry, struct vfsmount *vfsmnt) | 1315 | struct path *path) |
| 1316 | { | 1316 | { |
| 1317 | char *p, *path; | 1317 | char *p, *pathname; |
| 1318 | 1318 | ||
| 1319 | if (prefix) | 1319 | if (prefix) |
| 1320 | audit_log_format(ab, " %s", prefix); | 1320 | audit_log_format(ab, " %s", prefix); |
| 1321 | 1321 | ||
| 1322 | /* We will allow 11 spaces for ' (deleted)' to be appended */ | 1322 | /* We will allow 11 spaces for ' (deleted)' to be appended */ |
| 1323 | path = kmalloc(PATH_MAX+11, ab->gfp_mask); | 1323 | pathname = kmalloc(PATH_MAX+11, ab->gfp_mask); |
| 1324 | if (!path) { | 1324 | if (!pathname) { |
| 1325 | audit_log_format(ab, "<no memory>"); | 1325 | audit_log_format(ab, "<no memory>"); |
| 1326 | return; | 1326 | return; |
| 1327 | } | 1327 | } |
| 1328 | p = d_path(dentry, vfsmnt, path, PATH_MAX+11); | 1328 | p = d_path(path, pathname, PATH_MAX+11); |
| 1329 | if (IS_ERR(p)) { /* Should never happen since we send PATH_MAX */ | 1329 | if (IS_ERR(p)) { /* Should never happen since we send PATH_MAX */ |
| 1330 | /* FIXME: can we save some information here? */ | 1330 | /* FIXME: can we save some information here? */ |
| 1331 | audit_log_format(ab, "<too long>"); | 1331 | audit_log_format(ab, "<too long>"); |
| 1332 | } else | 1332 | } else |
| 1333 | audit_log_untrustedstring(ab, p); | 1333 | audit_log_untrustedstring(ab, p); |
| 1334 | kfree(path); | 1334 | kfree(pathname); |
| 1335 | } | 1335 | } |
| 1336 | 1336 | ||
| 1337 | /** | 1337 | /** |
