You are not logged in.

#1 2004-09-25 09:14:35

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

k3b only working as root again

With  k3b 0.11.17-1 and udev I get 'cannot allocate memory' when trying to use it.  It works fine as root.  I have been playing around with my udev.permissions (after the problem came up to try to fix it) but I have not found the problem yet.  Please help.

Offline

#2 2004-09-26 05:47:17

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: k3b only working as root again

I found the log info:

/usr/bin/cdrecord: Warning: Linux-2.6.8 introduced incompatible interface changes.
/usr/bin/cdrecord: Warning: SCSI transport does no longer work for suid root programs.
/usr/bin/cdrecord: Warning: if cdrecord fails, try to run it from a root account.
...
SCSI buffer size: 64512
/usr/bin/cdrecord: Cannot allocate memory. Cannot get SCSI I/O buffer.

I have been running 2.6.8.1 for a while and this only seems to have come up in the latest k3b.  I rolled back to 0.11.16 and it is working for me again.  It seems that the older version uses cdrdao for iso images and the new one uses cdrecord.

Offline

#3 2004-09-26 16:59:06

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: k3b only working as root again

Doesn't k3b-setup automatically set up permissions and stuff for user access when you run it?

Dusty

Offline

#4 2004-09-26 18:24:21

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: k3b only working as root again

I thought it was someting like that too, that is why I was screwing around with udev permissions, but it is really a problem with kernel 2.6.8.x+ and cdrecord. 

You are right, k3bsetup will set the permissions correctly (with udev you set them in /etc/udev/permissions.d/... or you need to run k3bsetup after every reboot).  But it is not just about the permissions.  You cannot even use cdrecord on the command line anymore (unless you are root), even with a chmod on it.

Offline

#5 2004-09-26 19:34:46

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: k3b only working as root again

I went to k3b and cdrecord and many had already complained about this.  The official cdrecord solution is to not use 2.6.8.x+.   Someone on the k3b forum said it works fine if you have the 2.6.8.1 patches (arch already does) and you patch cdrecord.

Applying this patch to cdrecord (in the cdrtools package) will make it work as a user again.

--- cdrtools-2.01/cdrecord/cdrecord.c   2004-09-08 10:26:35.000000000 -0700
+++ cdrecord.c  2004-09-26 12:22:54.000000000 -0700
@@ -492,8 +492,9 @@
        /*
         * XXX Below this point we do not need root privilleges anymore.
         */
-       if (geteuid() != getuid()) {    /* AIX does not like to do this */
+       /*if (geteuid() != getuid()) {  /* AIX does not like to do this */
                                        /* If we are not root           */
+                                       /*
 #ifdef HAVE_SETREUID
                if (setreuid(-1, getuid()) < 0)
 #else
@@ -504,8 +505,8 @@
 #endif
 #endif
                        comerr("Panic cannot set back effective uid.n");
-       }
-       /*
+       }*/
+       /*
         * WARNING: We now are no more able to do any privilleged operation
         * unless we have been called by root.
         *
@@ -1009,10 +1010,10 @@
                 * even on OS that do not support getreuid() which is *BSD
                 * and SUSv3 only.
                 */
-               if (oeuid != getuid()) {
+               /*if (oeuid != getuid()) {
                        if (setreuid(-1, oeuid) < 0)
                                errmsg("Could set back effective uid.n");
-               }
+               }*/
 #endif
                /*
                 * fork() here to start the extra process needed for
@@ -1027,11 +1028,12 @@
                /*
                 * XXX Below this point we never need root privilleges anymore.
                 */
-               if (geteuid() != getuid()) {    /* AIX does not like to do this*/
+             /*if (geteuid() != getuid()) {*/  /* AIX does not like to do this*/
                                                /* If we are not root          */
-                       if (setreuid(-1, getuid()) < 0)
+               /*      if (setreuid(-1, getuid()) < 0)
                                comerr("Panic cannot set back effective uid.n");
-               }
+               }*/
+
 #endif
        }
        if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {

Offline

#6 2004-09-26 20:31:36

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,377
Website

Re: k3b only working as root again

post a bug against cdrtools to apply this patch


The impossible missions are the only ones which succeed.

Offline

#7 2004-09-26 22:08:16

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: k3b only working as root again

Ok, I will.  Thanks.

It is a hack.   It just comments out the 3 sections where the check is made (and cdrecord exits in one if it is not run as root).   I get the impression that the cdrecord developer wants the kernel to change back.   There is obviously work to be done with this stuff.

Offline

#8 2004-09-27 20:34:41

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 246

Re: k3b only working as root again

I'using 2.6.9-rc2 kernel and k3b 0.11.17. It works only if cdrecord is *not* suided. Permissions to my recorder are 660.


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#9 2004-09-28 02:31:33

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: k3b only working as root again

I never thought of that, I will have a better look at the code.

Offline

#10 2004-10-01 18:35:26

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: k3b only working as root again

Having problems with k3b also.

What is the present staus on the kernel versus k3b mixup?


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2004-10-01 22:06:13

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,377
Website

Re: k3b only working as root again

lilsirecho wrote:

Having problems with k3b also.

What is the present staus on the kernel versus k3b mixup?

i tested different combinations:

it seems that k3b .17 accepts only 2.6.9.X kernels to burn non-root (no matter, what behaviour the kernel has), so the kernels in arch will not work (unfortunately) - the upgrade to 2.6.9.X brings it back, but the .9-rcY ones are not at all stable for me (crashed a lot of times), so the latest great kernel to be used for k3b is in fact 2.6.7

hope the 2.6.9 will be a good one ;-)

PS
the best kernels in linux history (as i see it):
2.0: 2.0.36
2.2: 2.2.18
2.4: 2.4.24
2.6: not yet a _really good_ one


The impossible missions are the only ones which succeed.

Offline

#12 2004-10-02 02:46:50

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: k3b only working as root again

I think 2.6.7 was pretty good. 

I am using that 2.6.9-rc2 nitro1 build hyp0luxa posted.  So far it has been good for everything except cd burning.  The problem i have is the cdrecord not wanting to allow the suid.  Doing a chmod on cdrecord makes k3b work, but leaves the burner unable to operate any more than about 16x without sucking the buffer empty.  It seems that even applying the patch and recompiling cdrtools (and chmod suid back) only gets me about 24x with this kernel/k3b/cdrtools.     

At present, my solution has been to roll back to the .16 k3b and just leave the recompiled cdrtools in place.  Thus everything works (but sometimes slow) if I chose to boot 2.6.7, 2.6.8.1, or 2.6.9rc.

Offline

Board footer

Powered by FluxBB