Pavel Tsekov wrote:
On Fri, 22 Jul 2005, Roland Illig wrote:
I updated the patch.
Seems nice. How about removing the configure bits related to
getgrouplist() too ?
Done in PRE.
Roland
___
Mc-devel mailing list
Why do we use getgrouplist(3) at all? What we're interested in are the
permissions of the current process, not what's in the system-wide database.
Roland
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel
Roland Illig wrote:
Why do we use getgrouplist(3) at all? What we're interested in are the
permissions of the current process, not what's in the system-wide database.
After applying this patch, everything works as usual.
Why have we used a GTree for storing the group IDs of the process? In my
Roland Illig wrote:
Roland Illig wrote:
Why do we use getgrouplist(3) at all? What we're interested in are the
permissions of the current process, not what's in the system-wide
database.
After applying this patch, everything works as usual.
and here's a more readable variant of the
Hello,
On Fri, 22 Jul 2005, Roland Illig wrote:
Roland Illig wrote:
Why do we use getgrouplist(3) at all? What we're interested in are the
permissions of the current process, not what's in the system-wide database.
This question seems reasonable.
After applying this patch, everything
On Fri, Jul 22, 2005 at 10:23:27AM +0200, Roland Illig wrote:
+/* Return the index of the permissions triplet */
+int
+get_user_permissions (struct stat *buf) {
+static gboolean initialized = FALSE;
+static gid_t groups[NGROUPS_MAX];
NGROUPS_MAX can be fairly large, plus it is max
Jakub Jelinek wrote:
But, IMHO far better would be to:
static gid_t *groups;
if (!groups) {
uid = getuid ();
n = getgroups (0, NULL);
if (n 0) error_handling;
groups = malloc (n * sizeof (gid_t));
if (groups == NULL) error_handling;
n = getgroups (n, groups);
if (n 0)
Jakub Jelinek wrote:
But, IMHO far better would be to:
static gid_t *groups;
if (!groups) {
uid = getuid ();
n = getgroups (0, NULL);
if (n 0) error_handling;
groups = malloc (n * sizeof (gid_t));
if (groups == NULL) error_handling;
n = getgroups (n, groups);
if (n 0)
On Fri, 22 Jul 2005, Roland Illig wrote:
I updated the patch.
Seems nice. How about removing the configure bits related to
getgrouplist() too ?
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel
Pavel Tsekov wrote:
On Fri, 22 Jul 2005, Roland Illig wrote:
I updated the patch.
Seems nice. How about removing the configure bits related to
getgrouplist() too ?
That's obvious. ;)
Roland
___
Mc-devel mailing list
Roland Illig wrote:
+if (!initialized) {
+ uid = getuid ();
+ ngroups = getgroups (0, NULL);
+ if (ngroups != -1) {
/* allocate space for one more element
* than will be filled by getgroups(). */
+ groups = g_new (gid_t, ngroups + 1);
+
11 matches
Mail list logo