/*
SSSD
NFS Client
Copyright (C) Noam Meltzer <noam@primarydata.com> 2013-2014
Copyright (C) Noam Meltzer <tsnoam@gmail.com> 2014-
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/>.
*/
#define _GNU_SOURCE
#include <stddef.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <nfsidmap.h>
#include "nfsidmap_internal.h"
#include "sss_client/sss_cli.h"
#include "sss_client/nss_mc.h"
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
#define USE_MC_DEFAULT true
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/* Forward declarations */
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/* get from memcache functions */
{
int rc = 0;
char *p = NULL;
if (!nfs_use_mc) {
return -1;
}
do {
goto done;
}
buf = p;
if (rc == 0) {
} else {
}
done:
return rc;
}
{
int rc = 0;
char *p = NULL;
if (!nfs_use_mc) {
return -1;
}
do {
goto done;
}
buf = p;
if (rc == 0) {
} else {
}
done:
return rc;
}
{
int rc;
char *p = NULL;
if (!nfs_use_mc) {
return -1;
}
do {
goto done;
}
buf = p;
if (rc == 0) {
if (pw_name_len > len) {
IDMAP_LOG(0, ("%s: reply too long; pw_name_len=%lu, len=%lu",
}
} else {
}
done:
return rc;
}
{
int rc;
char *p = NULL;
if (!nfs_use_mc) {
return -1;
}
do {
goto done;
}
buf = p;
if (rc == 0) {
if (gr_name_len > len) {
IDMAP_LOG(0, ("%s: reply too long; gr_name_len=%lu, len=%lu",
}
} else {
}
done:
return rc;
}
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
{
int rc;
if (rc == 0) {
}
return rc;
}
enum sss_cli_command cmd)
{
int rc;
if (rc == 0) {
}
return rc;
}
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
{
int err = 0;
sss_nss_lock();
if (req_rc == NSS_STATUS_NOTFOUND) {
return ENOENT;
}
if (req_rc != NSS_STATUS_SUCCESS) {
return EPIPE;
}
return 0;
}
{
int rc = 0;
goto done;
}
if (num_results > 1) {
goto done;
}
if (num_results == 0) {
goto done;
}
rep_len));
goto done;
}
done:
return rc;
}
{
int rc = 0;
const char *buf;
goto done;
}
if (num_results > 1) {
goto done;
}
if (num_results == 0) {
goto done;
}
rep_len));
goto done;
}
offset = 0;
if (rc != 0) {
}
done:
return rc;
}
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/* configuration parsing aids */
{
bool res = false;
}
return res;
}
{
int res;
char *val;
if (val) {
}
return res;
}
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/* libnfsidmap return-code aids */
/*
* we only want to return 0 or ENOENT; otherwise libnfsidmap will stop
* translation instead of proceeding to the next translation plugin
*/
int res;
}
return res;
}
/* log the actual rc from our code (to be used before normalising the rc) */
}
/*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .*/
/* The external interface */
static int sss_nfs_init(void)
{
return 0;
}
{
return -ENOENT;
}
{
int rc;
return -EINVAL;
}
return -EINVAL;
}
if (rc != 0) {
return -rc;
}
if (rc != 0) {
}
return -rc;
}
{
int rc;
return -EINVAL;
}
return -EINVAL;
}
if (rc != 0) {
return -rc;
}
if (rc != 0) {
}
return -rc;
}
{
int rc;
return -EINVAL;
}
if (rc != 0) {
}
return -rc;
}
{
int rc;
return -EINVAL;
}
if (rc != 0) {
}
return -rc;
}
static int sss_nfs_gss_princ_to_grouplist(
{
return -ENOENT;
}
.init = sss_nfs_init,
};
{
return (&s_sss_nfs_trans);
}