simple_access.c revision c0bca1722d6f9dfb654ad78397be70f79ff39af1
/*
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 "util/sss_utf8.h"
#include "providers/dp_backend.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"
{
struct tevent_req *req;
struct simple_ctx *ctx;
goto done;
}
struct simple_ctx);
if (!req) {
goto done;
}
return;
done:
}
{
bool access_granted = false;
goto done;
}
if (access_granted) {
} else {
}
done:
}
struct bet_ops simple_access_ops = {
};
void **pvt_data)
{
struct simple_ctx *ctx;
return ENOMEM;
}
/* Users */
&ctx->allow_users);
} else {
goto failed;
}
}
&ctx->deny_users);
} else {
goto failed;
}
}
/* Groups */
&ctx->allow_groups);
} else {
goto failed;
}
}
&ctx->deny_groups);
} else {
goto failed;
}
}
if (!ctx->allow_users &&
!ctx->allow_groups &&
!ctx->deny_users &&
!ctx->deny_groups) {
"Access will be granted for all users.\n"));
}
*ops = &simple_access_ops;
return EOK;
return ret;
}