]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Compile fixes for Linux PRIVSEP anongit/PRIVSEP github-selfhosted/PRIVSEP github/PRIVSEP
authorDamien Miller <djm@mindrot.org>
Wed, 13 Mar 2002 02:46:44 +0000 (13:46 +1100)
committerDamien Miller <djm@mindrot.org>
Wed, 13 Mar 2002 02:46:44 +0000 (13:46 +1100)
monitor.c
monitor_mm.h
monitor_wrap.c

index b857902714730179339f30c3def736f16c34d221..9e629cf8e237472b533bc25839175c5aa1f8a617 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -366,7 +366,11 @@ mm_answer_pwnamallow(int socket, Buffer *m)
        buffer_put_cstring(m, pwent->pw_name);
        buffer_put_cstring(m, "*");
        buffer_put_cstring(m, pwent->pw_gecos);
+#if defined(HAVE_PW_CLASS_IN_PASSWD)
        buffer_put_cstring(m, pwent->pw_class);
+#else
+#warning XXX - put an empty string instead to preserve protocol?
+#endif
        buffer_put_cstring(m, pwent->pw_dir);
        buffer_put_cstring(m, pwent->pw_shell);
 
index 5b4b789ca7f33a416a71d1de33cf999dd5ddbd53..39ee9027423097450a8a9eebd4ad41d1722af830 100644 (file)
@@ -25,7 +25,7 @@
 
 #ifndef _MM_H_
 #define _MM_H_
-#include <sys/tree.h>
+#include <openbsd-compat/fake-tree.h>
 
 struct mm_share {
        RB_ENTRY(mm_share) next;
index 798e9353df8e2b3fe4364ef1ffcd1856de7897c7..5d7f4ba78353d35f4bf6a80512d43f52254d9c2d 100644 (file)
@@ -186,7 +186,10 @@ mm_getpwnamallow(int socket, const char *login, int *allowed)
        pw->pw_name = buffer_get_string(&m, NULL);
        pw->pw_passwd = buffer_get_string(&m, NULL);
        pw->pw_gecos = buffer_get_string(&m, NULL);
+#if defined(HAVE_PW_CLASS_IN_PASSWD)
+#error XXX - get an empty string instead to preserve protocol?
        pw->pw_class = buffer_get_string(&m, NULL);
+#endif
        pw->pw_dir = buffer_get_string(&m, NULL);
        pw->pw_shell = buffer_get_string(&m, NULL);
        buffer_free(&m);
@@ -200,7 +203,9 @@ pwfree(struct passwd *pw)
        xfree(pw->pw_name);
        xfree(pw->pw_passwd);
        xfree(pw->pw_gecos);
+#if defined(HAVE_PW_CLASS_IN_PASSWD)
        xfree(pw->pw_class);
+#endif
        xfree(pw->pw_dir);
        xfree(pw->pw_shell);
        xfree(pw);