misc/65326: jftpgw errors out with "Could not change the EUID to 65534: Operation not permitted"

Greg Panula greg.panula at lexisnexis.com
Thu Apr 8 08:00:29 PDT 2004


>Number:         65326
>Category:       misc
>Synopsis:       jftpgw errors out with "Could not change the EUID to 65534: Operation not permitted"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 08 08:00:28 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Greg Panula
>Release:        4.9-RELASE
>Organization:
>Environment:
FreeBSD proxy-01.lng-mpls.com 4.9-RELEASE-p4 FreeBSD 4.9-RELEASE-p4 #1: Wed Apr  7 04:43:38 CDT 2004     pang at proxy-01:/usr/obj/usr/src/sys/PROXY-01  i386
>Description:
jftpgw errors out with "Could not change the EUID to 65534" when making use of the "runasuser" feature.
>How-To-Repeat:
make && make install
/usr/local/sbin/jftpgw -f /usr/local/etc/jftpgw.conf.sample
>Fix:
Patch util.c to use setreuid instead of setuid

-------------->8-----------------
--- util.c.orig Thu Apr  8 09:52:20 2004
+++ util.c      Thu Apr  8 09:54:15 2004
@@ -249,21 +249,11 @@
                return -1;
        }
        if (what == EUID) {
-#ifdef HAVE_SETEUID
-               i = seteuid(uid);
-#else
-               /* HP-UX does not know seteuid() */
                i = setreuid(-1, uid);
-#endif
        } else if (what == UID) {
                i = setuid(uid);
        } else if (what == EGID) {
-#ifdef HAVE_SETEGID
-               i = setegid(gid);
-#else
-               /* HP-UX does not know setegid() */
                i = setregid(-1, gid);
-#endif
        } else  if (what == GID) {
                i = setgid(gid);
        }
------------------------8<-------------------
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list