/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <tevent.h>
#include <talloc.h>
#include "util/sss_ptr_hash.h"
#include "responder/nss/nss_private.h"
#include "responder/nss/nss_protocol.h"
static struct nss_cmd_ctx *
enum cache_req_type type,
{
return NULL;
}
struct nss_state_ctx);
return cmd_ctx;
}
struct cache_req_data *data)
{
"SSS_NSS_EX_FLAG_INVALIDATE_CACHE are "
"mutually exclusive.\n");
return EINVAL;
}
cache_req_data_set_bypass_cache(data, true);
cache_req_data_set_bypass_dp(data, true);
}
return EOK;
}
bool ex_version,
enum cache_req_type type,
const char **attrs,
enum sss_mc_type memcache,
{
const char *rawname;
goto done;
}
if (ex_version) {
} else {
}
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
return EOK;
}
bool ex_version,
enum cache_req_type type,
const char **attrs,
enum sss_mc_type memcache,
{
goto done;
}
if (ex_version) {
} else {
}
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
return EOK;
}
enum cache_req_type type,
const char *protocol,
const char *name,
{
goto done;
}
goto done;
}
port);
return ENOMEM;
}
done:
}
return EOK;
}
enum cache_req_type type)
{
const char *cert;
goto done;
}
goto done;
}
cert);
goto done;
}
done:
}
return EOK;
}
{
goto done;
}
goto done;
}
goto done;
}
done:
}
enum cache_req_type type,
{
const char *cert;
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
return EOK;
}
enum cache_req_type type,
{
const char *sid;
goto done;
}
/* It will be detected when constructing output packet. */
goto done;
}
goto done;
}
goto done;
}
done:
}
return EOK;
}
struct cache_req_result *result)
{
int ret;
const char *name;
bool is_user;
case CACHE_REQ_INITGROUPS:
is_user = true;
break;
case CACHE_REQ_USER_BY_NAME:
case CACHE_REQ_USER_BY_ID:
is_user = true;
break;
case CACHE_REQ_GROUP_BY_NAME:
case CACHE_REQ_GROUP_BY_ID:
is_user = false;
break;
default:
/* nothing to do */
return EOK;
}
/* Find output name to invalidate memory cache entry*/
return EINVAL;
}
&output_name);
return ret;
}
output_name, 0, memcache_type);
if (memcache_type == SSS_MC_INITGROUPS) {
/* Invalidate the passwd data as well */
}
/* Use sysdb name to invalidate disk cache entry */
return EINVAL;
}
if (memcache_type == SSS_MC_INITGROUPS) {
return ENOMEM;
}
return ret;
}
return ret;
}
}
return ret;
}
return EOK;
}
{
goto done;
}
goto done;
}
}
done:
}
enum cache_req_type type,
struct nss_enum_ctx *enum_ctx)
{
return ENOMEM;
}
return EOK;
}
{
return;
}
/* Both EOK and ENOENT means that setent was successful. */
}
enum cache_req_type type,
struct nss_enum_index *idx,
struct nss_enum_ctx *enum_ctx)
{
goto done;
}
goto done;
}
cmd_ctx->enumeration = true;
goto done;
}
done:
}
return ret;
}
static struct cache_req_result *
struct nss_enum_index *idx)
{
/* Nothing was found. */
return NULL;
}
/* Switch to next domain. */
}
return result;
}
{
goto done;
}
/* No more records to return. */
goto done;
}
/* Create copy of the result with limited number of records. */
ret = ERR_INTERNAL;
goto done;
}
/* Reply with limited result. */
done:
}
}
enum cache_req_type type,
{
const char *netgroup;
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
}
return EOK;
}
{
goto done;
}
done:
}
enum cache_req_type type,
{
goto done;
}
goto done;
}
goto done;
}
cmd_ctx->enumeration = true;
return ENOMEM;
}
done:
}
return EOK;
}
{
goto done;
}
struct nss_enum_ctx);
goto done;
}
/* Reply with result. */
done:
}
}
struct nss_enum_index *idx)
{
return EOK;
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
const char *name;
const char *protocol;
return ret;
}
}
{
const char *protocol;
return ret;
}
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
const char **attrs;
false, discard_const(&attrs));
"Unable to concatenate attributes [%d]: %s\n",
return ENOMEM;
}
} else {
}
}
{
}
{
}
{
{ SSS_CLI_NULL, NULL }
};
return nss_cmds;
}
{
{ 1, "2008-09-05", "initial version, \\0 terminated strings" },
};
return nss_cli_protocol_version;
}
{
int ret;
return ENOMEM;
}
return EOK;
}