private static Native.Group CopyGroup(Native.Group group) { Native.Group g = new Native.Group(); g.gr_gid = group.gr_gid; g.gr_mem = group.gr_mem; g.gr_name = group.gr_name; g.gr_passwd = group.gr_passwd; return(g); }
public UnixGroupInfo(long group) { this.group = new Native.Group(); Native.Group?gr; int r = Native.Syscall.getgrgid_r(Convert.ToUInt32(group), this.group, out gr); if (r != 0 || gr == null) { throw new ArgumentException(Locale.GetText("invalid group id"), "group"); } }
public UnixGroupInfo(string group) { this.group = new Native.Group(); Native.Group?gr; int r = Native.Syscall.getgrnam_r(group, this.group, out gr); if (r != 0 || gr == null) { throw new ArgumentException(Locale.GetText("invalid group name"), "group"); } }
public UnixGroupInfo(Native.Group group) { this.group = CopyGroup(group); }