diff options
author | jamie <jamie@FreeBSD.org> | 2011-06-17 16:06:13 +0000 |
---|---|---|
committer | jamie <jamie@FreeBSD.org> | 2011-06-17 16:06:13 +0000 |
commit | 0e5ec9dce0b4f9791252ba22064fb407dc733ff9 (patch) | |
tree | 8d1ab12c7ccce64618a3308fb7bce0f78615c9e3 /usr.sbin/jail/command.c | |
parent | 3a156b82bb5985e9c61a72da436b8f7ccc2c9b24 (diff) | |
download | FreeBSD-src-0e5ec9dce0b4f9791252ba22064fb407dc733ff9.zip FreeBSD-src-0e5ec9dce0b4f9791252ba22064fb407dc733ff9.tar.gz |
Change cfstrings from an STAILQ into a TAILQ to allow commands to be
traversed in reverse order.
Diffstat (limited to 'usr.sbin/jail/command.c')
-rw-r--r-- | usr.sbin/jail/command.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index ca69474..f757a83 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -111,7 +111,7 @@ run_command(struct cfjail *j, enum intparam comparam) if (j->intparams[comparam] == NULL) return 0; j->comstring = - STAILQ_FIRST(&j->intparams[comparam]->val); + TAILQ_FIRST(&j->intparams[comparam]->val); } j->comparam = comparam; } else @@ -125,7 +125,7 @@ run_command(struct cfjail *j, enum intparam comparam) return 1; } j->comstring = - comstring == COMSTRING_DUMMY ? NULL : STAILQ_NEXT(comstring, tq); + comstring == COMSTRING_DUMMY ? NULL : TAILQ_NEXT(comstring, tq); if (comstring != COMSTRING_DUMMY && comstring->len == 0) goto next_comstring; /* @@ -294,11 +294,11 @@ run_command(struct cfjail *j, enum intparam comparam) if (j->name != NULL) goto default_command; argc = 0; - STAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) + TAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) argc++; argv = alloca((argc + 1) * sizeof(char *)); argc = 0; - STAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) + TAILQ_FOREACH(s, &j->intparams[IP_COMMAND]->val, tq) argv[argc++] = s->s; argv[argc] = NULL; j->comstring = NULL; |