[PC-BSD Commits] r18145 - pcbsd/current/src-sh/pc-adctl/ldap

svn at pcbsd.org svn at pcbsd.org
Fri Aug 3 14:47:22 PDT 2012


Author: johnh
Date: 2012-08-03 21:47:22 +0000 (Fri, 03 Aug 2012)
New Revision: 18145

Modified:
   pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c
   pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.h
Log:
Add is working.



Modified: pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c
===================================================================
--- pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c	2012-08-03 20:14:24 UTC (rev 18144)
+++ pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.c	2012-08-03 21:47:22 UTC (rev 18145)
@@ -130,34 +130,343 @@
 	return (0);
 }
 
+static struct ldap_entry *
+option2entry(unsigned long type, const char *value)
+{
+	struct ldap_entry *le = xalloc(sizeof(*le));
+
+	le->type = type;
+
+	switch (type) {
+		case URI: {
+			struct ldap_uri *lu = xalloc(sizeof(*lu));
+
+			lu->uri = xstrdup(value);
+			le->entry = lu;
+
+			break;
+		}
+
+		case BASE: {
+			struct ldap_base *lb = xalloc(sizeof(*lb));
+
+			lb->base = xstrdup(value);
+			le->entry = lb;
+
+			break;
+		}
+
+		case BINDDN: {
+			struct ldap_binddn *lb = xalloc(sizeof(*lb));
+
+			lb->dn = xstrdup(value);
+			le->entry = lb;
+
+			break;
+		}
+
+		case DEREF: {
+			struct ldap_deref *ld = xalloc(sizeof(*ld));
+
+			ld->when = str2deref(value, NEVER);
+			le->entry = ld;
+
+			break;
+		}
+
+		case HOST: {
+			struct ldap_host *lh = xalloc(sizeof(*lh));
+
+			lh->host = xstrdup(value);
+			le->entry = lh;
+
+			break;
+		}
+
+		case NETWORK_TIMEOUT: {
+			struct ldap_network_timeout *lnt = xalloc(sizeof(*lnt));
+
+			lnt->timeout = strtol(value, 0, 10);
+			le->entry = lnt;
+
+			break;
+		}
+
+		case PORT: {
+			struct ldap_port *lp = xalloc(sizeof(*lp));
+
+			lp->port = strtol(value, 0, 10);
+			le->entry = lp;
+
+			break;
+		}
+
+		case REFERRALS: {
+			struct ldap_referrals *lr = xalloc(sizeof(*lr));
+
+			lr->option = str2bool(value, FALSE);
+			le->entry = lr;
+
+			break;
+		}
+
+		case SIZELIMIT: {
+			struct ldap_sizelimit *ls = xalloc(sizeof(*ls));
+
+			ls->sizelimit = strtol(value, 0, 10);
+			le->entry = ls;
+
+			break;
+		}
+
+		case TIMELIMIT: {
+			struct ldap_timelimit *lt = xalloc(sizeof(*lt));
+
+			lt->timelimit = strtol(value, 0, 10);
+			le->entry = lt;
+
+			break;
+		}
+
+		case TIMEOUT: {
+			struct ldap_timeout *lt = xalloc(sizeof(*lt));
+
+			lt->timeout = strtol(value, 0, 10);
+			le->entry = lt;
+
+			break;
+		}
+
+		case SASL_MECH: {
+			struct sasl_mech *sm = xalloc(sizeof(*sm));
+
+			sm->mechanism = xstrdup(value);
+			le->entry = sm;
+
+			break;
+		}
+
+		case SASL_REALM: {
+			struct sasl_realm *sr = xalloc(sizeof(*sr));
+
+			sr->realm = xstrdup(value);
+			le->entry = sr;
+
+			break;
+		}
+
+		case SASL_AUTHCID: {
+			struct sasl_authcid *sa = xalloc(sizeof(*sa));
+
+			sa->authcid = xstrdup(value);
+			le->entry = sa;
+
+			break;
+		}
+
+		case SASL_AUTHZID: {
+			struct sasl_authzid *sa = xalloc(sizeof(*sa));
+
+			sa->authzid = xstrdup(value);
+			le->entry = sa;
+
+			break;
+		}
+
+		case SASL_SECPROPS: {
+			char *ptr, *str, *tmp, *save;
+			struct sasl_secprops *ss = xalloc(sizeof(*ss));
+
+			ptr = xstrdup(value);
+			save = ptr;
+
+			str = strsep(&tmp, "=");
+			ss->properties = str2properties(tmp, NONE);
+			ss->factor = -1;
+
+			if (tmp != NULL)
+				ss->factor = strtol(tmp, 0, 10);
+
+			le->entry = ss;
+			xfree(&save);
+
+			break;
+		}
+
+		case GSSAPI_SIGN: {
+			struct gssapi_sign *gs = xalloc(sizeof(*gs));
+
+			gs->option = str2bool(value, FALSE);
+			le->entry = gs;
+
+			break;
+		}
+
+		case GSSAPI_ENCRYPT: {
+			struct gssapi_encrypt *ge = xalloc(sizeof(*ge));
+
+			ge->option = str2bool(value, FALSE);
+			le->entry = ge;
+
+			break;
+		}
+
+		case GSSAPI_ALLOW_REMOTE_PRINCIPAL: {
+			struct gssapi_allow_remote_principal *garp = xalloc(sizeof(*garp));
+
+			garp->option = str2bool(value, FALSE);
+			le->entry = garp;
+
+			break;
+		}
+
+		case TLS_CACERT: {
+			struct tls_cacert *tc = xalloc(sizeof(*tc));
+
+			tc->filename = xstrdup(value);
+			le->entry = tc;
+
+			break;
+		}
+
+		case TLS_CACERTDIR: {
+			struct tls_cacertdir *tc = xalloc(sizeof(*tc));
+
+			tc->path = xstrdup(value);
+			le->entry = tc;
+
+			break;
+		}
+
+		case TLS_CERT: {
+			struct tls_cert *tc = xalloc(sizeof(*tc));
+
+			tc->filename = xstrdup(value);
+			le->entry = tc;
+
+			break;
+		}
+
+		case TLS_KEY: {
+			struct tls_key *tk = xalloc(sizeof(*tk));
+
+			tk->filename = xstrdup(value);
+			le->entry = tk;
+
+			break;
+		}
+
+		case TLS_CIPHER_SUITE: {
+			struct tls_cipher_suite *tcs = xalloc(sizeof(*tcs));
+
+			tcs->cipher_suite_spec = xstrdup(value);
+			le->entry = tcs;
+
+			break;
+		}
+
+		case TLS_RANDFILE: {
+			struct tls_randfile *tr = xalloc(sizeof(*tr));
+
+			tr->filename = xstrdup(value);
+			le->entry = tr;
+
+			break;
+		}
+
+		case TLS_REQCERT: {
+			struct tls_reqcert *tr = xalloc(sizeof(*tr));
+
+			tr->level = str2level(value, NEVER);
+			le->entry = tr;
+
+			break;
+		}
+
+		case TLS_CRLCHECK: {
+			struct tls_crlcheck *tc = xalloc(sizeof(*tc));
+
+			tc->level = str2level(value, NEVER);
+			le->entry = tc;
+
+			break;
+		}
+
+		case TLS_CRLFILE: {
+			struct tls_crlfile *tc = xalloc(sizeof(*tc));
+
+			tc->filename = xstrdup(value);
+			le->entry = tc;
+
+			break;
+		}
+	}
+
+	return (le);
+}
+
+
 static int
 ldap_op_add(struct ldap_modification *lm)
 {
-#if 0
 	int exists = 0;
-	struct ldap_entry *le;
+	unsigned long type;
+	struct ldap_entry *le, *letmp;
 
 	if (lm == NULL)
 		return (-1);
 
-	TAILQ_FOREACH(le, &ldapconf, entries) {
-		if (le->type == LDAP_ENTRY_PAIR &&
-			strcasecmp(le->lep_name, lm->name) == 0) {
-			exists = 1;
-			break;
+	type = str2type(lm->name);
+	TAILQ_FOREACH_SAFE(le, &ldapconf, entries, letmp) {
+		switch (le->type) {
+			case LDAP_ENTRY_URI_LIST: {
+				if (type == URI) {
+					struct ldap_uri_list *lul = le->entry;
+					struct ldap_entry *new = option2entry(URI, lm->value);
+					struct ldap_uri *lu = new->entry;
+					TAILQ_INSERT_TAIL(lul, lu, entries);
+					exists = 1;
+				}
+
+				break;
+			}
+
+			case LDAP_ENTRY_HOST_LIST: {
+				if (type == HOST) {
+					struct ldap_host_list *lhl = le->entry;
+					struct ldap_entry *new = option2entry(HOST, lm->value);
+					struct ldap_host *lh = new->entry;
+					TAILQ_INSERT_TAIL(lhl, lh, entries);
+					exists = 1;
+				}
+
+				break;
+			}
+
+			case LDAP_ENTRY_SASL_SECPROPS_LIST: {
+				if (type == SASL_SECPROPS) {
+					struct sasl_secprops_list *lsl = le->entry;
+					struct ldap_entry *new = option2entry(SASL_SECPROPS, lm->value);
+					struct sasl_secprops *ss = new->entry;
+					TAILQ_INSERT_TAIL(lsl, ss, entries);
+					exists = 1;
+				}
+
+				break;
+			}
+
+			default:
+				if (le->type == type)
+					exists = 1;
+
+				break;
 		}
 	}
 
 	if (exists == 0) {
-		le = xalloc(sizeof(*le));
-
-		le->type = LDAP_ENTRY_PAIR;
-		le->lep_name = xstrdup(lm->name);
-		le->lep_value = xstrdup(lm->value);
-
-		TAILQ_INSERT_TAIL(&ldapconf, le, entries);
+		struct ldap_entry *new = option2entry(type, lm->value);
+		TAILQ_INSERT_TAIL(&ldapconf, new, entries);
 	}
-#endif
 
 	return (0);
 }
@@ -529,7 +838,224 @@
 	return (properties);
 }
 
+unsigned long
+str2type(const char *name)
+{
+	unsigned long type = 0;
 
+	if (name == NULL || name[0] == 0)
+		return (0);
+
+	if (strcasecmp(name, "URI") == 0) {
+		type = URI;
+
+	} else if (strcasecmp(name, "BASE") == 0) {
+		type = BASE;
+
+	} else if (strcasecmp(name, "BINDDN") == 0) {
+		type = BINDDN;
+
+	} else if (strcasecmp(name, "DEREF") == 0) {
+		type = DEREF;
+
+	} else if (strcasecmp(name, "HOST") == 0) {
+		type = HOST;
+
+	} else if (strcasecmp(name, "NETWORK_TIMEOUT") == 0) {
+		type = NETWORK_TIMEOUT;
+
+	} else if (strcasecmp(name, "PORT") == 0) {
+		type = PORT;
+
+	} else if (strcasecmp(name, "REFERRALS") == 0) {
+		type = REFERRALS;
+
+	} else if (strcasecmp(name, "SIZELIMIT") == 0) {
+		type = SIZELIMIT;
+
+	} else if (strcasecmp(name, "TIMELIMIT") == 0) {
+		type = TIMELIMIT;
+
+	} else if (strcasecmp(name, "TIMEOUT") == 0) {
+		type = TIMEOUT;
+
+	} else if (strcasecmp(name, "SASL_MECH") == 0) {
+		type = SASL_MECH;
+
+	} else if (strcasecmp(name, "SASL_REALM") == 0) {
+		type = SASL_REALM;
+
+	} else if (strcasecmp(name, "SASL_AUTHCID") == 0) {
+		type = SASL_AUTHCID;
+
+	} else if (strcasecmp(name, "SASL_AUTHZID") == 0) {
+		type = SASL_AUTHZID;
+
+	} else if (strcasecmp(name, "SASL_SECPROPS") == 0) {
+		type = SASL_SECPROPS;
+
+	} else if (strcasecmp(name, "GSSAPI_SIGN") == 0) {
+		type = GSSAPI_SIGN;
+
+	} else if (strcasecmp(name, "GSSAPI_ENCRYPT") == 0) {
+		type = GSSAPI_ENCRYPT;
+
+	} else if (strcasecmp(name, "GSSAPI_ALLOW_REMOTE_PRINCIPAL") == 0) {
+		type = GSSAPI_ALLOW_REMOTE_PRINCIPAL;
+
+	} else if (strcasecmp(name, "TLS_CACERT") == 0) {
+		type = TLS_CACERT;
+
+	} else if (strcasecmp(name, "TLS_CACERTDIR") == 0) {
+		type = TLS_CACERTDIR;
+
+	} else if (strcasecmp(name, "TLS_CERT") == 0) {
+		type = TLS_CERT;
+
+	} else if (strcasecmp(name, "TLS_KEY") == 0) {
+		type = TLS_KEY;
+
+	} else if (strcasecmp(name, "TLS_CIPHER_SUITE") == 0) {
+		type = TLS_CIPHER_SUITE;
+
+	} else if (strcasecmp(name, "TLS_RANDFILE") == 0) {
+		type = TLS_RANDFILE;
+
+	} else if (strcasecmp(name, "TLS_REQCERT") == 0) {
+		type = TLS_REQCERT;
+
+	} else if (strcasecmp(name, "TLS_CRLCHECK") == 0) {
+		type = TLS_CRLCHECK;
+
+	} else if (strcasecmp(name, "TLS_CRLFILE") == 0) {
+		type = TLS_CRLFILE;
+	}
+
+	return (type);
+}
+
+const char *
+type2str(unsigned long type)
+{
+	const char *str = NULL;
+
+	switch (type) {
+		case URI:
+			str = "URI";
+			break;
+
+		case BASE:
+			str = "BASE";
+			break;
+
+		case BINDDN:
+			str = "BINDDN";
+			break;
+
+		case DEREF:
+			str = "DEREF";
+			break;
+
+		case HOST:
+			str = "HOST";
+			break;
+
+		case NETWORK_TIMEOUT:
+			str = "NETWORK_TIMEOUT";
+			break;
+
+		case PORT:
+			str = "PORT";
+			break;
+
+		case REFERRALS:
+			str = "REFERRALS";
+			break;
+
+		case SIZELIMIT:
+			str = "SIZELIMIT";
+			break;
+
+		case TIMELIMIT:
+			str = "TIMELIMIT";
+			break;
+
+		case TIMEOUT:
+			str = "TIMEOUT";
+			break;
+		
+		case SASL_MECH:
+			str = "SASL_MECH";
+			break;
+
+		case SASL_REALM:
+			str = "SASL_REALM";
+			break;
+
+		case SASL_AUTHCID:
+			str = "SASL_AUTHCID";
+			break;
+
+		case SASL_AUTHZID:
+			str = "SASL_AUTHZID";
+			break;
+
+		case SASL_SECPROPS:
+			str = "SASL_SECPROPS";
+			break;
+
+		case GSSAPI_SIGN:
+			str = "GSSAPI_SIGN";
+			break;
+
+		case GSSAPI_ENCRYPT:
+			str = "GSSAPI_ENCRYPT";
+			break;
+
+		case GSSAPI_ALLOW_REMOTE_PRINCIPAL:
+			str = "GSSAPI_ALLOW_REMOTE_PRINCIPAL";
+			break;
+
+		case TLS_CACERT:
+			str = "TLS_CACERT";
+			break;
+
+		case TLS_CACERTDIR:
+			str = "TLS_CACERTDIR";
+			break;
+
+		case TLS_CERT:
+			str = "TLS_CERT";
+			break;
+
+		case TLS_KEY:
+			str = "TLS_KEY";
+			break;
+
+		case TLS_CIPHER_SUITE:
+			str = "TLS_CIPHER_SUITE";
+			break;
+
+		case TLS_RANDFILE:
+			str = "TLS_RANDFILE";
+			break;
+
+		case TLS_REQCERT:
+			str = "TLS_REQCERT";
+			break;
+
+		case TLS_CRLCHECK:
+			str = "TLS_CRLCHECK";
+			break;
+
+		case TLS_CRLFILE:
+			str = "TLS_CRLFILE";
+			break;
+	} 
+
+	return (str);
+}
+
 static int
 write_ldap_conf(void)
 {
@@ -546,7 +1072,7 @@
 				struct ldap_uri *lu;
 				struct ldap_uri_list *lul = le->entry;
 
-				fprintf(yyout, "URI");
+				fprintf(yyout, "%s", type2str(URI));
 				TAILQ_FOREACH(lu, lul, entries) {
 					fprintf(yyout, "\t%s", lu->uri);
 				}
@@ -558,7 +1084,7 @@
 				struct ldap_host *lh;
 				struct ldap_host_list *lhl = le->entry;
 
-				fprintf(yyout, "HOST");
+				fprintf(yyout, "%s", type2str(HOST));
 				TAILQ_FOREACH(lh, lhl, entries) {
 					fprintf(yyout, "\t%s", lh->host);
 				}
@@ -585,7 +1111,7 @@
 				if (*(ptr - 1) == ',')
 					*(ptr - 1) = 0;
 
-				fprintf(yyout, "SASL_SECPROPS\t%s\n", buf);
+				fprintf(yyout, "%s\t%s\n", type2str(SASL_SECPROPS), buf);
 				break;
 			}
 
@@ -594,59 +1120,59 @@
 				break;
 
 			case BASE: {
-				fprintf(yyout, "BASE\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct ldap_base *)le->entry)->base);
 				break;
 			}
 			case BINDDN:
-				fprintf(yyout, "BINDDN\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct ldap_binddn *)le->entry)->dn);
 				break;
 			case DEREF:
-				fprintf(yyout, "DEREF\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					deref2str(((struct ldap_deref *)le->entry)->when, "always"));
 				break;
 
 			case NETWORK_TIMEOUT:
-				fprintf(yyout, "NETWORK_TIMEOUT\t%d\n",
+				fprintf(yyout, "%s\t%d\n", type2str(le->type),
 					((struct ldap_network_timeout *)le->entry)->timeout);
 				break;
 			case PORT:
-				fprintf(yyout, "PORT\t%d\n",
+				fprintf(yyout, "%s\t%d\n", type2str(le->type),
 					((struct ldap_port *)le->entry)->port);
 				break;
 			case REFERRALS:
-				fprintf(yyout, "REFERRALS\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					bool2str(((struct ldap_referrals *)le->entry)->option, "on"));
 				break;
 
 			case SIZELIMIT:
-				fprintf(yyout, "SIZELIMIT\t%d\n",
+				fprintf(yyout, "%s\t%d\n", type2str(le->type),
 					((struct ldap_sizelimit *)le->entry)->sizelimit);
 				break;
 			case TIMELIMIT:
-				fprintf(yyout, "TIMELIMIT\t%d\n",
+				fprintf(yyout, "%s\t%d\n", type2str(le->type),
 					((struct ldap_timelimit *)le->entry)->timelimit);
 				break;
 			case TIMEOUT:
-				fprintf(yyout, "TIMEOUT\t%d\n",
+				fprintf(yyout, "%s\t%d\n", type2str(le->type),
 					((struct ldap_timeout *)le->entry)->timeout);
 				break;
 
 			case SASL_MECH:
-				fprintf(yyout, "SASL_MECH\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct sasl_mech *)le->entry)->mechanism);
 				break;
 			case SASL_REALM:
-				fprintf(yyout, "SASL_REALM\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct sasl_realm *)le->entry)->realm);
 				break;
 			case SASL_AUTHCID:
-				fprintf(yyout, "SASL_AUTHCID\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct sasl_authcid *)le->entry)->authcid);
 				break;
 			case SASL_AUTHZID:
-				fprintf(yyout, "SASL_AUTHZID\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct sasl_authzid *)le->entry)->authzid);
 				break;
 			case SASL_SECPROPS: {
@@ -655,52 +1181,52 @@
 			}
 
 			case GSSAPI_SIGN:
-				fprintf(yyout, "GSSAPI_SIGN\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					bool2str(((struct gssapi_sign *)le->entry)->option, "off"));
 				break;
 			case GSSAPI_ENCRYPT:
-				fprintf(yyout, "GSSAPI_ENCRYPT\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					bool2str(((struct gssapi_encrypt *)le->entry)->option, "off"));
 				break;
 			case GSSAPI_ALLOW_REMOTE_PRINCIPAL:
-				fprintf(yyout, "GSSAPI_ALLOW_REMOTE_PRINCIPAL\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					bool2str(((struct gssapi_allow_remote_principal *)le->entry)->option, "off"));
 				break;
 
 			case TLS_CACERT:
-				fprintf(yyout, "TLS_CACERT\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_cacert *)le->entry)->filename);
 				break;
 			case TLS_CACERTDIR:
-				fprintf(yyout, "TLS_CACERTDIR\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_cacertdir *)le->entry)->path);
 				break;
 			case TLS_CERT:
-				fprintf(yyout, "TLS_CERT\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_cert *)le->entry)->filename);
 				break;
 			case TLS_KEY:
-				fprintf(yyout, "TLS_KEY\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_key *)le->entry)->filename);
 				break;
 			case TLS_CIPHER_SUITE:
-				fprintf(yyout, "TLS_CIPHER_SUITE\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_cipher_suite *)le->entry)->cipher_suite_spec);
 				break;
 			case TLS_RANDFILE:
-				fprintf(yyout, "TLS_RANDFILE\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_randfile *)le->entry)->filename);
 				break;
 			case TLS_REQCERT:
-				fprintf(yyout, "TLS_REQCERT\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					level2str(((struct tls_reqcert *)le->entry)->level, "never"));
 				break;
 			case TLS_CRLCHECK:
-				fprintf(yyout, "TLS_CRLCHECK\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					level2str(((struct tls_crlcheck *)le->entry)->level, "none"));
 				break;
 			case TLS_CRLFILE:
-				fprintf(yyout, "TLS_CRLFILE\t%s\n",
+				fprintf(yyout, "%s\t%s\n", type2str(le->type),
 					((struct tls_crlfile *)le->entry)->filename);
 				break;
 		}
@@ -848,7 +1374,7 @@
 				break;
 
 			case 'm':
-				//add_modification(optarg, create);
+				add_modification(optarg, create);
 				create = 0;
 				break;
 
@@ -881,9 +1407,7 @@
 	if (infile != NULL)
 		yyparse();
 
-/*
 	do_modifications();
-*/
 	write_ldap_conf();
 	ldap_conf_free();
 

Modified: pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.h
===================================================================
--- pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.h	2012-08-03 20:14:24 UTC (rev 18144)
+++ pcbsd/current/src-sh/pc-adctl/ldap/ldapconf.h	2012-08-03 21:47:22 UTC (rev 18145)
@@ -172,4 +172,7 @@
 extern	const char *properties2str(unsigned long, const char *);
 extern	unsigned long str2properties(const char *, unsigned long);
 
+extern	unsigned long str2type(const char *);
+extern	const char *type2str(unsigned long);
+
 #endif	/* __LDAPCONF_H */



More information about the Commits mailing list