diff options
Diffstat (limited to 'server/infopipe/infopipe_users.c')
-rw-r--r-- | server/infopipe/infopipe_users.c | 13 |
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, |