Date: Thu, 12 Feb 1998 22:31:29 -0800 (PST) From: msagre@cactus.fi.uba.ar To: freebsd-gnats-submit@FreeBSD.ORG Subject: kern/5734: IBCS2 getgroups & ftime emulation Message-ID: <199802130631.WAA01729@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 5734 >Category: kern >Synopsis: IBCS2 getgroups & ftime emulation >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 12 22:40:01 PST 1998 >Last-Modified: >Originator: Miguel Angel Sagreras >Organization: Universidad de Buenos Aires >Release: 2.2.5 >Environment: FreeBSD viper.fi.uba.ar 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Wed Feb 4 01:45:17 ART 1998 root@viper.fi.uba.ar:/usr/src/sys/compile/VIPER i386 >Description: This bugs was reported last year. The patch was put into FreeBSD-current but not into 2.2.5-RELEASE The patch are same to FreeBSD-current >How-To-Repeat: >Fix: *** ibcs2_xenix.c.org Tue Feb 10 02:02:12 1998 --- ibcs2_xenix.c Tue Feb 3 22:57:30 1998 *************** *** 119,125 **** int *retval; { struct timeval tv; ! struct timeb itb; DPRINTF(("IBCS2: 'xenix ftime'\n")); microtime(&tv); --- 119,130 ---- int *retval; { struct timeval tv; ! struct ibcs2_timeb { ! unsigned long time __attribute__((packed)); ! unsigned short millitm; ! short timezone; ! short dstflag ; ! } itb; DPRINTF(("IBCS2: 'xenix ftime'\n")); microtime(&tv); *************** *** 129,135 **** itb.dstflag = tz.tz_dsttime != DST_NONE; return copyout((caddr_t)&itb, (caddr_t)SCARG(uap, tp), ! sizeof(struct timeb)); } int --- 134,140 ---- itb.dstflag = tz.tz_dsttime != DST_NONE; return copyout((caddr_t)&itb, (caddr_t)SCARG(uap, tp), ! sizeof(struct ibcs2_timeb)); } int *** ibcs2_misc.c.org Tue Feb 10 02:01:35 1998 --- ibcs2_misc.c Tue Feb 3 22:57:35 1998 *************** *** 653,662 **** if (SCARG(uap, gidsetsize)) { SCARG(&sa, gidset) = stackgap_alloc(&sg, NGROUPS_MAX * sizeof(gid_t *)); } - iset = stackgap_alloc(&sg, SCARG(uap, gidsetsize)*sizeof(ibcs2_gid_t)); if (error = getgroups(p, &sa, retval)) return error; for (i = 0, gp = SCARG(&sa, gidset); i < retval[0]; i++) iset[i] = (ibcs2_gid_t)*gp++; if (retval[0] && (error = copyout((caddr_t)iset, --- 653,665 ---- if (SCARG(uap, gidsetsize)) { SCARG(&sa, gidset) = stackgap_alloc(&sg, NGROUPS_MAX * sizeof(gid_t *)); + iset = stackgap_alloc(&sg, SCARG(uap, gidsetsize) * + sizeof(ibcs2_gid_t)); } if (error = getgroups(p, &sa, retval)) return error; + if (SCARG(uap, gidsetsize) == 0) + return 0; for (i = 0, gp = SCARG(&sa, gidset); i < retval[0]; i++) iset[i] = (ibcs2_gid_t)*gp++; if (retval[0] && (error = copyout((caddr_t)iset, >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802130631.WAA01729>