simple_access.c revision c777f575b0ec0c48ce3b85ea2c5cc298db02450e
/*
SSSD
Simple access control
Copyright (C) Sumit Bose <sbose@redhat.com> 2010
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 <security/pam_modules.h>
#include "providers/simple/simple_access.h"
#include "providers/simple/simple_access_pvt.h"
#include "util/sss_utf8.h"
#define CONFDB_SIMPLE_ALLOW_USERS "simple_allow_users"
#define CONFDB_SIMPLE_DENY_USERS "simple_deny_users"
#define CONFDB_SIMPLE_ALLOW_GROUPS "simple_allow_groups"
#define CONFDB_SIMPLE_DENY_GROUPS "simple_deny_groups"
#define TIMEOUT_OF_REFRESH_FILTER_LISTS 5
char **list,
char ***_out)
{
size_t i;
struct sss_domain_info *domain;
return EOK;
}
goto done;
}
/* count size */
}
goto done;
}
/* Since this is access provider, we should fail on any error so we don't
* allow unauthorized access. */
for (i = 0; i < size; i++) {
goto done;
}
goto done;
}
} else {
}
goto done;
}
}
done:
return ret;
}
{
int ret;
int i;
struct {
const char *name;
const char *option;
char **orig_list;
char ***ctx_list;
goto failed;
}
continue;
goto failed;
}
goto failed;
}
}
if (!ctx->allow_users &&
!ctx->allow_groups &&
!ctx->deny_users &&
!ctx->deny_groups) {
"No rules supplied for simple access provider. "
"Access will be granted for all users.\n");
}
return EOK;
return ret;
}
struct simple_access_handler_state {
};
struct tevent_req *
struct simple_ctx *simple_ctx,
struct dp_req_params *params)
{
struct simple_access_handler_state *state;
struct tevent_req *subreq;
struct tevent_req *req;
struct simple_access_handler_state);
return NULL;
}
goto immediately;
}
"Failed to refresh filter lists, denying all access\n");
goto immediately;
}
}
goto immediately;
}
return req;
/* TODO For backward compatibility we always return EOK to DP now. */
return req;
}
{
struct simple_access_handler_state *state;
struct tevent_req *req;
bool access_granted;
goto done;
}
if (access_granted) {
} else {
}
done:
/* TODO For backward compatibility we always return EOK to DP now. */
}
struct tevent_req *req,
{
return EOK;
}
void *module_data,
struct dp_method *dp_methods)
{
struct simple_ctx *ctx;
return ENOMEM;
}
return EOK;
}