aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Lucangeli Obes <jorgelo@google.com>2015-12-04 14:53:36 -0800
committerJorge Lucangeli Obes <jorgelo@google.com>2015-12-04 17:28:18 -0800
commit43a6a864491b6209192936d66d6a2e50e66deee2 (patch)
tree2c7f1953309ff338a5a74a808d8c0911cf8b32ad
parentf7a3868cc0f6fc8de945e4f9e9e6fcae5bf1e645 (diff)
downloadminijail-43a6a864491b6209192936d66d6a2e50e66deee2.tar.gz
Fix some long lines.
Bug: None Change-Id: I2364bf07991b2a5be23502cd011a6cc8d35471d6
-rw-r--r--libminijail.c22
-rw-r--r--libminijail.h3
2 files changed, 18 insertions, 7 deletions
diff --git a/libminijail.c b/libminijail.c
index b5a2ce1..04edfd8 100644
--- a/libminijail.c
+++ b/libminijail.c
@@ -549,7 +549,8 @@ void API minijail_parse_seccomp_filters(struct minijail *j, const char *path)
{
if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL)) {
if ((errno == ENOSYS) && SECCOMP_SOFTFAIL) {
- warn("not loading seccomp filter, seccomp not supported");
+ warn("not loading seccomp filter,"
+ " seccomp not supported");
return;
}
}
@@ -912,7 +913,10 @@ int enter_pivot_root(const struct minijail *j)
if (j->mounts_head && (ret = mount_one(j, j->mounts_head)))
return ret;
- /* Keep the fd for both old and new root. It will be used in fchdir later. */
+ /*
+ * Keep the fd for both old and new root.
+ * It will be used in fchdir later.
+ */
oldroot = open("/", O_DIRECTORY | O_RDONLY);
if (oldroot < 0)
pdie("failed to open / for fchdir");
@@ -920,7 +924,10 @@ int enter_pivot_root(const struct minijail *j)
if (newroot < 0)
pdie("failed to open %s for fchdir", j->chrootdir);
- /* To ensure chrootdir is the root of a file system, do a self bind mount. */
+ /*
+ * To ensure chrootdir is the root of a file system,
+ * do a self bind mount.
+ */
if (mount(j->chrootdir, j->chrootdir, "bind", MS_BIND | MS_REC, ""))
pdie("failed to bind mount '%s'", j->chrootdir);
if (chdir(j->chrootdir))
@@ -1119,7 +1126,8 @@ void set_seccomp_filter(const struct minijail *j)
* Install the syscall filter.
*/
if (j->flags.seccomp_filter) {
- if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, j->filter_prog)) {
+ if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER,
+ j->filter_prog)) {
if ((errno == ENOSYS) && SECCOMP_SOFTFAIL) {
warn("seccomp not supported");
return;
@@ -1426,9 +1434,11 @@ int API minijail_run_no_preload(struct minijail *j, const char *filename,
}
int API minijail_run_pid_pipes_no_preload(struct minijail *j,
- const char *filename, char *const argv[],
+ const char *filename,
+ char *const argv[],
pid_t *pchild_pid,
- int *pstdin_fd, int *pstdout_fd, int *pstderr_fd) {
+ int *pstdin_fd, int *pstdout_fd,
+ int *pstderr_fd) {
return minijail_run_internal(j, filename, argv, pchild_pid,
pstdin_fd, pstdout_fd, pstderr_fd, false);
}
diff --git a/libminijail.h b/libminijail.h
index f5c6ec7..80bffc0 100644
--- a/libminijail.h
+++ b/libminijail.h
@@ -203,7 +203,8 @@ int minijail_run_pid_pipes(struct minijail *j, const char *filename,
*/
int minijail_run_pid_pipes_no_preload(struct minijail *j, const char *filename,
char *const argv[], pid_t *pchild_pid,
- int *pstdin_fd, int *pstdout_fd, int *pstderr_fd);
+ int *pstdin_fd, int *pstdout_fd,
+ int *pstderr_fd);
/*
* Kill the specified minijail. The minijail must have been created with pid