Lines 1460-1466
KCL_TYPE_Pid ATI_API_CALL KCL_GetTgid(vo
Link Here
|
1460 |
*/ |
1460 |
*/ |
1461 |
KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void) |
1461 |
KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void) |
1462 |
{ |
1462 |
{ |
|
|
1463 |
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28) |
1464 |
return current->cred->euid; |
1465 |
#else |
1463 |
return current->euid; |
1466 |
return current->euid; |
|
|
1467 |
#endif |
1464 |
} |
1468 |
} |
1465 |
|
1469 |
|
1466 |
/** /brief Delay execution for the specified number of microseconds |
1470 |
/** /brief Delay execution for the specified number of microseconds |
Lines 1832-1846
int ATI_API_CALL KCL_PosixSecurityCapChe
Link Here
|
1832 |
*/ |
1836 |
*/ |
1833 |
void ATI_API_CALL KCL_PosixSecurityCapSetIPCLock(unsigned int lock) |
1837 |
void ATI_API_CALL KCL_PosixSecurityCapSetIPCLock(unsigned int lock) |
1834 |
{ |
1838 |
{ |
|
|
1839 |
|
1840 |
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28) |
1841 |
struct cred *new = prepare_creds(); |
1842 |
if (!new) { |
1843 |
printk(KERN_ERR "fglrx: could not allocate memory\n"); |
1844 |
return; |
1845 |
} |
1846 |
#else |
1847 |
#define new current |
1848 |
#endif |
1835 |
if (lock == 0 ) |
1849 |
if (lock == 0 ) |
1836 |
{ |
1850 |
{ |
1837 |
cap_lower(current->cap_effective, CAP_IPC_LOCK); |
1851 |
cap_lower(new->cap_effective, CAP_IPC_LOCK); |
1838 |
} |
1852 |
} |
1839 |
else |
1853 |
else |
1840 |
{ |
1854 |
{ |
1841 |
cap_raise(current->cap_effective, CAP_IPC_LOCK); |
1855 |
cap_raise(new->cap_effective, CAP_IPC_LOCK); |
1842 |
} |
1856 |
} |
1843 |
return; |
1857 |
|
|
|
1858 |
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28) |
1859 |
commit_creds(new); |
1860 |
#else |
1861 |
#undef new |
1862 |
#endif |
1844 |
} |
1863 |
} |
1845 |
|
1864 |
|
1846 |
/** \brief Get number of available RAM pages |
1865 |
/** \brief Get number of available RAM pages |