version 1.46, 2002/08/28 14:56:05
|
version 1.47, 2002/08/29 00:27:52
|
|
|
return DynamicSymbolHandle(proc); | return DynamicSymbolHandle(proc); |
} | } |
| |
ArrayDestroyer<char> _p((String("_") + symbolName).allocateCString()); |
if (shl_findsym((shl_t*)libraryHandle, |
if (shl_findsym((shl_t*)libraryHandle, _p.getPointer(), TYPE_UNDEFINED, |
(String("_") + symbolName).getCString(), |
|
TYPE_UNDEFINED, |
&proc) == 0) | &proc) == 0) |
{ | { |
return DynamicSymbolHandle(proc); | return DynamicSymbolHandle(proc); |
|
|
#endif | #endif |
} | } |
| |
Boolean System::isSystemUser(char* userName) |
Boolean System::isSystemUser(const char* userName) |
{ | { |
// | // |
// get the password entry for the user | // get the password entry for the user |
|
|
struct passwd *result; | struct passwd *result; |
char pwdBuffer[1024]; | char pwdBuffer[1024]; |
| |
ArrayDestroyer<char> userName_(userName.allocateCString()); |
if (getpwnam_r(userName.getCString(), &pwd, pwdBuffer, 1024, &result) == 0) |
if (getpwnam_r(userName_.getPointer(), &pwd, pwdBuffer, 1024, &result) == 0) |
|
{ | { |
if ( pwd.pw_uid == 0 ) | if ( pwd.pw_uid == 0 ) |
{ | { |