bugGNU patch - Bugs: bug #37417, patch-2.7 with --enable-xattr...

 
 

bug #37417: patch-2.7 with --enable-xattr causes patch to fail when kernel has selinux support but no filesystem xattr support

Submitted by:  None
Submitted on:  Fri 21 Sep 2012 06:21:17 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 22 Sep 2012 08:34:26 PM UTC, comment #6:

Ah, thanks, the Savannah UI had me confused.

It's weird, listxattr/getxattr return "unlabeled" for the "security.selinux" attribute, but giving the temp file in the same directory that same attribute fails. I cannot reproduce.

This isn't a patch bug anymore though.

Thanks!

Andreas Gruenbacher <agruen>
Project Administrator
Sat 22 Sep 2012 07:50:11 PM UTC, comment #5:

It is already attached here as strace.log, I should have mentioned that in my initial comment, sorry.

Ben Kohler <iamben>
Sat 22 Sep 2012 07:48:48 PM UTC, comment #4:

Ben, could you please still send the strace? Thanks!

Andreas Gruenbacher <agruen>
Project Administrator
Sat 22 Sep 2012 07:40:01 PM UTC, comment #3:

Yes this new snapshot (2.7.0.21-89e5) does take care of the issue, I tested again with both patch versions with the same config:

# ./patch-2.7 -p0 < test.patch
patching file file1
./patch-2.7: setting attributes for ./file1.onhQbrz: Operation not supported
# ./patch-2.7.0.21-89e5 -p0 < test.patch
patching file file1
#

Thanks!

Ben Kohler <iamben>
Sat 22 Sep 2012 06:48:10 PM UTC, comment #2:

This bug is probably fixed in the latest snapshot on alpha.gnu.org.

Andreas Gruenbacher <agruen>
Project Administrator
Fri 21 Sep 2012 07:50:41 PM UTC, comment #1:

Can I see the system call trace, "strace patch -p0 < test.patch"?

Andreas Gruenbacher <agruen>
Project Administrator
Fri 21 Sep 2012 06:21:17 PM UTC, original submission:

With patch-2.7's new xattr support enabled, patches fail to apply when running a linux kernel with CONFIG_SECURITY_SELINUX enabled but applying a patch on a filesystem without extended attributes enabled. As I understand it, enabling xattr support on patch should just make extended attribute support available, it should not require it globally.

Example (testing with reiserfs so I can unload/reload the module as needed):

# zgrep -e SECURITY_SELINUX -e REISERFS /proc/config.gz
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
CONFIG_DEFAULT_SECURITY_SELINUX=y

# patch -p0 < test.patch
patching file file1
patch: setting attributes for ./file1.oRGbAJv: Operation not supported

This causes the patch to fail writing the changes to disk altogether, it's not just a warning in this case.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #26607:  strace.log added by None (8KiB - text/x-log - "strace patch -p0 < test.patch" output)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by iamben (Posted a comment)
  • -unavailable- added by agruen (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Sep 2012 08:34:26 PM UTCagruenOpen/ClosedOpen=>Closed
    Sat 22 Sep 2012 06:48:10 PM UTCagruenStatusNone=>Fixed
    Fri 21 Sep 2012 06:21:17 PM UTCNoneAttached File-=>Added strace.log, #26607

    Back to the top


    Powered by Savane 3.1-cleanup1