Opened 6 years ago

Closed 3 years ago

#202 closed defect (fixed)

libc gid setting is calling wrong backend function

Reported by: ydario Owned by: bird
Priority: normal Milestone: libc-0.6.4
Component: libc-backend Version:
Severity: normal Keywords:
Cc:

Description (last modified by bird)

gid related functions are calling uid backend, here is the supposed corrected source code:

Index: b_processCredentials.c
===================================================================
--- b_processCredentials.c	(revision 3523)
+++ b_processCredentials.c	(working copy)
@@ -135,7 +135,7 @@
 int __libc_Back_processSetGid(gid_t gid)
 {
     LIBCLOG_ENTER("gid=%d (%#x)\n", gid, gid);
-    int rc = __libc_spmSetUid(gid);
+    int rc = __libc_spmSetGid(gid);
     if (!rc)
         LIBCLOG_RETURN_INT(rc);
     LIBCLOG_ERROR_RETURN_INT(rc);
@@ -155,7 +155,7 @@
 int __libc_Back_processSetGidAll(gid_t rgid, gid_t egid, gid_t svgid)
 {
     LIBCLOG_ENTER("rgid=%d (%#x) egid=%d (%#x) svgid=%d (%#x)\n", rgid, rgid, egid, egid, svgid, svgid);
-    int rc = __libc_spmSetUidAll(rgid, egid, svgid);
+    int rc = __libc_spmSetGidAll(rgid, egid, svgid);
     if (!rc)
         LIBCLOG_RETURN_INT(rc);
     LIBCLOG_ERROR_RETURN_INT(rc);

Change History (3)

comment:1 Changed 4 years ago by bird

  • Description modified (diff)
  • Status changed from new to assigned

comment:2 Changed 3 years ago by bird

(In [3677]) 0.6: b_processCredentials.c: fixed copy and past bugs in the two group setting functions; were setting the UIDs instead of the GIDs. References #202.

comment:3 Changed 3 years ago by bird

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3678]) libc: Forwardporting r3677: b_processCredentials.c: fixed copy and past bugs in the two group setting functions; were setting the UIDs instead of the GIDs. Fixes #202.

Note: See TracTickets for help on using tickets.