cvs commit: src/lib/libarchive archive_write_disk.c src/lib/libarchive/test test_write_disk_perms.c

Tim Kientzle kientzle at
Sun Aug 12 10:35:06 PDT 2007

kientzle    2007-08-12 17:35:05 UTC

  FreeBSD src repository

  Modified files:
    lib/libarchive       archive_write_disk.c 
    lib/libarchive/test  test_write_disk_perms.c 
  Make suid/sgid restore be "opportunistic" if
  owner restore is not requested.  If you ask
  for permissions to be restored but not owner,
  you will now get no error if suid/sgid bits
  cannot be set.  (It's a security hole to restore
  suid/sgid bits if the owner/group aren't restored.)
  This fixes an obscure problem where a simple
  "tar -xf" with no other options will sometimes
  fail gratuitously because of suid/sgid bits.
  This is causing occasional problems for people
  using bsdtar as a drop-in replacement for
  "that other tar program." ;-)
  Note: If you do ask for owner restore, then suid/sgid
  restore failures still issue an error.  This
  only suppresses the error in the case where an
  suid/sgid bit restore fails because of an owner
  mismatch and owner restore was not requested.
  Approved by: re (bmah)
  MFC after: 7 days
  Revision  Changes    Path
  1.14      +22 -6     src/lib/libarchive/archive_write_disk.c
  1.7       +60 -10    src/lib/libarchive/test/test_write_disk_perms.c

More information about the cvs-src mailing list