mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 12:05:21 +02:00
[270833] Unify rseserver auth.pl to not use "su -p" on any Platform
This commit is contained in:
parent
fd38a30406
commit
6eee81cbe2
2 changed files with 5 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
# Copyright (c) 2005, 2009 IBM Corporation and others.
|
# Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
# IBM Corporation - initial API and implementation
|
# IBM Corporation - initial API and implementation
|
||||||
# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
|
# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
|
||||||
# David McKnight (IBM) - [262013] [dstore][unix] RSE Daemon fails to start server on HP-UX
|
# David McKnight (IBM) - [262013] [dstore][unix] RSE Daemon fails to start server on HP-UX
|
||||||
|
# David McKnight (IBM) - [270833] Unify rseserver auth.pl to not use "su -p" on any Platform
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
|
|
||||||
use Shell;
|
use Shell;
|
||||||
|
@ -56,20 +57,12 @@ else
|
||||||
|
|
||||||
$encryptedPWD = crypt($pwdIN, $passwd);
|
$encryptedPWD = crypt($pwdIN, $passwd);
|
||||||
$classpath=$ENV{CLASSPATH};
|
$classpath=$ENV{CLASSPATH};
|
||||||
$suOptions="-p";
|
$suOptions="-";
|
||||||
|
|
||||||
if ($passwd eq $encryptedPWD)
|
if ($passwd eq $encryptedPWD)
|
||||||
{
|
{
|
||||||
print("success\n");
|
print("success\n");
|
||||||
|
|
||||||
$os = uname();
|
|
||||||
chomp($os);
|
|
||||||
|
|
||||||
if (lc($os) eq "aix" || lc($os) eq "HP-UX")
|
|
||||||
{
|
|
||||||
$suOptions="-";
|
|
||||||
}
|
|
||||||
|
|
||||||
# check for the existence of a home directory
|
# check for the existence of a home directory
|
||||||
$homeDir=$dir;
|
$homeDir=$dir;
|
||||||
if (!(-e $homeDir))
|
if (!(-e $homeDir))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
# Copyright (c) 2005, 2009 IBM Corporation and others.
|
# Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
|
# David McKnight (IBM) - [254785] [dstore] RSE Server assumes home directory on target machine
|
||||||
# David McKnight (IBM) - [262013] [dstore][unix] RSE Daemon fails to start server on HP-UX
|
# David McKnight (IBM) - [262013] [dstore][unix] RSE Daemon fails to start server on HP-UX
|
||||||
# David McKnight (IBM) - [270015] rseserver fails to run on FreeBSD.
|
# David McKnight (IBM) - [270015] rseserver fails to run on FreeBSD.
|
||||||
|
# David McKnight (IBM) - [270833] Unify rseserver auth.pl to not use "su -p" on any Platform
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
|
|
||||||
use Shell;
|
use Shell;
|
||||||
|
@ -63,14 +64,6 @@ else
|
||||||
{
|
{
|
||||||
print("success\n");
|
print("success\n");
|
||||||
|
|
||||||
$os = uname();
|
|
||||||
chomp($os);
|
|
||||||
|
|
||||||
if (lc($os) eq "linux")
|
|
||||||
{
|
|
||||||
$suOptions="-p";
|
|
||||||
}
|
|
||||||
|
|
||||||
# check for the existence of a home directory
|
# check for the existence of a home directory
|
||||||
$homeDir=$dir;
|
$homeDir=$dir;
|
||||||
if (!(-e $homeDir))
|
if (!(-e $homeDir))
|
||||||
|
|
Loading…
Add table
Reference in a new issue