I updated debugedit to 5.0 version, the changelog looks like adding some
errors when chmod can't be done correctly


@@ -3419,7 +3431,8 @@
     }
 
   /* Make sure we can read and write */
-  chmod (file, stat_buf.st_mode | S_IRUSR | S_IWUSR);
+  if (chmod (file, stat_buf.st_mode | S_IRUSR | S_IWUSR) != 0)
+    error (0, errno, "Failed to chmod input file '%s' to make sure we can read 
and write", file);
 
   fd = open (file, O_RDWR);
   if (fd < 0)
@@ -3635,7 +3648,8 @@
   close (fd);
 
   /* Restore old access rights */
-  chmod (file, stat_buf.st_mode);
+  if (chmod (file, stat_buf.st_mode) != 0)
+    error (0, errno, "Failed to chmod input file '%s' to restore old access 
rights", file);
 
   free ((char *) dso->filename);
   destroy_strings (&dso->debug_str);

@@ -349,7 +352,8 @@
        }
 
       /* Make sure we can read and write */
-      chmod (fname, stat_buf.st_mode | S_IRUSR | S_IWUSR);
+      if (chmod (fname, stat_buf.st_mode | S_IRUSR | S_IWUSR) != 0)
+       error (0, errno, _("cannot chmod \"%s\" to make sure we can read and 
write"), fname);
 
       bool failed = false;
       int fd = open64 (fname, O_RDWR);
@@ -386,7 +390,8 @@
        }
 
       /* Restore old access rights. Including any suid bits reset. */
-      chmod (fname, stat_buf.st_mode);
+      if (chmod (fname, stat_buf.st_mode) != 0)
+       error (0, errno, _("cannot chmod \"%s\" to restore old access rights"), 
fname);
 
       if (failed)
        failed_count++;

and similar.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/1938886

Title:
  rrr:no dh_strip or strip loose setuid bit

Status in binutils package in Ubuntu:
  New
Status in debhelper package in Ubuntu:
  New
Status in debugedit package in Ubuntu:
  New
Status in virtualbox package in Ubuntu:
  New

Bug description:
  Over at https://launchpadlibrarian.net/550715513/buildlog_ubuntu-
  hirsute-amd64.virtualbox_6.1.22-dfsg-2~ubuntu1.21.04.2_BUILDING.txt.gz

  I have rebuilt an earlier version of virtualbox, that sets Rules-
  Requires-Root: no and added extra ls statements to find where/when/why
  setuid bits are getting lost after fixperms.

  make[1]: Leaving directory '/<<PKGBUILDDIR>>'
     debian/rules override_dh_strip
  make[1]: Entering directory '/<<PKGBUILDDIR>>'
  ls -latr debian/virtualbox/usr/lib/virtualbox/VBoxSDL
  -rwsr-sr-x 1 buildd buildd 406808 Jul 29 14:34 
debian/virtualbox/usr/lib/virtualbox/VBoxSDL
  ...
  dh_strip --dbgsym-migration='virtualbox-dbg'
  debugedit: debian/virtualbox/usr/lib/virtualbox/VBoxSDL.so: Unknown DWARF 
DW_FORM_0x1f20
  a7cf3c43c8b18c3261d2d4737a475bf730ad1554

  ls -latr debian/virtualbox/usr/lib/virtualbox/VBoxSDL
  -rwxr-xr-x 1 buildd buildd 166208 Jul 29 14:35 
debian/virtualbox/usr/lib/virtualbox/VBoxSDL

  It seems to me that either dh_strip or something it calls (strip,
  debugedit) looses the setuid permission in hirsute and up.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1938886/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to