Getting trial days remaining without privilege

Hi,

We use LimeLM in a number of Linux applications which have a similar usage pattern:

1) The application is installed with a privileged account, and a trial is started with the TA_SYSTEM flag.

2) The application is run by ordinary, unprivileged users.

3) The application, while running by the unprivileged user, checks the number of days left in the trial, and shows it to the user, displaying a warning if it's reaching expiration.

We were able to do this successfully for years, but something appears to have changed in LimeLM 4.1+ which makes it impossible. Here's what we are seeing:

- It is not possible to get the trial days remaining via TA_TrialDaysRemaining unless we first call TA_UseTrial in the same process.

- It is not possible to call TA_UseTrial with TA_SYSTEM without root privilege.

This seems to imply that we have to get root privilege to check the number of days left on the trial, which is a problem for us since we can't ask our users to run everything as root.

Is this new requirement intentional? This comment in TurboActivate.h on the TA_UseTrial function seems to suggest that it might not be:

If you call this function once in the past with the flag TA_SYSTEM and the calling process was an admin process then subsequent calls with the TA_SYSTEM flag will succeed even if the calling process is *not* admin/elevated.

How would you recommend getting the trial days remaining from a process run by an ordinary, unprivileged user?

>> "- It is not possible to get the trial days remaining via TA_TrialDaysRemaining unless we first call TA_UseTrial in the same process."

Correct. It was always recommended (all of our examples did it). Now it's enforced (for a number of reasons).

>> "- It is not possible to call TA_UseTrial with TA_SYSTEM without root privilege."

It is. Just not the first time.

Wyatt wrote:> >> "- It is not possible to call TA_UseTrial with TA_SYSTEM without root> privilege."> > It is. Just not the first time.

Sorry, can you clear this up just a bit? Our understanding was that "the first time" meant we could do this just one time on the machine. The behavior we're seeing is that "the first time" is now per-process.

Here are a couple of illustrative examples (straces) on a machine that has already had TA_UseTrial called with TA_SYSTEM.

A new process started by an admin can call TA_UseTrial and TA_TrialDaysRemaining successfully.

https://gist.github.com/jmcphers/bf36ba1a84ce4741673c387b415eb67b

A new process started by an unprivileged user on the same machine cannot.

https://gist.github.com/jmcphers/47a0d10ce7e89eacd41661697c281e9e