From d5c18232d1ca4e8106ad924d3bd574500c2fab8a Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Sat, 30 Mar 2013 21:23:13 +0000 Subject: Allow specifying the jailname instead of jid with the -j parameter --- Makefile | 2 +- jaildaemon.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0047634..dc9a30d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # $Id$ CFLAGS+=-Wall -Wextra -pedantic -Os -LDFLAGS+=-s -lutil +LDFLAGS+=-s -lutil -ljail PREFIX?=/usr/local all: jaildaemon diff --git a/jaildaemon.c b/jaildaemon.c index 62dcc51..0843b37 100644 --- a/jaildaemon.c +++ b/jaildaemon.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -425,7 +426,7 @@ int main( int argc, char **argv ) { case 'R': o_respawn = TASK_RESPAWN_IMMEDIATE; break; case 't': o_proctitle = optarg; break; case 'c': o_command = optarg; break; - case 'j': o_jid = strtol( optarg, 0, 0 ); break; + case 'j': o_jid = jail_getid(optarg); break; case 'u': o_uid = strtol( optarg, 0, 0 ); break; case 'p': o_pidfile = optarg; break; case 'f': g_uds_path = optarg; break; -- cgit v1.2.3