summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-13 01:00:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:19 -0500
commit127cc730342c0adce7c44453c4463de21d244e6c (patch)
tree92656ac460528a58cd9066fbcb4da637b97e0d2e /source3/nsswitch/winbindd_cache.c
parent23e575c4b7e784ddc0140ee9f96a79071cecc062 (diff)
downloadsamba-127cc730342c0adce7c44453c4463de21d244e6c.tar.gz
samba-127cc730342c0adce7c44453c4463de21d244e6c.tar.bz2
samba-127cc730342c0adce7c44453c4463de21d244e6c.zip
r22206: Added boilerplate to be filled in for other validation functions.
Jeremy. (This used to be commit 9be463eb0cb4d65c40e35c504059289696419486)
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r--source3/nsswitch/winbindd_cache.c163
1 files changed, 163 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 793eef1cdb..f0e12dfb0d 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -2730,61 +2730,224 @@ static int validate_u(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
static int validate_loc_pol(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ (void)centry_nttime(centry);
+ (void)centry_nttime(centry);
+ (void)centry_uint16(centry);
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_loc_pol: %s ok\n", keystr));
return 0;
}
static int validate_pwd_pol(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_pwd_pol: %s ok\n", keystr));
return 0;
}
static int validate_cred(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_cred: %s ok\n", keystr));
return 0;
}
static int validate_ul(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_ul: %s ok\n", keystr));
return 0;
}
static int validate_gl(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_gl: %s ok\n", keystr));
return 0;
}
static int validate_ug(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_ug: %s ok\n", keystr));
return 0;
}
static int validate_ua(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_ua: %s ok\n", keystr));
return 0;
}
static int validate_gm(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_gm: %s ok\n", keystr));
return 0;
}
static int validate_dr(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_dr: %s ok\n", keystr));
return 0;
}
static int validate_de(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_de: %s ok\n", keystr));
return 0;
}
static int validate_trustdoms(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ struct cache_entry *centry = create_centry_validate(keystr, dbuf);
+
+ if (!centry) {
+ return 1;
+ }
+
+ /* FIXME - fill in details here... */
+
+ centry_free(centry);
+
+ if (bad_cache_entry) {
+ return 1;
+ }
+ DEBUG(10,("validate_trustdoms: %s ok\n", keystr));
return 0;
}
static int validate_offline(TALLOC_CTX *mem_ctx, const char *keystr, TDB_DATA dbuf)
{
+ if (dbuf.dsize != 4) {
+ DEBUG(0,("validate_offline: Corrupt cache for key %s (len %u != 4) ?\n",
+ keystr, (unsigned int)dbuf.dsize ));
+ bad_cache_entry = True;
+ return 1;
+ }
+ DEBUG(10,("validate_offline: %s ok\n", keystr));
return 0;
}