[PATCH] +groups ignored
Jakub Jelinek
jakub@redhat.com
Fri Jun 27 11:24:00 GMT 2003
On Fri, Jun 27, 2003 at 01:20:52PM +0200, Thorsten Kukuk wrote:
> @@ -300,13 +299,15 @@
> if (result->gr_name[0] == '+' && result->gr_name[1] != '\0'
> && result->gr_name[1] != '@')
> {
> + char buf[strlen (result->gr_name)];
> enum nss_status status;
>
> /* Store the group in the blacklist for the "+" at the end of
> /etc/group */
> - blacklist_store_name (&result->gr_name[1], ent);
> + strcpy (buf, &result->gr_name[1]);
If you already compute strlen (result->gr_name), wouldn't it be better to
use it then (memcpy is faster than strcpy)?
size_t len = strlen (result->gr_name);
char buf[len];
enum nss_status status;
strcpy (buf, &result->gr_name[1], len);
Jakub
More information about the Libc-alpha
mailing list