~siretart/x2go/x2goserver-FAU-trunk

« back to all changes in this revision

Viewing changes to x2gosqlitewrapper

  • Committer: Alexander Wuerstlein
  • Date: 2011-03-25 02:50:47 UTC
  • Revision ID: git-v1:255777a8c3e02ba4fae722780123e90d42350d16
Set sqlite db location from x2gouser home dir

Cherry-picked from the 3.0.99 branch with some modifications:

Imported x2goserver_3.0.99-3.tar.gz
(cherry picked from commit f16bab2bcf580ca607b6b5fa3ec1e6a35e78498f)

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
if ($< eq $>)
9
9
{
10
 
    die "Please install this program as SUID x2gouser!\n";
 
10
        die "Please install this program as SUID x2gouser!\n";
11
11
}
12
12
 
13
13
my $realuser=$<;
14
 
my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, $homedir, $shell, $expire) = getpwuid(getuid());
15
 
my $dbfile="/var/lib/x2go/x2go_sessions";
 
14
my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, $homedir, $shell, $expire) = getpwuid($>);
 
15
my $dbfile="$homedir/x2go_sessions";
 
16
 
16
17
my $dbh=DBI->connect("dbi:SQLite:dbname=$dbfile","","",{AutoCommit => 1}) or die $_;
17
18
 
18
19
my $cmd=shift or die "command not specified";