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

P Ranjit Kumar ranjit at cup.hp.com
Wed Jan 16 12:24:09 GMT 2002


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));
>     }


Thanks,
Ranjit





More information about the samba-technical mailing list