Recent sudo for QNX4?

Did anyone attempted a port of sudo more recent than v1.5.6p3 to QNX4?

Is it something beyond ./configure; make; make install process?

This post seems to indicate it is a simple compile.

Yes, getting the sudo to work was quite easy even for such a lamer as me.
However, the sudoedit part of it does not work - if I try editing a file, I get complains from mkstemp() that it was not able to open a copy of a file for Permission denied error.

The mkstemp() is not documented in Watcom v10.6B…

This was really easy!
:slight_smile:

I did not realize that sudoedit was running on the actual user’s priority credentials. The cause was that the temporary folder (/var/tmp) was not write-allowed for him.
I did it chmod a=rwxt tmp and everything works now.

[code]diff -ru sudo-1.6.8p8/Makefile.in sudo-1.6.8p8-QNX4/Makefile.in
— sudo-1.6.8p8/Makefile.in 2005-03-11 22:08:52.000000000 +0300
+++ sudo-1.6.8p8-QNX4/Makefile.in 2005-05-07 20:17:37.000000000 +0400
@@ -41,7 +41,7 @@
INSTALL = $(SHELL) $(srcdir)/install-sh -c

Libraries

-LIBS = @LIBS@
+LIBS = -llogin
NET_LIBS = @NET_LIBS@
SUDO_LIBS = @SUDO_LIBS@ @AFS_LIBS@ $(LIBS) $(NET_LIBS)

diff -ru sudo-1.6.8p8/getspwuid.c sudo-1.6.8p8-QNX4/getspwuid.c
— sudo-1.6.8p8/getspwuid.c 2005-03-24 02:44:46.000000000 +0300
+++ sudo-1.6.8p8-QNX4/getspwuid.c 2005-05-07 17:49:54.000000000 +0400
@@ -122,10 +122,14 @@
{
struct spwd *spw;

+#ifndef QNX
setspent();
+#endif
if ((spw = getspnam(pw->pw_name)) && spw->sp_pwdp)
epw = estrdup(spw->sp_pwdp);
+#ifndef QNX
endspent();
+#endif
if (epw)
return(epw);
}
[/code]