savannah-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers] snapshots


From: Colin Walters
Subject: Re: [Savannah-hackers] snapshots
Date: 19 Apr 2002 00:01:12 -0400

On Thu, 2002-04-18 at 18:23, Gord Eagle wrote:

> Mostly, I remember that the alternative solutions were less portable
> and/or harder to maintain than the hack I suggested... 

I actually wasn't complaining about the approach in general (since I
don't know the details), rather just the use of inline i386 assembly to
make a system call, instead of just using the syscall glibc function.
I'm thinking of something like the following:

int
setgroups (size_t n, const gid_t *groups)
{
  size_t i;
  __kernel_gid_t kernel_groups[n];

  for (i = 0; i < n; i ++)
    kernel_groups[i] = groups[i];

  {
    int ret = syscall(__NR_setgroups, n, kernel_groups);
    return (ret);
  }
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]