]> git.sur5r.net Git - openldap/blobdiff - clients/ud/ud.h
Fix format %x -> %lx in des_string_to_key
[openldap] / clients / ud / ud.h
index 40b6ecff7a0e7e90b22c68ae46a4aec7a262fe40..3dd04bbc372dc998e93785411eabcfba904792de 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted only
+ * as authorized by the OpenLDAP Public License.  A copy of this
+ * license is available at http://www.OpenLDAP.org/license.html or
+ * in file LICENSE in the top-level directory of the distribution.
+ */
 /*
  * Copyright (c) 1991, 1992, 1993 
  * Regents of the University of Michigan.  All rights reserved.
  * is provided ``as is'' without express or implied warranty.
  */
 
-#ifdef DOS
-#include "protoud.h"
-#define strncasecmp(a, b, n)   strnicmp(a, b, n)
-#define strcasecmp(a, b)       stricmp(a, b)
-#define MAX_VALUES     8
-#else
 #define MAX_VALUES     1000
-#endif /* end of DOS ifdef */
 
 /*****************************************************************************
  **
@@ -35,7 +37,7 @@
  *  parsing names.
  */
 #define MAX_NAME_COMPS         8
-#define isnamesepartor(x)      (isspace(x))
+#define isnamesepartor(x)      (isspace((unsigned char) (x)))
 #define isignorechar(x)                (((x) == '.') || ((x) == '_'))
 
 /*
@@ -87,7 +89,7 @@
 /*
  *  Authentication method we will be using.
  */
-#ifdef KERBEROS
+#ifdef HAVE_KERBEROS
 #define UD_AUTH_METHOD         LDAP_AUTH_KRBV4
 #else
 #define UD_AUTH_METHOD         LDAP_AUTH_SIMPLE
 #define ATTR_FLAG_IS_A_BOOL    0x4000
 #define ATTR_FLAG_IS_MULTILINE 0x8000
 
