Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 2002 17:39:30 -0400 (EDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Brian Feldman <green@FreeBSD.org>
Cc:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   Re: PERFORCE change 18877 for review
Message-ID:  <Pine.NEB.3.96L.1021007173859.5871I-100000@fledge.watson.org>
In-Reply-To: <200210072021.g97KLeWX044851@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Please feed all changes to the extattr utilities back through phk as
appropriate. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories

On Mon, 7 Oct 2002, Brian Feldman wrote:

> http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18877
> 
> Change 18877 by green@green_laptop_2 on 2002/10/07 13:20:39
> 
> 	Correct crashes related to not knowing what the correct minimum
> 	argc is.
> 
> Affected files ...
> 
> .. //depot/projects/trustedbsd/mac/usr.sbin/extattr/rmextattr.c#4 edit
> 
> Differences ...
> 
> ==== //depot/projects/trustedbsd/mac/usr.sbin/extattr/rmextattr.c#4 (text+ko) ====
> 
> @@ -102,7 +102,8 @@
>  	char	*buf, *visbuf, *p;
>  
>  	const char *options, *attrname;
> -	int	 buflen, visbuflen, ch, error, i, arg_counter, attrnamespace;
> +	int	 buflen, visbuflen, ch, error, i, arg_counter, attrnamespace,
> +		 minargc;
>  
>  	int	flag_force = 0;
>  	int	flag_quiet = 0;
> @@ -118,15 +119,19 @@
>  	if (!strcmp(p, "getextattr")) {
>  		what = EAGET;
>  		options = "fqsx";
> +		minargc = 3;
>  	} else if (!strcmp(p, "setextattr")) {
>  		what = EASET;
>  		options = "fq";
> +		minargc = 4;
>  	} else if (!strcmp(p, "rmextattr")) {
>  		what = EARM;
>  		options = "fq";
> +		minargc = 3;
>  	} else if (!strcmp(p, "lsextattr")) {
>  		what = EALS;
>  		options = "fq";
> +		minargc = 2;
>  	} else {
>  		usage();
>  	}
> @@ -154,7 +159,7 @@
>  	argc -= optind;
>  	argv += optind;
>  
> -	if (argc < 2)
> +	if (argc < minargc)
>  		usage();
>  
>  	error = extattr_string_to_namespace(argv[0], &attrnamespace);
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1021007173859.5871I-100000>