summaryrefslogtreecommitdiff
path: root/server/infopipe
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-03-10 10:26:48 -0400
committerSimo Sorce <ssorce@redhat.com>2009-03-11 16:26:58 -0400
commit9a4c22335dff7d6999b97669609e2ca223a54e76 (patch)
tree0b6164fb481864ce8a78b407a3762dbd1885e3fe /server/infopipe
parente1fec92189677bc2f9ba5259cbf0c1604d94a01c (diff)
downloadsssd-9a4c22335dff7d6999b97669609e2ca223a54e76.tar.gz
sssd-9a4c22335dff7d6999b97669609e2ca223a54e76.tar.bz2
sssd-9a4c22335dff7d6999b97669609e2ca223a54e76.zip
Fix copy-paste error in InfoPipe CreateUser
Also add accidentally-omitted loginShell parameter.
Diffstat (limited to 'server/infopipe')
-rw-r--r--server/infopipe/infopipe_users.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/infopipe/infopipe_users.c b/server/infopipe/infopipe_users.c
index 3dc03fe4..656d1525 100644
--- a/server/infopipe/infopipe_users.c
+++ b/server/infopipe/infopipe_users.c
@@ -341,7 +341,7 @@ int infp_users_create(DBusMessage *message, struct sbus_conn_ctx *sconn)
infp_createuser_req->fullname = NULL;
if (strlen(arg_fullname)) {
- infp_createuser_req->fullname = talloc_strdup(infp_createuser_req, arg_username);
+ infp_createuser_req->fullname = talloc_strdup(infp_createuser_req, arg_fullname);
if(infp_createuser_req->fullname == NULL) {
ret = ENOMEM;
goto error;
@@ -350,13 +350,22 @@ int infp_users_create(DBusMessage *message, struct sbus_conn_ctx *sconn)
infp_createuser_req->homedir = NULL;
if (strlen(arg_homedir)) {
- infp_createuser_req->homedir = talloc_strdup(infp_createuser_req, arg_username);
+ infp_createuser_req->homedir = talloc_strdup(infp_createuser_req, arg_homedir);
if(infp_createuser_req->homedir == NULL) {
ret = ENOMEM;
goto error;
}
}
+ infp_createuser_req->shell = NULL;
+ if (strlen(arg_shell)) {
+ infp_createuser_req->shell = talloc_strdup(infp_createuser_req, arg_shell);
+ if(infp_createuser_req->shell == NULL) {
+ ret = ENOMEM;
+ goto error;
+ }
+ }
+
/* Check permissions */
if(!infp_get_permissions(infp_createuser_req->infp_req->caller,
infp_createuser_req->infp_req->domain,