This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goadmincenter. commit 56b52396b6bf4193042ac7aa784383c84d7d1aea Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Jan 9 03:02:36 2015 +0100 common: whitespace fixes only. --- .../x2gogroupadmingui/x2gogroupadminwindow.h | 4 +- .../x2gosessionadmingui/x2gosessionadminwindow.h | 2 +- x2goadmincenter/settingsdialog.cpp | 2 +- x2goadmincenter/settingsdialog.h | 2 +- x2goadminserver/cgi-bin/x2gorpcserver.cgi | 2 +- x2goadminserver/lib/x2goadminserver.pm | 2 +- .../lib/x2goadminserver_backend_cipux.pm | 16 +- .../lib/x2goadminserver_backend_ldap.pm | 224 ++++++++++---------- 8 files changed, 127 insertions(+), 127 deletions(-) diff --git a/x2goadmincenter/modules/x2gogroupadmingui/x2gogroupadminwindow.h b/x2goadmincenter/modules/x2gogroupadmingui/x2gogroupadminwindow.h index 4152469..076cbcb 100644 --- a/x2goadmincenter/modules/x2gogroupadmingui/x2gogroupadminwindow.h +++ b/x2goadmincenter/modules/x2gogroupadmingui/x2gogroupadminwindow.h @@ -110,8 +110,8 @@ private: QString DEVELOPERS; QString TRANSLATORS; QString ABOUT; - - + + private slots: void slotHandleSslErrors(QNetworkReply *reply, const QList<QSslError> &errors); void slotRpcFault(int, const QString& errMessage); diff --git a/x2goadmincenter/modules/x2gosessionadmingui/x2gosessionadminwindow.h b/x2goadmincenter/modules/x2gosessionadmingui/x2gosessionadminwindow.h index 863de15..3f14953 100644 --- a/x2goadmincenter/modules/x2gosessionadmingui/x2gosessionadminwindow.h +++ b/x2goadmincenter/modules/x2gosessionadmingui/x2gosessionadminwindow.h @@ -86,7 +86,7 @@ private: QString DEVELOPERS; QString TRANSLATORS; QString ABOUT; - + QTimer servTimer; diff --git a/x2goadmincenter/settingsdialog.cpp b/x2goadmincenter/settingsdialog.cpp index 3f62551..ff98f5e 100644 --- a/x2goadmincenter/settingsdialog.cpp +++ b/x2goadmincenter/settingsdialog.cpp @@ -27,7 +27,7 @@ SettingsDialog::SettingsDialog(QWidget* parent, Qt::WindowFlags f): QDialog(pare X2goSettings st("settings"); checkBox->setChecked(st.setting()->value("admin",true).toBool()); leUrl->setText(st.setting()->value("url","http://www/cgi-bin/x2gorpcserver.cgi").toString()); - leLogin->setText(st.setting()->value("login","cipadmin").toString()); + leLogin->setText(st.setting()->value("login","cipadmin").toString()); } diff --git a/x2goadmincenter/settingsdialog.h b/x2goadmincenter/settingsdialog.h index 80b440f..2fee620 100644 --- a/x2goadmincenter/settingsdialog.h +++ b/x2goadmincenter/settingsdialog.h @@ -28,7 +28,7 @@ class SettingsDialog : public QDialog, private Ui_SettingsDialog { Q_OBJECT public: - SettingsDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); + SettingsDialog(QWidget* parent = 0, Qt::WindowFlags f = 0); virtual ~SettingsDialog(); void accept(); }; diff --git a/x2goadminserver/cgi-bin/x2gorpcserver.cgi b/x2goadminserver/cgi-bin/x2gorpcserver.cgi index 97e99a3..94b5416 100755 --- a/x2goadminserver/cgi-bin/x2gorpcserver.cgi +++ b/x2goadminserver/cgi-bin/x2gorpcserver.cgi @@ -67,7 +67,7 @@ sub process_cgi_call ($) { # Fetch our body. my $body; my $count = read STDIN, $body, $length; - http_error(400, "Bad Request") unless $count == $length; + http_error(400, "Bad Request") unless $count == $length; # Serve our request. my $coder = Frontier::RPC2->new; diff --git a/x2goadminserver/lib/x2goadminserver.pm b/x2goadminserver/lib/x2goadminserver.pm index bc02657..0e455fa 100644 --- a/x2goadminserver/lib/x2goadminserver.pm +++ b/x2goadminserver/lib/x2goadminserver.pm @@ -38,7 +38,7 @@ if($backend eq "x2goldap" ) } use base 'Exporter'; -our @EXPORT=('x2goadmin_getUsers','x2goadmin_getGroups', 'x2goadmin_getGroupsOfUser','x2goadmin_getGroupsWithUsers', +our @EXPORT=('x2goadmin_getUsers','x2goadmin_getGroups', 'x2goadmin_getGroupsOfUser','x2goadmin_getGroupsWithUsers', 'x2goadmin_modifyUser', 'x2goadmin_addUser','x2goadmin_modifyGroup', 'x2goadmin_addGroup' ,'x2goadmin_removeUsers','x2goadmin_removeGroups', 'x2goadmin_getSessions', 'x2goadmin_suspendSession', 'x2goadmin_terminateSession'); diff --git a/x2goadminserver/lib/x2goadminserver_backend_cipux.pm b/x2goadminserver/lib/x2goadminserver_backend_cipux.pm index 6f1df6b..132f258 100644 --- a/x2goadminserver/lib/x2goadminserver_backend_cipux.pm +++ b/x2goadminserver/lib/x2goadminserver_backend_cipux.pm @@ -265,7 +265,7 @@ sub getUsers { return $str; } - $str=userAttributes(); + $str=userAttributes(); my $cmdres; my $msg; ($status,$cmdres, $msg)=execCommand('cipux_task_retrieve_all_user_account_lastname_firstname'); @@ -312,7 +312,7 @@ sub getGroups { return $str; } - $str=groupAttributes(); + $str=groupAttributes(); my $cmdres; my $msg; $str=$str."\nBEGIN_USERS"; @@ -322,7 +322,7 @@ sub getGroups return $msg; } $str=$str.$msg."\nEND_USERS"; - $str=$str."\nBEGIN_GROUPS\n"; + $str=$str."\nBEGIN_GROUPS\n"; my $res; ($status,$msg,$res)=getAllGroupsWithUsers(); if(!$status) @@ -330,7 +330,7 @@ sub getGroups return $msg; } $str=$str.$res; - $str=$str."\nEND_GROUPS\n"; + $str=$str."\nEND_GROUPS\n"; $rpc->rpc_logout; return $str; @@ -363,7 +363,7 @@ sub getGroupsWithUsers { return $str; } - $str=userAttributes; + $str=userAttributes; my $cmdres; my $msg; $str=$str."\nBEGIN_USERS"; @@ -381,7 +381,7 @@ sub getGroupsWithUsers return $msg; } $str=$str.$res; - $str=$str."\nEND_GROUPS\n"; + $str=$str."\nEND_GROUPS\n"; $rpc->rpc_logout; return $str; @@ -398,7 +398,7 @@ sub getAllGroupsWithUsers } while( my ($key, $value) = each (%$cmdres_all_tasks)) { - if($key =~ m/list/ && $key =~ m/accounts/ && + if($key =~ m/list/ && $key =~ m/accounts/ && $key ne "cipux_task_list_user_accounts" && $key ne "cipux_task_list_role_accounts" && $key ne "cipux_task_list_skel_accounts") @@ -464,7 +464,7 @@ sub getGroupsOfUser while( my ($key, $value) = each (%$cmdres_all_tasks)) { - if($key =~ m/list/ && $key =~ m/accounts/ && + if($key =~ m/list/ && $key =~ m/accounts/ && $key ne "cipux_task_list_user_accounts" && $key ne "cipux_task_list_role_accounts" && $key ne "cipux_task_list_skel_accounts") diff --git a/x2goadminserver/lib/x2goadminserver_backend_ldap.pm b/x2goadminserver/lib/x2goadminserver_backend_ldap.pm index 31601c3..7b288f6 100644 --- a/x2goadminserver/lib/x2goadminserver_backend_ldap.pm +++ b/x2goadminserver/lib/x2goadminserver_backend_ldap.pm @@ -153,14 +153,14 @@ sub getUserName foreach (@$attr) { my $type=$_->{'type'}; - my $vals=$_->{'vals'}; + my $vals=$_->{'vals'}; if($type eq "givenName") { - $cn=decode("utf-8", @$vals[0]); + $cn=decode("utf-8", @$vals[0]); } if($type eq "sn") { - $sn=decode("utf-8", @$vals[0]); + $sn=decode("utf-8", @$vals[0]); } } } @@ -184,10 +184,10 @@ sub getGid foreach (@$attr) { my $type=$_->{'type'}; - my $vals=$_->{'vals'}; + my $vals=$_->{'vals'}; if($type eq "gidNumber") { - $gid=@$vals[0]; + $gid=@$vals[0]; } } } @@ -221,8 +221,8 @@ sub modifyUser sub addModifyUser -{ - +{ + my ($mode,$login,$password,$user, @args)=@_; my $retmsg="OK"; @@ -314,11 +314,11 @@ sub addModifyUser } if(!$modcn) { - $modcn=$cn; + $modcn=$cn; } if(!$modsn) { - $modsn=$sn; + $modsn=$sn; } } $attr->{'gecos'}=normalized($modcn." ".$modsn); @@ -332,11 +332,11 @@ sub addModifyUser $message=$ldap->modify("uid=$user,ou=People,$basedn", replace => $attr ); } else - { + { my $arr; while( my ($key, $value) = each (%$attr)) { - push(@$arr,$key=>$value); + push(@$arr,$key=>$value); } push(@$arr,uid=>$user); @@ -379,7 +379,7 @@ sub addModifyUser system("/etc/x2go/adduser $user $userUidNumber"); } } - + foreach (@newgrp) { my ($code, $msg)=addUserToGroup("cn=$_,ou=Group,$basedn", $user); @@ -407,7 +407,7 @@ sub getGroupsOfUser { my ($login, $password, $user) = @_; my ($status,$str)=getServerInfo($login, $password); - + if(!$status) { return $str; @@ -434,23 +434,23 @@ sub getGroupsOfUser my $vals=$_->{'vals'}; if($type eq "cn") { - $grp=@$vals[0]; + $grp=@$vals[0]; } if($type eq "gidNumber") { - $gid=@$vals[0]; + $gid=@$vals[0]; } if($type eq "memberUid") { - if(grep { $_ eq $user} @$vals) - { - $exists="1"; - } - } + if(grep { $_ eq $user} @$vals) + { + $exists="1"; + } + } } $str=$str."\n".$grp.":$exists:$gid"; } - + $ldap->unbind(); return $str; } @@ -463,22 +463,22 @@ sub getGroupsWithUsers if(!$status) { return $str; - } + } $str=userAttributes(); - - $str=$str."\nBEGIN_USERS"; + + $str=$str."\nBEGIN_USERS"; my ($code, $desc, $result)=getAllUsers($login); if($code) { - return ("CMDERR "." ".$desc); - } + return ("CMDERR "." ".$desc); + } $str=$str.$result."\nEND_USERS"; - - $str=$str."\nBEGIN_GROUPS\n"; - ($code, $desc, $result)=getAllGroupsWithUser($login); + + $str=$str."\nBEGIN_GROUPS\n"; + ($code, $desc, $result)=getAllGroupsWithUser($login); if($code) { - return ("CMDERR "." ".$desc); + return ("CMDERR "." ".$desc); } $str=$str.$result."\nEND_GROUPS\n"; $ldap->unbind(); @@ -492,7 +492,7 @@ sub getAllGroupsWithUser my $message=$ldap->search( base => "ou=Group,$basedn", filter => '(objectClass=posixGroup)' ); - + if(!$message->code) { foreach ($message->entries) @@ -502,25 +502,25 @@ sub getAllGroupsWithUser my ($name,$gid,$desc,$members); foreach (@$attr) { - my $type=$_->{'type'}; - my $vals=$_->{'vals'}; - - if($type eq "cn") - { - $name=@$vals[0]; - } - if($type eq "gidNumber") - { - $gid=@$vals[0]; - } - if($type eq "description") - { - $desc=@$vals[0]; - } - if($type eq "memberUid") - { - $members=join(";",@$vals); - } + my $type=$_->{'type'}; + my $vals=$_->{'vals'}; + + if($type eq "cn") + { + $name=@$vals[0]; + } + if($type eq "gidNumber") + { + $gid=@$vals[0]; + } + if($type eq "description") + { + $desc=@$vals[0]; + } + if($type eq "memberUid") + { + $members=join(";",@$vals); + } } $str=$str."\nNAME=".$name.":GID=".$gid.":DESC=".$desc.":MEMBERS=".$members; } @@ -536,19 +536,19 @@ sub getUsers { return $str; } - + $str=userAttributes(); $str=$str."\nBEGIN_USERS"; - + my ($code, $desc, $result)=getAllUsers($login); if($code) { return ("CMDERR "." ".$desc); - } + } $str=$str.$result."\nEND_USERS"; - + $ldap->unbind(); - + return $str; } @@ -558,13 +558,13 @@ sub getAllUsers my $message=$ldap->search( base => "ou=People,$basedn", filter => '(objectClass=posixAccount)' ); - - my $str; + + my $str; if($message->code) { return ($message->code, $message->error_desc(),$str); } - + foreach ($message->entries) { my $asn=$_->{'asn'}; @@ -573,38 +573,38 @@ sub getAllUsers foreach (@$attr) { my $type=$_->{'type'}; - my $vals=$_->{'vals'}; + my $vals=$_->{'vals'}; if($type eq "givenName") { - push(@userdata,decode("utf-8", "FNAME=@$vals[0]")); + push(@userdata,decode("utf-8", "FNAME=@$vals[0]")); } if($type eq "sn") { - push(@userdata,decode("utf-8", "LNAME=@$vals[0]")); + push(@userdata,decode("utf-8", "LNAME=@$vals[0]")); } if($type eq "gidNumber") { - push(@userdata,"GID=@$vals[0]"); + push(@userdata,"GID=@$vals[0]"); } if($type eq "homeDirectory") { - push(@userdata,"HOME=@$vals[0]"); + push(@userdata,"HOME=@$vals[0]"); } if($type eq "uid") { - push(@userdata,"UID=@$vals[0]"); + push(@userdata,"UID=@$vals[0]"); } if($type eq "uidNumber") { - push(@userdata,"UIDNUMBER=@$vals[0]"); + push(@userdata,"UIDNUMBER=@$vals[0]"); } if($type eq "loginShell") { - push(@userdata,"SHELL=@$vals[0]"); + push(@userdata,"SHELL=@$vals[0]"); } if($type eq "o") { - push(@userdata,"BIRTHDAY=@$vals[0]"); + push(@userdata,"BIRTHDAY=@$vals[0]"); } } $str=$str."\n".join(":",@userdata); @@ -663,20 +663,20 @@ sub getGroups return $str; } $str=groupAttributes(); - - $str=$str."\nBEGIN_USERS"; + + $str=$str."\nBEGIN_USERS"; my ($code, $desc, $result)=getAllUsers($login); if($code) { - return ("CMDERR "." ".$desc); - } + return ("CMDERR "." ".$desc); + } $str=$str.$result."\nEND_USERS"; - - $str=$str."\nBEGIN_GROUPS\n"; - ($code, $desc, $result)=getAllGroupsWithUser($login); + + $str=$str."\nBEGIN_GROUPS\n"; + ($code, $desc, $result)=getAllGroupsWithUser($login); if($code) { - return ("CMDERR "." ".$desc); + return ("CMDERR "." ".$desc); } $str=$str.$result."\nEND_GROUPS\n"; $ldap->unbind(); @@ -696,7 +696,7 @@ sub removeUsers my $message=$ldap->search( base => "ou=Group,$basedn", filter => '(objectClass=posixGroup)' ); - + if($message->code) { return ("CMDERR "." ".$message->error_desc()); @@ -712,14 +712,14 @@ sub removeUsers my $vals=$_->{'vals'}; if($type eq "cn") { - my $grp=@$vals[0]; - my $message=$ldap->modify("cn=$grp,ou=Group,$basedn", - delete => {memberUid => \@ulist}); + my $grp=@$vals[0]; + my $message=$ldap->modify("cn=$grp,ou=Group,$basedn", + delete => {memberUid => \@ulist}); } } } foreach(@ulist) - { + { my $message=$ldap->delete("uid=$_,ou=People,$basedn"); if($message->code) { @@ -738,15 +738,15 @@ sub removeGroups { return $str; } - my @glist=split(";",$groups); + my @glist=split(";",$groups); foreach(@glist) - { + { my $message=$ldap->delete("cn=$_,ou=Group,$basedn"); if($message->code) { return ("CMDERR "." ".$message->error_desc()); } - } + } return "OK"; } @@ -776,33 +776,33 @@ sub addModifyGroup my $rm=0; my $mod=0; - foreach (@args) - { + foreach (@args) + { $str=$str."\n".$_; - my @cmd=split(":",$_); - if(@cmd[0] eq "description") - { - push(@$attr,'description'=>@cmd[1]); - $mod=1; - } + my @cmd=split(":",$_); + if(@cmd[0] eq "description") + { + push(@$attr,'description'=>@cmd[1]); + $mod=1; + } if(@cmd[0] eq "gid") - { - push(@$attr,'gidNumber'=>@cmd[1]); - $mod=1; - } - if(@cmd[0] eq "newmembers") { - my $arr; + push(@$attr,'gidNumber'=>@cmd[1]); + $mod=1; + } + if(@cmd[0] eq "newmembers") + { + my $arr; @$arr=split(";",@cmd[1]); - push(@$addAttr,'memberUid'=>$arr); - $add=1; - } - if(@cmd[0] eq "obsoletemembers") + push(@$addAttr,'memberUid'=>$arr); + $add=1; + } + if(@cmd[0] eq "obsoletemembers") { - my $arr; + my $arr; @$arr=split(";",@cmd[1]); - push(@$rmAttr,'memberUid'=>$arr); - $rm=1; + push(@$rmAttr,'memberUid'=>$arr); + $rm=1; } } @@ -812,29 +812,29 @@ sub addModifyGroup my $changes; if($mod) { - push(@$changes,'replace'=>$attr); + push(@$changes,'replace'=>$attr); } if($add) { - push(@$changes,'add'=>$addAttr); + push(@$changes,'add'=>$addAttr); } if($rm) { - push(@$changes,'delete'=>$rmAttr); + push(@$changes,'delete'=>$rmAttr); } $message=$ldap->modify("cn=$group,ou=Group,$basedn", - changes => $changes ); + changes => $changes ); } else - { + { push(@$attr,cn=>$group); foreach(@$addAttr) { - push(@$attr, $_); + push(@$attr, $_); } push(@$attr,objectClass=>['top','posixGroup']); $message=$ldap->add("cn=$group,ou=Group,$basedn", - attr => $attr); + attr => $attr); } if($message->code) { @@ -845,4 +845,4 @@ sub addModifyGroup } -return 1; \ No newline at end of file +return 1; -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goadmincenter.git