/[path-sandbox]/trunk/libsbutil/get_sandbox_log.c
Gentoo

Contents of /trunk/libsbutil/get_sandbox_log.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 370 - (show annotations) (download) (as text)
Sun Nov 9 10:29:58 2008 UTC (5 years, 9 months ago) by vapier
File MIME type: text/x-csrc
File size: 853 byte(s)
consolidate all random system includes into headers.h
1 /*
2 * get_sandbox_log.c
3 *
4 * Util functions.
5 *
6 * Copyright 1999-2008 Gentoo Foundation
7 * Licensed under the GPL-2
8 *
9 * Some parts might have Copyright:
10 * Copyright (C) 2002 Brad House <brad@mainstreetsoftworks.com>
11 */
12
13 #include "headers.h"
14 #include "sbutil.h"
15
16 void get_sandbox_log(char *path)
17 {
18 char *sandbox_log_env = NULL;
19
20 save_errno();
21
22 sandbox_log_env = getenv(ENV_SANDBOX_LOG);
23
24 /* THIS CHUNK BREAK THINGS BY DOING THIS:
25 * SANDBOX_LOG=/tmp/sandbox-app-admin/superadduser-1.0.7-11063.log
26 */
27 if ((NULL != sandbox_log_env) &&
28 (NULL != strchr(sandbox_log_env, '/')))
29 sandbox_log_env = NULL;
30
31 snprintf(path, SB_PATH_MAX, "%s%s%s%s%d%s",
32 SANDBOX_LOG_LOCATION, LOG_FILE_PREFIX,
33 (sandbox_log_env == NULL ? "" : sandbox_log_env),
34 (sandbox_log_env == NULL ? "" : "-"),
35 getpid(), LOG_FILE_EXT);
36
37 restore_errno();
38 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20