security: fix argument handling.
This commit is contained in:
parent
4dfeb14737
commit
14fb5946ee
48
net/uucp/patches/patch-uuxqt_c
Normal file
48
net/uucp/patches/patch-uuxqt_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-uuxqt_c,v 1.1 2001/09/12 12:22:47 fgsch Exp $
|
||||
--- uuxqt.c.orig Sun Aug 20 16:29:59 1995
|
||||
+++ uuxqt.c Wed Sep 12 09:07:17 2001
|
||||
@@ -928,6 +928,44 @@ uqdo_xqt_file (puuconf, zfile, zbase, qs
|
||||
don't permit multiple arguments. */
|
||||
for (i = 1; azQargs[i] != NULL; i++)
|
||||
{
|
||||
+ if (azQargs[i][0] == '-' && azQargs[i][1] == '-')
|
||||
+ {
|
||||
+ char *zopts = azQargs[i] + 2;
|
||||
+
|
||||
+ /* The -g, -n, and -s options take an argument. */
|
||||
+ if (!strncmp(zopts, "grade", 5) && zopts[5] != '=')
|
||||
+ {
|
||||
+ if (azQargs[i+1] != NULL)
|
||||
+ ++i;
|
||||
+ }
|
||||
+ if (!(strncmp(zopts, "notify", 6)
|
||||
+ && strncmp(zopts, "status", 6)) && zopts[6] != '=')
|
||||
+ {
|
||||
+ if (azQargs[i+1] != NULL)
|
||||
+ ++i;
|
||||
+ }
|
||||
+
|
||||
+ /* The -I, -u and -x options are not permitted. */
|
||||
+ if (!strncmp(zopts, "config", 6))
|
||||
+ {
|
||||
+ if (zopts[6] != '=' && azQargs[i+1] != NULL)
|
||||
+ ++i;
|
||||
+ azQargs[i] = zbufcpy ("--nouucico");
|
||||
+ }
|
||||
+ if (!strncmp(zopts, "user", 4))
|
||||
+ {
|
||||
+ if (zopts[4] != '=' && azQargs[i+1] != NULL)
|
||||
+ ++i;
|
||||
+ azQargs[i] = zbufcpy ("--nouucico");
|
||||
+ }
|
||||
+ if (!strncmp(zopts, "debug", 5))
|
||||
+ {
|
||||
+ if (zopts[5] != '=' && azQargs[i+1] != NULL)
|
||||
+ ++i;
|
||||
+ azQargs[i] = zbufcpy ("--nouucico");
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
if (azQargs[i][0] == '-')
|
||||
{
|
||||
char *zopts;
|
Loading…
Reference in New Issue
Block a user