[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[debian-hurd-Bugs][303084] visudo problems



Bugs item #303084, was changed at 2006-02-19 22:54 by Steven McDonald
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411594&aid=303084&group_id=30628

Status: Open
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: visudo problems 
Category: None
Group: None
Resolution: None


Initial Comment:
visudo says the sudoers file is busy, even if the machine had a fresh reboot.

----------------------------------------------------------------------

Comment By: Steven McDonald (steven-guest)
Date: 2012-01-08 18:08

Message:
Justus's fix to configure.in works for me, and I also see the segfault he mentioned if I run visudo as root (though not if I run 'sudo visudo' as a normal user).

I can't seem to attach a file to this bug, but here's a backtrace from gdb (with sudo rebuilt without dh_strip, and libc0.3-dbg installed):

http://ftp.steven-mcdonald.id.au/visudo_backtrace.txt

Despite the segfault, /etc/sudoers does get updated, which makes me curious as to why it's reaching this line of code at all -- reading visudo.c, this code seems to be part of the error handling for a failure to move the new sudoers file into place.

I'll report back later once I've dug a little deeper, just thought the backtrace might be helpful to others. I intend to file a bug in the Debian BTS on the sudo package once I have a working fix.

----------------------------------------------------------------------

Comment By: Justus Winter (teythoon-guest)
Date: 2010-05-07 04:35

Message:
Uh, I would attach that patch as a file to this bug, but it looks like I am too stupid to figure out how... the patch is mostly intact at the page source, looks like tabs are replaced by spaces and the quotes are xmlized...

----------------------------------------------------------------------

Comment By: Justus Winter (teythoon-guest)
Date: 2010-05-07 04:29

Message:
Yeah, lockf isn't implemented, but flock is and visudo can use either. They select the locking mechanism based on the target platform, here's a patch for configure.in:

~~~ snip ~~~
diff -r 91d8979bd32f configure.in
--- a/configure.in      Thu May 06 19:39:12 2010 +0200
+++ b/configure.in      Thu May 06 19:40:22 2010 +0200
@@ -1706,6 +1706,9 @@
                ;;
     *-gnu*)
                OSDEFS="${OSDEFS} -D_GNU_SOURCE"
+               # lockf() isn't implemented on the hurd -- use flock instead
+               ac_cv_func_lockf=no
+               ac_cv_func_flock=yes
                ;;
 esac
 
~~~ snip ~~~

With that patch I am able to visudo the sudoers file, but it segfaults when the editor exits. I can't debug this any further atm since gdb is broken on my debian installations...

----------------------------------------------------------------------

Comment By: Samuel Thibault (sthibault)
Date: 2010-03-02 22:19

Message:
IIRC the problem is that visudo uses record locking, which is not yet
supported on GNU/Hurd.


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411594&aid=303084&group_id=30628


Reply to: