/*
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 "lib/idmap/sss_idmap.h"
#include "responder/nss/nss_protocol.h"
{
switch (error) {
case EOK:
/* Create empty packet if none was provided. */
goto done;
}
}
goto done;
case ENOENT:
goto done;
default:
goto done;
}
done:
return ret;
}
return EOK;
}
struct nss_cmd_ctx *cmd_ctx,
struct cache_req_result *result,
{
goto done;
}
goto done;
}
done:
}
{
const char *rawname;
/* If not terminated fail. */
return EINVAL;
}
/* If the body isn't valid UTF-8, fail */
return EINVAL;
}
if (rawname[0] == '\0') {
return EINVAL;
}
return EOK;
}
{
const char *rawname;
uint8_t *p;
return EINVAL;
}
/* If first argument not terminated fail. */
return EINVAL;
}
/* Although body for sure is null terminated, let's add this check here
* so static analyzers are happier. */
if (p == NULL) {
"memchr() returned NULL, body is not null terminated!\n");
return EINVAL;
}
/* If the body isn't valid UTF-8, fail */
return EINVAL;
}
if (rawname[0] == '\0') {
return EINVAL;
}
p++;
return EINVAL;
}
p += sizeof(uint32_t);
return EOK;
}
{
return EINVAL;
}
return EOK;
}
{
return EINVAL;
}
return EOK;
}
{
}
const char **_name,
const char **_protocol)
{
const char *protocol;
const char *name;
int i;
/* If not terminated fail. */
return EINVAL;
}
/* Calculate service name length. */
name_len++;
}
/* Calculate protocol name length, use index from previous cycle. */
protocol_len++;
}
if (name_len == 0) {
return EINVAL;
}
return EINVAL;
}
return EINVAL;
}
return EOK;
}
const char **_protocol)
{
const char *protocol;
int i;
/* If not terminated fail. */
return EINVAL;
}
/* Move behind the port and padding to get the protocol. */
/* Calculate protocol name length. */
protocol_len++;
}
return EINVAL;
}
return EOK;
}
const char **_derb64)
{
const char *derb64;
char *pem_cert;
/* If not terminated fail. */
return EINVAL;
}
/* Check input. */
"Unable to convert certificate to pem [%d]: %s\n",
return ret;
}
return EOK;
}
const char **_sid)
{
const char *sid;
/* If not terminated fail. */
return EINVAL;
}
/* If the body isn't a SID, fail */
&bin_len);
if (err != IDMAP_SUCCESS) {
"Unable to convert SID to binary [%s].\n", sid);
return EINVAL;
}
return EOK;
}