Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 41985 invoked from network); 19 Jan 2011 14:47:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Jan 2011 14:47:35 -0000 Received: (qmail 16452 invoked by uid 500); 19 Jan 2011 14:47:31 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 16208 invoked by uid 500); 19 Jan 2011 14:47:28 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 16197 invoked by uid 99); 19 Jan 2011 14:47:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jan 2011 14:47:28 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.191.84.219] (HELO web82106.mail.mud.yahoo.com) (209.191.84.219) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 19 Jan 2011 14:47:21 +0000 Received: (qmail 50181 invoked by uid 60001); 19 Jan 2011 14:47:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s1024; t=1295448420; bh=9STTxzv6ZGoCB3Xx0pZPy66x1++e0U06ZThenW8nTAM=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Tn8RZKRG7M/SnhdvZRvv9w6068loONWuxUbcw5kbZaTqbja/hc2nK8lNmOhqoK7ouAxd2xjSYvoQQyEH9z05aRwY55Te6+gAyHr9zRwFPWggLGtUkWixu11yeGzeeBh48Sfoau1LwqrgAF74OZDybotQ1DIViTOvyetlxJ+kFuc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=p3aLYsE5GACVDVlVdVS0+5CyJXqAoBn62gN3Jou/N6sZaYrs+w9yROVvEW4gUzqAxosSeINpFEuTP4XpeQwS6uY/zOD7bmv1GpgZI9/KfAmv/P5iYDFW+l/agSsVFLUDGOlQb11xbSh8HwKJUtU2dPFwYBiMi9mZhlq6Zwm/ao4=; Message-ID: <359861.49928.qm@web82106.mail.mud.yahoo.com> X-YMail-OSG: G0sD9eUVM1lJCHch2q.ROrGR9yFB4_d27.FtgXmzLg.uDMm CXEhyjlX70wLd3zaZABp6qFUeBEkzelT2JUWHGUXoPbzqqnfomdmdnaaDctj 5.pBaG1m_qQ5jcUytSFBHjfRrqljoYdu8NZ0k_bQP6p.IFcm6YMgySPV6FcK mQGOx4xk6_ofEvi6pwjjstmRfFLj7pdvUg3L7rzfKdT7f0w.1kJ473EuuSuX e.wAGIFTlCWppXBTttodpnBojw_3DnzVGaA6MFWFzMm6upxEO_KCh_of3IRd pJRXCc.CcpQcZKOwtNNbIj95MTfJTFVk4eN0yb4KzFF_yTO88u.lEZNYClWP z5AaeMXtFJlO1yyDn_lXwebP0rCTFVRH90Cnl4BhPib_QSgGvwjQxXAmtoWr 4_w-- Received: from [75.25.120.243] by web82106.mail.mud.yahoo.com via HTTP; Wed, 19 Jan 2011 06:47:00 PST X-Mailer: YahooMailRC/555 YahooMailWebService/0.8.107.285259 References: <928641.10008.qm@web82108.mail.mud.yahoo.com> <1295425384.5603.20.camel@te-laptop> Date: Wed, 19 Jan 2011 06:47:00 -0800 (PST) From: Dennis Gearon Subject: Re: unix permission styles for access control To: solr-user@lucene.apache.org, te@statsbiblioteket.dk In-Reply-To: <1295425384.5603.20.camel@te-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable so fieldName.x ishow to address bits?=0A=0A Dennis Gearon=0A=0A=0ASignature= Warning=0A----------------=0AIt is always a good idea to learn from your o= wn mistakes. It is usually a better =0Aidea to learn from others=E2=80=99 m= istakes, so you do not have to make them yourself. =0Afrom 'http://blogs.te= chrepublic.com.com/security/?p=3D4501&tag=3Dnl.e036'=0A=0A=0AEARTH has a Ri= ght To Life,=0Aotherwise we all die.=0A=0A=0A=0A----- Original Message ----= =0AFrom: Toke Eskildsen =0ATo: "solr-user@lucene.ap= ache.org" =0ASent: Wed, January 19, 2011 12:23= :04 AM=0ASubject: Re: unix permission styles for access control=0A=0AOn Wed= , 2011-01-19 at 08:15 +0100, Dennis Gearon wrote:=0A> I was wondering if th= e are binary operation filters? Haven't seen any in the =0A> book nor was a= ble to find any using google.=0A> =0A> So if I had 0600(octal) in a permiss= ion field, and I wanted to return any =0A> records that 'permission & 0400(= octal)=3D=3DTRUE', how would I filter that?=0A=0ADon't you mean permission = & 0400(octal) =3D=3D 0400? Anyway, the=0Afunctionality can be accomplished = by extending your index a bit.=0A=0A=0AYou could split the permission into = user, group and all parts, then use=0Aan expanded query.=0A=0AIf the permis= sion is 0755 it will be indexed as=0Auser_p:7 group_p:5 all_p:5=0A=0AIf you= 're searching for something with at least 0650 your query should=0Abe expan= ded to =0A(user_p:7 OR user_p:6) AND (group_p:7 OR group_p:5)=0A=0A=0AAlter= natively you could represent the bits explicitly in the index:=0Auser_p:1 u= ser_p:2 user_p:4 group_p:1 group_p:4 all_p:1 all_p:5=0A=0AThen a search for= 0650 would query with=0Auser_p:2 AND user_p:4 AND group_p:1 AND group_p:4= =0A=0A=0AFinally you could represent all valid permission values, still spl= it=0Ainto parts with=0Auser_p:1 user_p:2 user_p:3 user_p:4 user_p:5 user_p:= 6 user_p:7=0Agroup_p:1 group_p:2 group_p:3 group_p:4 group_p:5=0Aall_p:1 al= l_p:2 all_p:3 all_p:4 all_p:5=0A=0AThe query would be simply=0Auser_p:6 AND= group_p:5