summaryrefslogtreecommitdiffstats
path: root/chpass/pw_yp.h
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1995-09-02 03:56:21 +0000
committerBill Paul <wpaul@FreeBSD.org>1995-09-02 03:56:21 +0000
commit30955b898350ac476a47d83662e9679de21eb4e0 (patch)
treefe85eaa8e0b56e1f3b289fcd543dab08a04dd2e6 /chpass/pw_yp.h
parent73f5cfe48aa896d40905726d22fe1354a0608d6a (diff)
downloadpw-darwin-30955b898350ac476a47d83662e9679de21eb4e0.tar.gz
pw-darwin-30955b898350ac476a47d83662e9679de21eb4e0.zip
Make use_yp() smarter about figuring out whether a user is local or
NIS (or both, or neither). Also add support for -l and -y flags to force behavior to local or NIS. use_yp() also goes out of its way to retrieve the correct password database information (local or NIS) depending on what the situation since getpwent() & co. can't necessarily be trusted in some cases. Also document new flags in man page.
Diffstat (limited to 'chpass/pw_yp.h')
-rw-r--r--chpass/pw_yp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/chpass/pw_yp.h b/chpass/pw_yp.h
index 94c7a74..9d98a43 100644
--- a/chpass/pw_yp.h
+++ b/chpass/pw_yp.h
@@ -35,11 +35,18 @@
* Center for Telecommunications Research
* Columbia University, New York City
*
- * $Id$
+ * $Id: pw_yp.h,v 1.1 1995/08/13 16:12:28 wpaul Exp $
*/
#ifdef YP
+/* Four possible return codes from use_yp() */
+#define USER_UNKNOWN 0
+#define USER_YP_ONLY 1
+#define USER_LOCAL_ONLY 2
+#define USER_YP_AND_LOCAL 3
extern int _use_yp;
+extern struct passwd local_password;
+extern struct passwd yp_password;
void yp_submit __P(( struct passwd * ));
int use_yp __P(( char * ));
#endif /* YP */