changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: ip/cifsd: dont return garbage in upper 32 bit of unix extension stat fields

changeset 7385: 6e69acb02881
parent 7384: cfe13a9d53a3
child 7386: c2b1522cb6c7
author: cinap_lenrek@felloff.net
date: Wed, 11 Sep 2019 15:41:14 +0200
files: sys/src/cmd/ip/cifsd/smb.c
description: ip/cifsd: dont return garbage in upper 32 bit of unix extension stat fields
     1.1--- a/sys/src/cmd/ip/cifsd/smb.c
     1.2+++ b/sys/src/cmd/ip/cifsd/smb.c
     1.3@@ -1074,11 +1074,11 @@ fpackdir(Req *r, Dir *d, Tree *t, int i,
     1.4 			0, i,
     1.5 			dlen, alen,
     1.6 			mtime, atime, mtime,
     1.7-			unixuid(d->uid), unixgid(d->gid), unixtype(d),
     1.8-			0, 0, /* MAJ/MIN */
     1.9-			d->qid.path,
    1.10-			d->mode & 0777,
    1.11-			1,	/* NLINKS */
    1.12+			(vlong)unixuid(d->uid), (vlong)unixgid(d->gid), unixtype(d),
    1.13+			0LL, 0LL, /* MAJ/MIN */
    1.14+			(vlong)d->qid.path,
    1.15+			(vlong)d->mode & 0777,
    1.16+			1LL,	/* NLINKS */
    1.17 			&namep, r->o->namepack, d->name);
    1.18 		break;
    1.19 
    1.20@@ -1140,11 +1140,11 @@ qpackdir(Req *, Dir *d, Tree *t, File *f
    1.21 		return pack(b, p, e, "vvvvvvvlvvvvv",
    1.22 			dlen, alen,
    1.23 			mtime, atime, mtime,
    1.24-			unixuid(d->uid), unixgid(d->gid), unixtype(d),
    1.25-			0, 0, /* MAJ/MIN */
    1.26-			d->qid.path,
    1.27-			d->mode & 0777,
    1.28-			link);	/* NLINKS */
    1.29+			(vlong)unixuid(d->uid), (vlong)unixgid(d->gid), unixtype(d),
    1.30+			0LL, 0LL, /* MAJ/MIN */
    1.31+			(vlong)d->qid.path,
    1.32+			(vlong)d->mode & 0777,
    1.33+			(vlong)link);	/* NLINKS */
    1.34 	default:
    1.35 		logit("[%.4x] unknown QUERY infolevel", level);
    1.36 		return -1;