ip/cifsd: implement SMB_SET_FILE_UNIX_BASIC for wstat
This commit is contained in:
parent
e55ee7fafd
commit
0b12020f10
|
@ -1232,7 +1232,7 @@ static int
|
||||||
setfilepathinformation(Req *r, Dir *d, File *f, char *path, int level, uchar *b, uchar *p, uchar *e)
|
setfilepathinformation(Req *r, Dir *d, File *f, char *path, int level, uchar *b, uchar *p, uchar *e)
|
||||||
{
|
{
|
||||||
int attr, adt, atm, mdt, mtm, delete;
|
int attr, adt, atm, mdt, mtm, delete;
|
||||||
vlong len, atime, mtime;
|
vlong len, ctime, atime, mtime, mode;
|
||||||
Dir nd;
|
Dir nd;
|
||||||
|
|
||||||
nulldir(&nd);
|
nulldir(&nd);
|
||||||
|
@ -1282,6 +1282,22 @@ setfilepathinformation(Req *r, Dir *d, File *f, char *path, int level, uchar *b,
|
||||||
nd.length = len;
|
nd.length = len;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x0200: /* SMB_SET_FILE_UNIX_BASIC */
|
||||||
|
if(!unpack(b, p, e, "v________vvv____________________________________________v________",
|
||||||
|
&len, &ctime, &atime, &mtime, &mode))
|
||||||
|
goto unsup;
|
||||||
|
if(len != -1LL)
|
||||||
|
nd.length = len;
|
||||||
|
if(atime && atime != -1LL)
|
||||||
|
nd.atime = fromfiletime(atime);
|
||||||
|
if(mtime && mtime != -1LL)
|
||||||
|
nd.mtime = fromfiletime(mtime);
|
||||||
|
else if(ctime && ctime != -1LL)
|
||||||
|
nd.mtime = fromfiletime(ctime);
|
||||||
|
if(mode != -1LL)
|
||||||
|
nd.mode = (d->mode & ~0777) | (mode & 0777);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
logit("[%.4x] unknown SET infolevel", level);
|
logit("[%.4x] unknown SET infolevel", level);
|
||||||
return STATUS_OS2_INVALID_LEVEL;
|
return STATUS_OS2_INVALID_LEVEL;
|
||||||
|
|
Loading…
Reference in a new issue