Licensing check in a loadable .so

  • Thread starter Sandeep Srinivasa
  • Start date
S

Sandeep Srinivasa

hi,
I have a software which has licensing (enabled through flexlm).
Now, an end user can build apps (As loadable modules) using this base
software.
I am introducing a new feature, which I am providing as a .so . The
development teams, release schedules, etc. are completely different
for the base software and the new .so .

1. Is it possible for me to enable licensing for the loadable .so ?

The problem is that as soon as the .so is loaded, all functions become
visible to the end-user who has a license for the base-app, but not
the .so .

I could of course use the dlopen method, but my .so has a thousand
different functions, all of which need to dlsym-ed . Rather than doing
this, I would like a check right when the .so is loaded and forget
about it later.

2. Is there a way to check for licensing in the .init section of
the .so ?

3. Will this be portable across platforms (Linux, Sun, HP 11.11) .

regards and thanks in advance
-Sandeep
 
V

Victor Bazarov

[answering in comp.lang.c++, keeping the OP's cross-post]
Sandeep said:
hi,
I have a software which has licensing (enabled through flexlm).
Now, [...]

Please don't cross-post this to comp.lang.c++, it's off-topic here.
Thanks!
 
A

Alvin Beach

Sandeep said:
hi,
I have a software which has licensing (enabled through flexlm).
Now, an end user can build apps (As loadable modules) using this base
software.
(snip)
2. Is there a way to check for licensing in the .init section of
the .so ?

This may be slightly off topic, but:

How do you access the .init section of a .so that isn't loaded by dlopen?
I'm curious because I have tend to make .so libraries for my apps[1] and
let the OS load the .so when the app starts.

I've always thought of .so files like .a (static libraries) except, the OS
just links the .so at runtime (instead of compile time).


[1] I make the libraries using -shared -fPIC switches for gcc.
 
S

Sandeep Srinivasa

I'm not entirely sure, but I guess it could be possible through the
"constructor" attribute of gcc.
-regards
SSS

Alvin Beach said:
Sandeep said:
hi,
I have a software which has licensing (enabled through flexlm).
Now, an end user can build apps (As loadable modules) using this base
software.
(snip)
2. Is there a way to check for licensing in the .init section of
the .so ?

This may be slightly off topic, but:

How do you access the .init section of a .so that isn't loaded by dlopen?
I'm curious because I have tend to make .so libraries for my apps[1] and
let the OS load the .so when the app starts.

I've always thought of .so files like .a (static libraries) except, the OS
just links the .so at runtime (instead of compile time).


[1] I make the libraries using -shared -fPIC switches for gcc.
 
B

barts

Jan said:
I can't think of any software mechanism for licensing/copy protection that
can't easily be bypassed by any advanced programmer.

You are just annoying paying customers, who will switch to a "cracked"
version very soon, as the don't like the whole hassle with your licensing
scheme. The will pay for your software, but think you are dumb - like they
hate Microsoft for their "product activation".

Don't put too much effort into this "licensing enforcement", as it isn't
worth the work. There is a whole herd of people out there who will break
into your software just because it annoys them. You can't win.


The license check can be as difficult to disable as you like; some
folks
enjoy this game. Just make sure that the product does nothing worse
than
nag the user if he doesn't appear to have the correct license. That
way, when
their license server craps out, or they have to replace their machine
on Friday
evening before a monday deadline, your licensing check isn't the reason
they
didn't make their deadlines.

Nothing worse than having your distrust of your customer be the reason
they don't make
their quarter.

- Bart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top