critical impact:
quotactl - incompatible order of parameters (CrCh134)
Problem description
The order of parameters in the invocation of quotactl are different on HP-UX and Tru64 UNIX.
On Tru64 UNIX, the function prototype for the quotactl function is as follows:
int quotactl(char *path, int cmd, int uid, char *addr);
On HP-UX, the function prototype for the quotactl function is as follows:
int quotactl(int cmd, const char *path, uid_t uid, void *addr); Identifiers
 quotactl |
|
|
|
|
Old behavior
The following is an example of Tru64 UNIX code fragment that uses quotactl:
#include <sys/quota.h>
.
.
.
char *path = "/xxx/yyy/";
int cmd;
int uid = 200;
char *addr = "filename";
cmd = QCMD(Q_QUOTAOFF, USRQUOTA);
quotactl(path, cmd, uid, addr);
.
.
. See also
Solution description
Review the applicable manpages and your code, and make the necessary changes.
New behavior
The following is an example of Tru64 UNIX code fragment that uses quotactl:
#include <sys/quota.h>
.
.
.
char *path = "/xxx/yyy/";
int cmd;
int uid = 200;
char *addr = "filename";
cmd = Q_QUOTAOFF;
quotactl(cmd, path, uid, addr);
.
.
. See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| CAP |
C, C++ |
any HP-UX 11i version |
critical |
changed |
|