From: "Aurélien Aptel" <aaptel-IBi9RG/b67k@public.gmane.org>
To: Shirish Pargaonkar
<shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-cifs <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: cifs unable to access shares with read restricted at root level (bso#8950)
Date: Thu, 29 Oct 2015 11:59:21 +0100 [thread overview]
Message-ID: <20151029115921.6e9f7c4b@aaptelpc> (raw)
In-Reply-To: <CADT32eJrSGmKW4ksKMNKS1KAYDcN8UxLGPLfm8+Ag9mCxkNdYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2888 bytes --]
Oops, I forgot to CC my last email to the mailing list; re-sending now.
On Tue, 27 Oct 2015 19:43:46 -0500 Shirish Pargaonkar
<shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Tue, Oct 27, 2015 at 4:59 AM, Aurélien Aptel <aaptel-IBi9RG/b67k@public.gmane.org>
> wrote:
> > Hi Shirish,
> >
> > On Mon, 26 Oct 2015 22:04:28 -0500 Shirish Pargaonkar
> > <shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >> They are stored in a linked list of struct cifs_rdelem off of
> >> superblock where each element of this linked list points to a
> >> disconnected dentry.
> >
> > This list is only used use when we mount with noserverino. It
> > doesn't work in both case anyway.
>
> No, that is not the case. I have tested this against a Windows 2012
> server and did not mount the shares with noserverino option.
> Since we can query info off of disconnected entires, we fill the
> inodes which get filled with correct inode info as dentires get
> spliced.
The only function that adds elements to the rdlist is this one, and it
only does so with noserverino. I believe d_obtain_alias() doesn't store
the full path on the share associated with the disconnected entry it creates.
The full path is therefore lost and build_path_from_dentry() fails.
static struct dentry *
create_root_dis_dentry(struct super_block *sb, struct inode *rinode,
char *fpath)
{
int rc;
unsigned int xid;
struct dentry *dentry = NULL;
struct cifs_rdelem *rdelem = NULL;
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
printk("create_root_dis_dentry %s, rinode %p\n", fpath, rinode);
xid = get_xid();
if (tcon->unix_ext)
rc = cifs_get_inode_info_unix(&rinode, fpath, sb, xid);
else
rc = cifs_get_inode_info(&rinode, fpath, NULL, sb, xid, NULL);
free_xid(xid);
if ((rc == 0) && (rinode != NULL)) {
dentry = d_obtain_alias(rinode);
if (IS_ERR(dentry)) {
iput(rinode);
goto rdelem_ret;
}
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) {
rdelem =
cifs_alloc_rdelem(fpath, dentry, rinode);
if (IS_ERR(rdelem))
goto rdelem_ret;
spin_lock(&cifs_sb->rtdislock);
list_add(&rdelem->rdlist, &cifs_sb->rtdislist);
spin_unlock(&cifs_sb->rtdislock);
}
return dentry;
}
rdelem_ret:
return ERR_PTR(-EACCES);
}
> Sorry, missed looking at the link before. yes, the same setup.
> I could never get right seutp for Samba server.
I must be missing something because I cannot make your patch work.
We're using the exact same setup.
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
Nürnberg)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-10-29 10:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 12:18 cifs unable to access shares with read restricted at root level (bso#8950) Aurélien Aptel
2015-10-26 12:54 ` Aurélien Aptel
2015-10-27 3:04 ` Shirish Pargaonkar
[not found] ` <CADT32eJgrjigh_ezCAJK-ivO-t_yygPEhgwoHKsE-8EdVxKP+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-27 9:59 ` Aurélien Aptel
2015-10-28 0:43 ` Shirish Pargaonkar
[not found] ` <CADT32eJrSGmKW4ksKMNKS1KAYDcN8UxLGPLfm8+Ag9mCxkNdYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-29 10:59 ` Aurélien Aptel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151029115921.6e9f7c4b@aaptelpc \
--to=aaptel-ibi9rg/b67k@public.gmane.org \
--cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=shirishpargaonkar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox