sandbox cleanup

Hal Murray hmurray at megapathdsl.net
Thu Jun 1 23:09:40 UTC 2017


>> The cast to gid_t doesn't seem necessary.  (static gid_t sw_gid;)
> Depends on the OS, remove the cast and you'll get warnings.

> The cast was added in commit 6791d614ca5128882e6e16bb695c17c052ba5591 to
> fix warnings.  Checking git log is usually the fastest way to answer many
> qustions.

-               if (user && initgroups(user, (int)sw_gid)) {
+               if (user && initgroups(user, (gid_t)sw_gid)) {

That didn't add a cast, it replaced a bogus one.

sw_gid is defined as a gid_t:
  static gid_t sw_gid;

More cruft.  There is a lump of variables, including gid_t that are defined 
at the module level yet only used inside the one subroutine in that module.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list