summaryrefslogtreecommitdiffstats
path: root/server/responder/nss/nsssrv.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-03-30 19:28:18 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-01 11:03:07 -0400
commit499e4d63fe57875338777f0ac4455693307b4c56 (patch)
tree5c558bda7ad19a9d8e73b76b2dc7664024a37b63 /server/responder/nss/nsssrv.h
parent68ea74985231880a7c113aacefe19445c010a320 (diff)
downloadsssd-499e4d63fe57875338777f0ac4455693307b4c56.tar.gz
sssd-499e4d63fe57875338777f0ac4455693307b4c56.tar.xz
sssd-499e4d63fe57875338777f0ac4455693307b4c56.zip
Add a more flexible way to parse and filter names.
A new nss_parse_name function uses pcre to parse names, this makes it possible, in future, to make the filter user configurable. Add a new filter mechanism to filter out users that uses the negative cache by setting a permanet negative entry. Rework the entry points where the negative cache is checked for.
Diffstat (limited to 'server/responder/nss/nsssrv.h')
-rw-r--r--server/responder/nss/nsssrv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/responder/nss/nsssrv.h b/server/responder/nss/nsssrv.h
index b2aee38..093f795 100644
--- a/server/responder/nss/nsssrv.h
+++ b/server/responder/nss/nsssrv.h
@@ -34,6 +34,7 @@
#include "responder/common/responder_packet.h"
#include "responder/common/responder_cmd.h"
#include "responder/nss/nsssrv_nc.h"
+#include <pcre.h>
#define NSS_SBUS_SERVICE_VERSION 0x0001
#define NSS_SBUS_SERVICE_NAME "nss"
@@ -66,6 +67,8 @@ struct nss_ctx {
struct getent_ctx *pctx;
struct getent_ctx *gctx;
+
+ pcre *parse_name_re;
};
struct nss_packet;
@@ -88,4 +91,9 @@ int nss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx,
struct sbus_method *get_nss_dp_methods(void);
struct sss_cmd_table *get_nss_cmds(void);
+int nss_parse_name(TALLOC_CTX *memctx,
+ struct nss_ctx *nctx,
+ const char *origname,
+ const char **domain, const char **name);
+
#endif /* __NSSSRV_H__ */