pysss.c revision 50134a87d7b3bb2423ebf962bb1d9a7b90194520
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher Jakub Hrozek <jhrozek@redhat.com>
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher Copyright (C) 2009 Red Hat
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher This program is free software; you can redistribute it and/or modify
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher it under the terms of the GNU General Public License as published by
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher the Free Software Foundation; either version 3 of the License, or
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher (at your option) any later version.
along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <Python.h>
#include <structmember.h>
#include <talloc.h>
#include <pwd.h>
#include <grp.h>
#include "util/sss_python.h"
#include "tools/tools_util.h"
#include "tools/sss_sync_ops.h"
#include "util/crypto/sss_crypto.h"
const char *paramname)
char **ret;
return NULL;
return ret;
int lock;
int unlock;
struct py_sss_transaction {
bool transaction_done;
int error;
return NULL;
return NULL;
return tctx;
unsigned long uid = 0;
unsigned long gid = 0;
int ret;
int create_home = 0;
bool in_transaction = false;
&username,
&uid,
&gid,
&gecos,
&home,
&shell,
&skel,
&py_groups)) {
goto fail;
if (!tctx) {
return NULL;
return NULL;
skel);
goto fail;
goto fail;
in_transaction = true;
goto fail;
goto fail;
in_transaction = false;
goto fail;
goto fail;
fail:
if (in_transaction) {
return NULL;
int ret;
int remove_home = 0;
&username,
&py_force)) {
goto fail;
if (!tctx) {
return NULL;
goto fail;
goto fail;
goto fail;
goto fail;
goto fail;
fail:
return NULL;
unsigned long uid = 0;
unsigned long gid = 0;
unsigned long lock = 0;
bool in_transaction = false;
&username,
&uid,
&gid,
&lock,
&gecos,
&home,
&shell,
&py_rmgroups)) {
goto fail;
if (!tctx) {
return NULL;
goto fail;
return NULL;
return NULL;
goto fail;
in_transaction = true;
goto fail;
goto fail;
in_transaction = false;
fail:
if (in_transaction) {
return NULL;
char *groupname;
unsigned long gid = 0;
bool in_transaction = false;
&gid)) {
goto fail;
if (!tctx) {
return NULL;
goto fail;
in_transaction = true;
goto fail;
goto fail;
in_transaction = false;
fail:
if (in_transaction) {
return NULL;
int ret;
goto fail;
if (!tctx) {
return NULL;
goto fail;
fail:
return NULL;
unsigned long gid = 0;
bool in_transaction = false;
&gid,
&py_rmgroups)) {
goto fail;
if (!tctx) {
return NULL;
return NULL;
return NULL;
goto fail;
in_transaction = true;
goto fail;
goto fail;
in_transaction = false;
fail:
if (in_transaction) {
return NULL;
int ngroups;
int ret;
goto fail;
goto fail;
goto fail;
goto fail;
idx = 0;
for (i = 0; i < ngroups; i++) {
if (gr) {
idx++;
if (i != idx) {
return groups_tuple;
fail:
return NULL;
char *confdb_path;
int ret;
return NULL;
return NULL;
return NULL;
return NULL;
return NULL;
int aes_256;
int ret;
int mode;
return NULL;
if (!tctx) {
return NULL;
goto fail;
goto fail;
fail:
return retval;
int ret;
&obfpwd)) {
return NULL;
if (!tctx) {
return NULL;
goto fail;
goto fail;
fail:
return retval;
return NULL;
initpysss(void)
PyObject *m;
if (m == NULL)