Le 2002.06.14 17:34, Wolfgang Jährling a écrit :
PUYDT Julien <julien.puydt@club-internet.fr> wrote: > As a beginner, I would be happy to have some advice/comment... To make the getresuid () function behave like the according Linux system call (and make it slightly more robost), it should be done like that (same for getresgid ()). Oh, and I also made a small mistake when I told you to use 0, as the size is also a pointer.
Those params where not explicit in auth.defs either... How could I know they were needed? (honest question, not aggressive)
But as you forgot to pass the second argument to munmap (), your code shouldn't even have compiled...
It did compile. And I didn't really forget the second argument. I'm a newbie both to
the hurd and to C programming, so I don't know how to manage memory.You(Wolfgang) told me to use munmap, I did the obvious; it was bad but it
compiled, so I guess it is a case of beginner's luck ;-)
Of course, this is untested.
My post was perhaps unclear: I only _compiled_ successfully, I had not made packages, and not run anything. So in a sense that was untested too.
<snip of the source of a correct function to use auth ids>
I understand what was done in that function and understand what my function lacked; you'll find the new patch adding GNU support to nethack-3.4.0.orig attached. The patch to debianize the nethack-3.4.0+gnu hasn't changed, it can be found in my previous post.
I have done something more than modifying my patch (and you'll easily understand why I do not give a patch for that): I butchered the debian/rules to be able to build the packages without qt. This, with some magic symlinking of X libs to /lib, made it possible to _test_ the execs. And I can now tell you: - nethack-x11 works; - I still suck at nethack; - nethack-gnome works; - I'm not better with the gnome variant. Thanks again to Wolfgang! Snark on #hurd, #hurdfr
Attachment:
nethack-3.4.0+gnu.diff.bz2
Description: BZip2 compressed data