From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Dorfman Subject: Re: f2fs xattr and SELinux Date: Tue, 03 Dec 2013 18:31:01 +0200 Message-ID: <529E0745.70900@codeaurora.org> References: <29495453.293471385942943622.JavaMail.weblogic@epv6ml06> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: jaegeuk.kim@samsung.com, "linux-fsdevel@vger.kernel.org" Return-path: Received: from smtp.codeaurora.org ([198.145.11.231]:43179 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753885Ab3LCQbE (ORCPT ); Tue, 3 Dec 2013 11:31:04 -0500 In-Reply-To: <29495453.293471385942943622.JavaMail.weblogic@epv6ml06> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello all, As I can see from the code of system/extras/ext4_utils/make_ext4fs.c (it is utility to create android ext4 images from Google): ... ret = inode_set_selinux(entry_inode, dentries[i].secon); if (ret) error("failed to set SELinux context on %s\n", dentries[i].path); ... This utility creates security context per file on target filesystem, while running in userspace. I'm looking for similar process for f2fs filesystem. Probably this process will create seclabel configuration for F2FS. Any ideas? Thanks, Kostya On 12/02/2013 02:09 AM, Jaegeuk Kim wrote: > Hi, > > Could you check the config of F2FS? > There should be a seclabel config. > Thanks, > > > ------- Original Message ------- > Sender : Konstantin Dorfman > Date : 2013-12-02 02:09 (GMT+09:00) > Title : f2fs xattr and SELinux > > Hi all, > > I'm trying to use f2fs xattr with SELinux (on android) and getting > following error: > > root# restorecon -Rv /data > Relabeling /data from u:object_r:unlabeled:s0 to > u:object_r:system_data_file:s0. > Could not label /data with u:object_r:system_data_file:s0: Operation not > supported on transport endpoint > > Also, output of `ls -Z` command (all files/dirs are unlabeled): > > root# ls -Z /data > drwxrwx--x system system u:object_r:unlabeled:s0 app > drwxr-x--x root root u:object_r:unlabeled:s0 app_tests > drwxr-x--x root root u:object_r:unlabeled:s0 audio-encode > drwxr-x--x root root u:object_r:unlabeled:s0 busybox > drwxrwx--x system system u:object_r:unlabeled:s0 connectivity > drwxr-x--x root root u:object_r:unlabeled:s0 data_test > drwxr-x--x root root u:object_r:unlabeled:s0 evt-test > drwxr-x--x root root u:object_r:unlabeled:s0 fstest > drwxr-x--x root root u:object_r:unlabeled:s0 gps-test > drwxr-x--x root root u:object_r:unlabeled:s0 graphics_tests > drwxr-x--x root root u:object_r:unlabeled:s0 > instrumentation_tests > drwxr-x--x root root u:object_r:unlabeled:s0 kernel-tests > drwxrwx--- root root u:object_r:unlabeled:s0 lost+found > drwxrwx--- media_rw media_rw u:object_r:unlabeled:s0 media > > mount output is: > /dev/block/bootdevice/by-name/userdata /data f2fs > rw,nosuid,nodev,relatime,background_gc_on,discard,user_xattr,acl,active_logs=6 > 0 0 > > Any comments/ideas about why xattr is not working for me on f2fs? > > Thanks, > Kostya > -- sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation