tags:

views:

17

answers:

1

I have a vendor application on AIX which requires the system date to be set to an arbitrary value for QA testing purposes. The application gets its date from the system, and there is no possibility of changing it to get the date from a parameter. The application runs under a specific userid. I'd like to find a way to set the date for this application or user to a private value without affecting all the other users and applications on the system. So far the only thing I have been able to do is dedicate an LPAR to this application. Every day at midnight a root crontab job resets the date to the static value. This works, but it is wasteful of resources; and now I am faced the requirement to do this for other applications, which, of course, require different dates. Is there any clever solution to this? I need a way to create a sandboxed environment where the date returned from the system can be set to a private value. As I said, the OS is AIX, and that can't be changed for this application either.

A: 

You might be able to build a mutant system library (whatever AIX uses for dll/so) that intercepts the date system call and passes everything else on to the real lib. I can think of several way that would fail and several more why it's not a good idea, but it could work.

BCS