Severity: normal

On 08/26/2013 04:52 AM, Russ Allbery wrote:
> Package: cpm
> Version: 0.28-1
> Severity: grave
> Justification: renders package unusable
> 
> cpm 0.28-1 fails to start at all on i386 systems.  No matter how it
> is run, it just produces the errors:
> 
> Failed to scan kernel release. (Success, 0)
> Cannot drop root privileges. (684)
> 
> It does work on amd64.  I also tried 0.26-1, but it has the same
> problem.
> 

Actually, it's not the architecture, but your kernel release which is
the likely cause for this failure.

This is upstream https://github.com/comotion/cpm/issues/35

Although this is a priority, it should not break all i386 systems.
Please try out the following patch and see if it fixes the issue:

diff --git a/security.c b/security.c
index 4735636..52479b7 100644
--- a/security.c
+++ b/security.c
@@ -454,9 +454,14 @@ int check_kernel_version()
   }else if(!strncmp(uts.sysname, "Linux", 5)){
     int maj,min,rel;
     if(sscanf(uts.release, "%d.%d.%d", &maj, &min, &rel) != 3) {
-      fprintf(stderr, "%s (%s, %d)\n",
-              _("Failed to scan kernel release."),
-              strerror(errno),errno);
+      // maybe it's a 3.10-rc3 release.
+      if(sscanf(uts.release, "%d.%d", &maj, &min) != 2) {
+         fprintf(stderr, "%s (%s, %d)\n",
+                 _("Failed to scan kernel release."),
+                 strerror(errno),errno);
+         return 0;
+      }
+      rel = 9; // instead of passing garbage
     }else{
       //fprintf(stdout, "kernel rel: %d.%d\n", maj, min);
       if(maj > 2 ||




Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to