[netatalk-admins] special bits and such


Subject: [netatalk-admins] special bits and such
From: a sun (asun@zoology.washington.edu)
Date: Fri Nov 07 1997 - 16:07:17 EST


in case people are interested, my next patch (a18) will have
modifications to allow retention of special permission bits. here's
what i did:
        1) altered DEFMASK in ad_open.c to 7700.
        2) added a change_perm (given at end) to unix.c.
        3) replaced all but one of the chmod's with change_perm's (one
           of the chmod's actually has stat information already, so i
           just used that).
        4) presto! setgid bits now stay and propagate.

#ifndef __GNUC__
#define __inline__
#endif

static __inline__ int change_perm(const char *path, mode_t mode)
{
  struct stat st;

  if (stat(path, &st) < 0) {
    return -1;
  }
  return chmod(path, (st.st_mode & 07000) | mode);
}



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:28:01 EST