svn commit: samba r22874 - in branches/SAMBA_4_0/source: ntvfs/ipc torture/raw

Andrew Bartlett abartlet at samba.org
Tue May 15 06:54:44 GMT 2007


On Tue, 2007-05-15 at 08:43 +0200, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> >  /*
> > @@ -602,6 +609,39 @@
> >  static NTSTATUS ipc_qfileinfo(struct ntvfs_module_context *ntvfs,
> >  			      struct ntvfs_request *req, union smb_fileinfo *info)
> >  {
> > +	struct ipc_private *private = ntvfs->private_data;
> > +	switch (info->generic.level) {
> > +	case RAW_FILEINFO_GENERIC: 
> > +	{
> > +		struct pipe_state *p;
> > +		p = pipe_state_find(private, info->generic.in.file.ntvfs);
> > +		if (!p) {
> > +			return NT_STATUS_INVALID_HANDLE;
> > +		}
> > +		ZERO_STRUCT(info->generic.out);
> > +		info->generic.out.attrib = FILE_ATTRIBUTE_NORMAL;
> > +		info->generic.out.fname.s = strrchr(p->pipe_name, '\\');
> > +		info->generic.out.alloc_size = 4096;
> > +		info->generic.out.nlink = 1;
> > +		/* What the heck?  Match Win2k3: IPC$ pipes are delete pending */
> > +		info->generic.out.delete_pending = 1;
> > +		return NT_STATUS_OK;
> > +	}
> > +	case RAW_FILEINFO_ALT_NAME_INFO:
> > +	case RAW_FILEINFO_ALT_NAME_INFORMATION:
> > +	case RAW_FILEINFO_STREAM_INFO:
> > +	case RAW_FILEINFO_STREAM_INFORMATION:
> > +	case RAW_FILEINFO_COMPRESSION_INFO:
> > +	case RAW_FILEINFO_COMPRESSION_INFORMATION:
> > +	case RAW_FILEINFO_NETWORK_OPEN_INFORMATION:
> > +	case RAW_FILEINFO_ATTRIBUTE_TAG_INFORMATION:
> > +		return NT_STATUS_INVALID_PARAMETER;
> > +	case  RAW_FILEINFO_ALL_EAS:
> > +		return NT_STATUS_ACCESS_DENIED;
> > +	default:
> > +		return ntvfs_map_qfileinfo(ntvfs, req, info);
> > +	}
> > +	
> 
> Hi Andrew,
> 
> are you sure that the other levels always give INVALID_PARAMETER and
> not INVALID_HANDLE even if the handle isn't valid?

I didn't explore that, but that seems reasonable.  Any suggestions on a
reliably un-used fnum?  (0xffff)?

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.                  http://redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20070515/1dcc8332/attachment.bin


More information about the samba-technical mailing list