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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1938886

Title:
  rrr:no dh_strip or strip loose setuid bit

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


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to