diff options
author | gene <gene@cvs.openbsd.org> | 1998-01-23 01:15:38 +0000 |
---|---|---|
committer | gene <gene@cvs.openbsd.org> | 1998-01-23 01:15:38 +0000 |
commit | 2eb37a155c3c69b572ce48560f4348013822dfba (patch) | |
tree | 49b99500c79a9302f7ea6a39bec03958abaac90f /usr.sbin | |
parent | 38f45297784e8159514aa62c32c0864357ddb682 (diff) |
Inspired by hubertf@netbsd:
Quote filenames passed to different extract commands preventing
certain security risks.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/add/extract.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c index ff1cc588ff5..000b743ec9d 100644 --- a/usr.sbin/pkg_install/add/extract.c +++ b/usr.sbin/pkg_install/add/extract.c @@ -1,7 +1,7 @@ -/* $OpenBSD: extract.c,v 1.3 1998/01/14 13:20:50 niklas Exp $ */ +/* $OpenBSD: extract.c,v 1.4 1998/01/23 01:15:37 gene Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: extract.c,v 1.3 1998/01/14 13:20:50 niklas Exp $"; +static const char *rcsid = "$OpenBSD: extract.c,v 1.4 1998/01/23 01:15:37 gene Exp $"; #endif /* @@ -103,7 +103,7 @@ extract_plist(char *home, Package *pkg) and run in bulk. */ add_count = snprintf(&perm_args[perm_count], maxargs - perm_count, - "%s ", p->name); + "'%s' ", p->name); if (add_count > maxargs - perm_count) barf("oops, miscounted strings!"); perm_count += add_count; @@ -126,7 +126,7 @@ extract_plist(char *home, Package *pkg) where_count += add_count; add_count = snprintf(&perm_args[perm_count], maxargs - perm_count, - "%s ", p->name); + "'%s' ", p->name); if (add_count > maxargs - perm_count) barf("oops, miscounted strings!"); perm_count += add_count; |