Applied. Thanks for reporting!
Jelmer
On Thu, May 01, 2003 at 11:30:13AM +0100, David Nixon wrote about '[Samba]
Disc quotas bug':> Hello,
> This HP specific bug report deals with the optional disc quota
> support.
> Local Environment
> ================
> Machine Arch: HP-PA
> Machine OS: HP-UX OS Version: 11.0
> Kernel: patched up to and including PHKL_27553,PHNE_27393
> Compiler: HP ANSI C compiler
> Libc Version: PHCO_28425 (libc cumulative patch)
> Samba Version: 2.2.8a
> Network Layout (description): Medium size; well switched
> What else is on machine (services, etc): NFS
> Bug Description
> ==============
> The (optional) disc quota support no longer works.
> The size and free space of a disc; rather than a user's disc
quota,
> was being returned to the Windows 2000 client.
> Examination of the source code [smbd/quotas.c, line 915] revealed
that
> an "#ifdef HPUX" hash define enclosing a new optimisation
- involving
> devnm(3) caching - had caused the following line:
> euser_id = geteuid();
> not to be executed: Hence failure of the subsequent line:
> r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D);
> to return quota information.
> Bug Fix
> ======
> [djn /home/staff3/tech/djn]$ diff -U 10 quotas.c.cln quotas.c
> XXXXXXXXXXXXXXXXXXXXXXXXX SNIP
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> --- quotas.c.cln Wed Mar 26 11:45:19 2003
> +++ quotas.c Wed Apr 30 10:21:57 2003
> @@ -913,22 +913,22 @@
> /* find the block device file */
> #ifdef HPUX
> /* Need to set the cache flag to 1 for HPUX. Seems
> * to have a significant performance boost when
> * lstat calls on /dev access this function.
> */
> if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_dev, dev_disk,
256, 1)<0))
> #else
> if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_dev, dev_disk,
256, 0)<0))
> - return (False);
> #endif /* ifdef HPUX */
> + return (False);
> #endif /* !defined(__FreeBSD__) && !defined(AIX) &&
!defined(__OpenBSD__) */
> euser_id = geteuid();
> #ifdef HPUX
> /* for HPUX, real uid must be same as euid to execute quotactl for euid
*/
> save_re_uid();
> if (set_re_uid() != 0) return False;
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
--
Jelmer Vernooij <jelmer@samba.org>
~/.plan:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :
http://lists.samba.org/archive/samba/attachments/20030501/ffd0c18c/attachment.bin