Samba 2.2 Top Of Tree - Returns wrong error code for disk full condition.

Jeremy Allison jra at samba.org
Wed Jan 16 12:32:02 GMT 2002


On Wed, Jan 16, 2002 at 12:30:10PM -0800, P Ranjit Kumar wrote:
> Hi
> 
> I am testing Samba 2.2 Top of tree version and found that it returns
> ERRnoaccess for diskfull or quota exceeded errors.
> 
> I think Samba should check for disk full/quota error before returning and
> return appropriate error code.
> 
> The following fix in smbd/reply.c corrects it.
> 
> 
> diff -r1.6 reply.c
> 2685c2685
> <       if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
> ---
> >   if(((nwritten == 0) && (numtowrite != 0))||(nwritten < 0)) {
> 2686a2687,2691
> >     if((errno == EDQUOT) || (errno == ENOSPC))
> >     {
> >       DEBUG(5, ("reply_write_and_X: Quota or No Space error, returning NT
> Disk Full Error\n"));
> >       return(ERROR_BOTH(NT_STATUS_DISK_FULL,ERRHRD,ERRdiskfull));
> >     }
> 2688c2693
> <   }
> ---
> > }
> 2779a2785
> >
> 2780a2787,2791
> >     if( (errno == EDQUOT) || (errno == ENOSPC))
> >     {
> >       DEBUG(5, ("reply_write_and_X: Quota or No Space error, returning NT
> Disk Full Error\n"));
> >       return(ERROR_BOTH(NT_STATUS_DISK_FULL,ERRHRD,ERRdiskfull));
> >     }

Hmmmm. The UNIXERROR macro should be returning these by default if
the underlying error was such.

Jeremy.




More information about the samba-technical mailing list