From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Shilovsky Subject: Shared access flags Date: Wed, 29 Oct 2008 17:33:03 +0300 Message-ID: <4908741F.1080804@etersoft.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from mail.etersoft.ru ([87.249.47.46]:42253 "EHLO mail.etersoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753129AbYJ2NgS (ORCPT ); Wed, 29 Oct 2008 09:36:18 -0400 Received: from localhost (as.office.etersoft.ru [192.168.0.10]) by mail.etersoft.ru (Postfix) with ESMTP id ED62E28D1B1 for ; Wed, 29 Oct 2008 16:28:47 +0300 (MSK) Received: from mail.etersoft.ru ([192.168.0.1]) by localhost (as.office.etersoft.ru [192.168.0.10]) (amavisd-new, port 10024) with LMTP id 6hyx+4F1SFsk for ; Wed, 29 Oct 2008 16:28:46 +0300 (MSK) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello! We have situation during our work with Wine and Cifs-client then we have to use sharing access policy to files and we used 3 free bits from 21 to 23 of attribute flag(it allows to do NT-semantic for opening files in open() and it is neccesary for correct implementation of function NTCreateFile in Wine). We think that it'll be useful not only for us and we proffer to add into the file kernel/include/asm-generic/fcntl.h following flags: #define O_DENYREAD 004000000 /* Do not permit read access */ #define O_DENYWRITE 010000000 /* Do not permit write access */ #define O_DENYDELETE 020000000 /* Do not permit delete or rename operations*/ Yes, it'll change semantic of calling open() function, but by default(if not to use these flags) functionality won't changed, and if we use it we'll acquire new resources for organization file access policy. On the other hand, we patched cifs with inverting these flags, because according to CIFS protocol #define FILE_SHARE_ALL 0x00000007 ones have opposite meaning. Here is our patches http://git.etersoft.ru/people/kipruss/packages/?p=cifs-2.6.git;a=shortlog;h=refs/heads/etersoft-to-kernel Yours faithfully, Pavel Shilovsky.