|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2003, 2012 IBM Corporation and others. |
2 |
* Copyright (c) 2003, 2013 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 38-43
Link Here
|
| 38 |
* David McKnight (IBM) [372968] [dstore][shell] provide support for csh and tcsh shells |
38 |
* David McKnight (IBM) [372968] [dstore][shell] provide support for csh and tcsh shells |
| 39 |
* David McKnight (IBM) [395306] [dstore] Regression for CommandMinerThread authority |
39 |
* David McKnight (IBM) [395306] [dstore] Regression for CommandMinerThread authority |
| 40 |
* David McKnight (IBM) [395465] [dstore][shells] customer hit an NPE on shell cleanup |
40 |
* David McKnight (IBM) [395465] [dstore][shells] customer hit an NPE on shell cleanup |
|
|
41 |
* David McKnight (IBM) - [414016] [dstore] new server audit log requirements |
| 41 |
*******************************************************************************/ |
42 |
*******************************************************************************/ |
| 42 |
|
43 |
|
| 43 |
package org.eclipse.rse.internal.dstore.universal.miners.command; |
44 |
package org.eclipse.rse.internal.dstore.universal.miners.command; |
|
Lines 351-356
Link Here
|
| 351 |
if (suCommand!=null) |
352 |
if (suCommand!=null) |
| 352 |
_invocation = suCommand + _invocation; |
353 |
_invocation = suCommand + _invocation; |
| 353 |
|
354 |
|
|
|
355 |
|
| 356 |
String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$ |
| 357 |
UniversalServerUtilities.logAudit(auditData, _dataStore); |
| 358 |
|
| 359 |
|
| 354 |
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory); |
360 |
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory); |
| 355 |
} |
361 |
} |
| 356 |
} |
362 |
} |
|
Lines 401-407
Link Here
|
| 401 |
argsList.add("-L"); //$NON-NLS-1$ |
407 |
argsList.add("-L"); //$NON-NLS-1$ |
| 402 |
didLogin = true; |
408 |
didLogin = true; |
| 403 |
} |
409 |
} |
| 404 |
|
410 |
|
|
|
411 |
|
| 412 |
String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$ |
| 413 |
UniversalServerUtilities.logAudit(auditData, _dataStore); |
| 414 |
|
| 405 |
String args[] = (String[])argsList.toArray(new String[argsList.size()]); |
415 |
String args[] = (String[])argsList.toArray(new String[argsList.size()]); |
| 406 |
|
416 |
|
| 407 |
try { |
417 |
try { |
|
Lines 418-423
Link Here
|
| 418 |
_invocation = suCommand + _invocation; |
428 |
_invocation = suCommand + _invocation; |
| 419 |
} |
429 |
} |
| 420 |
|
430 |
|
|
|
431 |
String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$ |
| 432 |
UniversalServerUtilities.logAudit(auditData, _dataStore); |
| 433 |
|
| 434 |
|
| 421 |
if (customShellInvocation != null && customShellInvocation.length() > 0){ |
435 |
if (customShellInvocation != null && customShellInvocation.length() > 0){ |
| 422 |
// all handled in the custom shell invocation |
436 |
// all handled in the custom shell invocation |
| 423 |
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory); |
437 |
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory); |
|
Lines 460-465
Link Here
|
| 460 |
argsList.add("-c"); //$NON-NLS-1$ |
474 |
argsList.add("-c"); //$NON-NLS-1$ |
| 461 |
argsList.add(_invocation); |
475 |
argsList.add(_invocation); |
| 462 |
|
476 |
|
|
|
477 |
|
| 478 |
String[] auditData = new String[] {"SHELL", _invocation, null, null}; //$NON-NLS-1$ |
| 479 |
UniversalServerUtilities.logAudit(auditData, _dataStore); |
| 480 |
|
| 481 |
|
| 463 |
String args[] = (String[])argsList.toArray(new String[argsList.size()]); |
482 |
String args[] = (String[])argsList.toArray(new String[argsList.size()]); |
| 464 |
_theProcess = Runtime.getRuntime().exec(args, env, theDirectory); |
483 |
_theProcess = Runtime.getRuntime().exec(args, env, theDirectory); |
| 465 |
} |
484 |
} |
|
Lines 694-699
Link Here
|
| 694 |
input.getBytes(); |
713 |
input.getBytes(); |
| 695 |
UniversalServerUtilities.logInfo(getName(), "shell input after char conversion="+input, _dataStore); //$NON-NLS-1$ |
714 |
UniversalServerUtilities.logInfo(getName(), "shell input after char conversion="+input, _dataStore); //$NON-NLS-1$ |
| 696 |
|
715 |
|
|
|
716 |
|
| 717 |
String[] auditData = new String[] {"SHELL-INPUT", input, null, null}; //$NON-NLS-1$ |
| 718 |
UniversalServerUtilities.logAudit(auditData, _dataStore); |
| 719 |
|
| 697 |
if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$ |
720 |
if (_isCsh && origInput.startsWith("export ")){ //$NON-NLS-1$ |
| 698 |
input = origInput.replaceAll("export ", "setenv ").replaceAll("=", " "); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
721 |
input = origInput.replaceAll("export ", "setenv ").replaceAll("=", " "); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
| 699 |
} |
722 |
} |