Subject: [863] gid-problems - AIX

From: "Dr. Jutta Weisel" <[email-masked]>
Date: Thu, 08 Dec 1994 11:11:20 +0200

Hello,
is anybody running wu-ftpd on RS/6000-AIX-3.2.5? I have wu-ftpd 2.4  
running on rsrz02.hrz.uni-marburg.de and as far as I see, the groupid's
are not set correctly. When I ftp-login with any username/password my
effective groupid is 0. I can't access the directories of my group,
when I "put" a file in my directory it gets grouid 0 . Autogroup and upload
for anonymous users don't work either (~ftp/etc/passwd and group exist).
class, deny, limit, loginfails, log ... work fine. Could somebody give we
a hint?

J. Weisel

---------------------------------------------------------------
HRZ, Hans Meerwein Strasse, 35032 Marburg, Tel. (06421) 28-3572

---

From: Rainer Schoepf <[email-masked]>
Date: Thu, 08 Dec 1994 11:46:38 +0100

> class, deny, limit, loginfails, log ... work fine. Could somebody give we

The following diff does it for me: initgroups needs to be called
before setegid. Actually, I think that this should be done for all
architectures.

diff -c -r1.1 -r1.2
*** 1.1 1994/07/19 10:23:42
--- 1.2 1994/07/22 14:07:10
***************
*** 1091,1098 ****
--- 1091,1104 ----
          (void) acl_autogroup(pw);
  
      login_attempts = 0;         /* this time successful */
+ 
+ #ifdef AIX
+     (void) initgroups(pw->pw_name, pw->pw_gid);
+     (void) setegid((gid_t) pw->pw_gid);
+ #else
      (void) setegid((gid_t) pw->pw_gid);
      (void) initgroups(pw->pw_name, pw->pw_gid);
+ #endif
  
      /* open wtmp before chroot */
      (void) sprintf(ttyline, "ftp%d", getpid());

Hope that helps

Rainer

-- 
   Rainer Schoepf
   Zentrum fuer Datenverarbeitung
    der Universitaet Mainz
   Anselm-Franz-von-Bentzel-Weg 12   
   D-55099 Mainz
   Germany
   <[email-masked]>