Browse Prior Art Database

COMMAND WHICH RUNS NATIVELY ON BOTH WINDOWS NT AND UNIX

IP.com Disclosure Number: IPCOM000009055D
Original Publication Date: 1999-Jan-01
Included in the Prior Art Database: 2002-Aug-05
Document File: 2 page(s) / 108K

Publishing Venue

Motorola

Related People

Michael Rosenthal: AUTHOR

Abstract

The ClearCase configuration management tool supports a trigger mechanism which allows a user to define a specific action to occur when a particular type of event transpires. The action to occur can either be a command or a specified file which can be executed. The path to the specified file for execu- tion will be different on the UNIX and Windows NT platforms, so specifying an explicit path in the trig- ger definition is not possible if the triggering event can occur on both UNIX and NT platforms. The solution provided by the vendor (prior to ClearCase 3.2) requires that the location to the tile for execu- tion is determined by the user's path environment variable. Since triggers are used as an enforcement mechanism, relying on the user's path is a security loophole. The following techniques allow explicit paths to be used for both UNIX and Windows NT commands. Other applications which run on both UNIX and Windows NT platforms may also benefit from using this technique.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 50% of the total text.

Page 1 of 2

0 M

MOTOROLA Technical Developments

COMMAND WHICH RUNS NATIVELY ON BOTH WINDOWS NT AND UNIX

by Michael Rosenthal

PROBLEM

  The ClearCase configuration management tool supports a trigger mechanism which allows a user to define a specific action to occur when a particular type of event transpires. The action to occur can either be a command or a specified file which can be executed. The path to the specified file for execu- tion will be different on the UNIX and Windows NT platforms, so specifying an explicit path in the trig- ger definition is not possible if the triggering event can occur on both UNIX and NT platforms. The solution provided by the vendor (prior to ClearCase
3.2) requires that the location to the tile for execu- tion is determined by the user's path environment variable. Since triggers are used as an enforcement mechanism, relying on the user's path is a security loophole. The following techniques allow explicit paths to be used for both UNIX and Windows NT commands. Other applications which run on both UNIX and Windows NT platforms may also benefit from using this technique.

SOLUTION

  The mechanism to allow a command to run on both platforms involves specifying both the UNIX and Windows NT commands as a command which can be evaluated by the native command interpreter on both the UNIX and Windows NT platforms such that only the command which is appropriate for the platform on which it is being executed is called.

  Both Windows NT and the UNIX Boume shall allow for conditional processing of commands with the II and && binary operators. The && operator will only execute the right operand if the left operand executed successfully. The II operator will only execute the right operand if the left operand executed unsuccessfully. The following items will be incorporated into the dual platform command:

   Windows NT allows for suppressing error messages output by redirecting standard error to the nul device, i.e., the Window NT command 2>>nul is equivalent to the UNIX command 2>>/dev/null. Redirecting standard error to a regular file (neither nul in Windows NT, nor /dev/null in UNIX) will cause the file to be created even if no error is gener- ated. Redirecting standard error on the UNIX plat- form to 2>>nul is a valid command as long as the file named nul can be created in the current directo- ry. Redirecting standard error to >>/dev/null in Windows NT will raise an error since /dev does not normally exist; this will force the...