summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-03-13 13:46:44 +1100
committerDamien Miller <djm@mindrot.org>2002-03-13 13:46:44 +1100
commitc33566fef39251e52f3ae1dccbff9ef2cb6a53be (patch)
tree106e87a24c581a8163a77197c2afdba4845e862e
parentec960955e9cba9d612159ccda4c7ec81f3ac231a (diff)
Compile fixes for LinuxPRIVSEP
-rw-r--r--monitor.c4
-rw-r--r--monitor_mm.h2
-rw-r--r--monitor_wrap.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index b8579027..9e629cf8 100644
--- 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);
diff --git a/monitor_mm.h b/monitor_mm.h
index 5b4b789c..39ee9027 100644
--- a/monitor_mm.h
+++ b/monitor_mm.h
@@ -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;
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 798e9353..5d7f4ba7 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -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);