+LDAP_BEGIN_DECL
+
 /*
  *  These are the structures we use when parsing an answer we get from the LDAP
  *  server.
 struct attribute {
        char *quipu_name;
        char *output_string;
-       void (*mod_func)();
+       void (*mod_func) LDAP_P(( char *who, int attr_idx ));
        unsigned short flags;
        int number_of_values;
        char **values;
@@ -156,3 +160,145 @@ struct entry {
        char *name;
        struct attribute attrs[MAX_ATTRS];
 };
+
+
+
+/*
+ * Variables
+ */
+
+/* in globals.c: */
+extern struct attribute attrlist[];/* complete list of attrs */
+/* in main.c: */
+extern char copyright[];
+extern char *default_bind_object;
+extern char *bound_dn;
+extern char *group_base;
+extern char *search_base;      /* search base */
+extern int lpp;
+extern int verbose;            /* verbose mode flag */
+extern int col_size;
+extern int bind_status;
+extern LDAP *ld;               /* our ldap descriptor */
+extern LDAPFiltDesc *lfdp;     /* LDAP filter descriptor */
+#ifdef DEBUG
+extern int debug;              /* debug flag */
+#endif
+/* in print.c: */
+extern struct entry Entry;
+extern int     dmsize[];
+/* in version.c: */
+extern char Version[];
+
+
+/*
+ * Functions
+ */
+
+/* in auth.c: */
+int  auth      LDAP_P(( char *who, int implicit ));
+#if defined(HAVE_KERBEROS) && defined(_AC_KRB_H)
+int  krbgetpass LDAP_P(( char *u, char *in, char *re, char *pw, C_Block key ));
+void destroy_tickets LDAP_P(( void ));
+#endif
+
+/* in edit.c: */
+void edit      LDAP_P(( char *who ));
+
+/* in find.c: */
+int  vrfy      LDAP_P(( char *dn ));
+LDAPMessage *find      LDAP_P(( char *who, int quiet ));
+int  pick_one  LDAP_P(( int i ));
+void print_list        LDAP_P(( LDAPMessage *list, char **names, int *matches ));
+int  find_all_subscribers      LDAP_P(( char **sub, char *group ));
+char *fetch_boolean_value      LDAP_P(( char *who, struct attribute attr ));
+
+/* in globals.c: */
+
+/* in group.c: */
+void add_group LDAP_P(( char *name ));
+void remove_group      LDAP_P(( char *name ));
+void x_group   LDAP_P(( int action, char *name ));
+void bulk_load LDAP_P(( char *group ));
+void purge_group       LDAP_P(( char *group ));
+void tidy_up   LDAP_P(( void ));
+void mod_addrDN        LDAP_P(( char *group, int offset ));
+int  my_ldap_modify_s  LDAP_P(( LDAP *ldap, char *group, LDAPMod **mods ));
+void list_groups       LDAP_P(( char *who ));
+void list_memberships  LDAP_P(( char *who ));
+
+/* in help.c: */
+void print_help        LDAP_P(( char *s ));
+
+/* in main.c: */
+#ifdef DEBUG
+#endif
+
+void do_commands       LDAP_P(( void ));
+void status    LDAP_P(( void ));
+void change_base       LDAP_P(( int type, char **base, char *s ));
+void initialize_client LDAP_P(( void ));
+RETSIGTYPE  attn       LDAP_P(( int sig ));
+#if !defined(NO_TERMCAP) && defined(TIOCGWINSZ)
+RETSIGTYPE  chwinsz    LDAP_P(( int sig ));
+#endif
+
+/* in mod.c: */
+void modify    LDAP_P(( char *who ));
+void change_field      LDAP_P(( char *who, int attr_idx ));
+char *get_value        LDAP_P(( char *id, char *prompt ));
+void set_boolean       LDAP_P(( char *who, int attr_idx ));
+#ifdef UOFM
+void set_updates       LDAP_P(( char *who, int dummy ));
+#endif
+void print_mod_list    LDAP_P(( int group ));
+int  perform_action    LDAP_P(( char *choice, char *dn, int group ));
+void mod_perror        LDAP_P(( LDAP *ld ));
+
+/* in print.c: */
+void parse_answer      LDAP_P(( LDAPMessage *s ));
+void add_value LDAP_P(( struct attribute *attr, LDAPMessage *ep, char *ap ));
+void print_an_entry    LDAP_P(( void ));
+void print_values      LDAP_P(( struct attribute A ));
+void print_DN  LDAP_P(( struct attribute A ));
+void clear_entry       LDAP_P(( void ));
+int  attr_to_index     LDAP_P(( char *s ));
+void initialize_attribute_strings      LDAP_P(( void ));
+void print_URL LDAP_P(( struct attribute A ));
+void print_one_URL     LDAP_P(( char *s, int l_lead, char *tag, int u_lead ));
+
+/* in string_to_key.c: */
+#if defined(HAVE_KERBEROS) && !defined(openbsd) && defined(_AC_KRB_H)
+#if defined(HAVE_AFS_KERBEROS) || !defined(HAVE_KERBEROS_V)
+void  des_string_to_key        LDAP_P(( char *str, des_cblock *key ));
+#endif
+#if defined(HAVE_AFS_KERBEROS)
+void ka_StringToKey LDAP_P(( char *str, char *cell, des_cblock *key ));
+#endif
+#endif
+
+/* in util.c: */
+void printbase LDAP_P(( char *lead, char *s ));
+void fetch_buffer      LDAP_P(( char *buffer, int length, FILE *where ));
+void fatal     LDAP_P(( char *s ));
+int  isgroup   LDAP_P(( void ));
+void format    LDAP_P(( char *str, int width, int lead ));
+void format2   LDAP_P(( char *s, char *ft, char *t, int fi, int i, int w ));
+char *strip_ignore_chars       LDAP_P(( char *cp ));
+char *code_to_str      LDAP_P(( int i ));
+char *friendly_name    LDAP_P(( char *s ));
+#ifdef UOFM
+int  isauniqname       LDAP_P(( char *s ));
+#endif
+int  isadn     LDAP_P(( char *s ));
+char *my_ldap_dn2ufn   LDAP_P(( char *s ));
+int  isaurl    LDAP_P(( char *s ));
+int  isadate   LDAP_P(( char *s ));
+void *Malloc   LDAP_P(( unsigned int size ));
+void Free      LDAP_P(( void *ptr ));
+char *nextstr  LDAP_P(( char *s ));
+void free_mod_struct   LDAP_P(( LDAPMod *modp ));
+void StrFreeDup        LDAP_P(( char **ptr, char *new_value ));
+int  confirm_action    LDAP_P(( char *msg ));
+
+LDAP_END_DECL