Emmanuel Garette
2013-Oct-13 10:38 UTC
[Xapian-discuss] trouble with user's right indexing with omega
Hi,
I'm using omindex to index files and I want make query with user/group
boolean prefix (I*, I at ... and I#...). That work well with "other"
and
"group" right, but not in all case for "user" right.
Here is an example:
assume that we have an user "ftp" not in "users" group. If
file right are:
-rw-r------ 1 ftp users 13 2013-10-06 16:26 test.txt
# delve -t "I*" dbb/
term `I*' not in database
That's ok, "other" cannot read this file.
# delve -t "I#users" dbb/
Posting List for term `I#users' (termfreq 1, collfreq 0): 1
That's ok, group 'users' can read this file.
# delve -t "I at ftp" dbb/
term `I at ftp' not in database
That's wrong, user "ftp" can read this file.
As this user is not in "users" group, this user cannot find this file.
In omindex.cc, if I comment "inc_tag_added":
if (group) {
newdocument.add_boolean_term(string("I#") + group);
//inc_tag_added = true;
}
all is ok:
# delve -t "I at ftp" dbb/
Posting List for term `I at ftp' (termfreq 1, collfreq 0): 1
Why user's right are ignore when group has read right in the file? Is a
normal behavior or a bug?
Regards,
--
Emmanuel Garette
Ing?nieur logiciels libres
Cadoles (http://www.cadoles.com)
Experts EOLE, Gaspacho, logiciels libres
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL:
<http://lists.xapian.org/pipermail/xapian-discuss/attachments/20131013/741ee59f/attachment.sig>
Olly Betts
2013-Oct-13 23:26 UTC
[Xapian-discuss] trouble with user's right indexing with omega
On Sun, Oct 13, 2013 at 12:38:20PM +0200, Emmanuel Garette wrote:> In omindex.cc, if I comment "inc_tag_added": > > if (group) { > newdocument.add_boolean_term(string("I#") + group); > //inc_tag_added = true; > } > > all is ok: > > # delve -t "I at ftp" dbb/ > Posting List for term `I at ftp' (termfreq 1, collfreq 0): 1 > > Why user's right are ignore when group has read right in the file? Is a > normal behavior or a bug?Yes, it's a bug (the user and group readability aren't interesting for world-readable files, but user and group readability can of course confer readability separately). Thanks for spotting this - I've committed a fix. Cheers, Olly
Emmanuel Garette
2013-Oct-14 18:35 UTC
[Xapian-discuss] trouble with user's right indexing with omega
Le 14/10/2013 01:26, Olly Betts a ?crit :> On Sun, Oct 13, 2013 at 12:38:20PM +0200, Emmanuel Garette wrote: >> In omindex.cc, if I comment "inc_tag_added": >> >> if (group) { >> newdocument.add_boolean_term(string("I#") + group); >> //inc_tag_added = true; >> } >> >> all is ok: >> >> # delve -t "I at ftp" dbb/ >> Posting List for term `I at ftp' (termfreq 1, collfreq 0): 1 >> >> Why user's right are ignore when group has read right in the file? Is a >> normal behavior or a bug? > Yes, it's a bug (the user and group readability aren't interesting for > world-readable files, but user and group readability can of course > confer readability separately). > > Thanks for spotting this - I've committed a fix.Thanks for your reactivity! I'm working on an ACL's right support for omindex. I've send a patch in trac when it will be usable if you are interesting. Regards,> > Cheers, > Olly-- Emmanuel Garette Ing?nieur logiciels libres Cadoles (http://www.cadoles.com) Experts EOLE, Gaspacho, logiciels libres -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 901 bytes Desc: OpenPGP digital signature URL: <http://lists.xapian.org/pipermail/xapian-discuss/attachments/20131014/7f4c0c3c/attachment.sig>