* text length 2 bytes
* text N bytes + 1 terminating NULL byte
*/
-token_t *au_to_arg32(char n, char *text, u_int32_t v)
+token_t *
+au_to_arg32(char n, const char *text, u_int32_t v)
{
token_t *t;
u_char *dptr;
return NULL;
}
- /* Make sure that text is null terminated */
textlen = strlen(text);
- if(text[textlen] != '\0') {
- return NULL;
- }
GET_TOKEN_AREA(t, dptr, 9 + textlen);
if(t == NULL) {
}
-token_t *au_to_arg64(char n, char *text, u_int64_t v)
+token_t *
+au_to_arg64(char n, const char *text, u_int64_t v)
{
token_t *t;
u_char *dptr;
return NULL;
}
- /* Make sure that text is null terminated */
textlen = strlen(text);
- if(text[textlen] != '\0') {
- return NULL;
- }
GET_TOKEN_AREA(t, dptr, 13 + textlen);
if(t == NULL) {
}
-token_t *au_to_arg(char n, char *text, u_int32_t v)
+token_t *
+au_to_arg(char n, char *text, u_int32_t v)
{
return au_to_arg32(n, text, v);
}
* data items (depends on basic unit)
*/
token_t *au_to_data(char unit_print, char unit_type,
- char unit_count, char *p)
+ char unit_count, unsigned char *p)
{
token_t *t;
u_char *dptr;
/*
*/
-token_t *au_to_groups(int *groups)
+token_t *
+au_to_groups(gid_t *groups)
{
return au_to_newgroups(MAX_GROUPS, groups);
}
*/
ADD_U_CHAR(dptr, AU_IPCPERM_TOKEN);
- ADD_U_INT16(dptr, pad0);
- ADD_U_INT16(dptr, perm->uid);
-
- ADD_U_INT16(dptr, pad0);
- ADD_U_INT16(dptr, perm->gid);
-
- ADD_U_INT16(dptr, pad0);
- ADD_U_INT16(dptr, perm->cuid);
-
- ADD_U_INT16(dptr, pad0);
- ADD_U_INT16(dptr, perm->cgid);
+ ADD_U_INT32(dptr, perm->uid);
+ ADD_U_INT32(dptr, perm->gid);
+ ADD_U_INT32(dptr, perm->cuid);
+ ADD_U_INT32(dptr, perm->cgid);
ADD_U_INT16(dptr, pad0);
ADD_U_INT16(dptr, perm->mode);
ADD_U_INT16(dptr, pad0);
- ADD_U_INT16(dptr, perm->seq);
+ ADD_U_INT16(dptr, perm->_seq);
ADD_U_INT16(dptr, pad0);
- ADD_U_INT16(dptr, perm->key);
+ ADD_U_INT16(dptr, perm->_key);
return t;
}
if(file == NULL) {
return NULL;
}
- /* Make sure that text is null terminated */
filelen = strlen(file);
- if(file[filelen] != '\0') {
- return NULL;
- }
GET_TOKEN_AREA(t, dptr, filelen + 12);
if(t == NULL) {
* text length 2 bytes
* text N bytes + 1 terminating NULL byte
*/
-token_t *au_to_text(char *text)
+token_t *au_to_text(const char *text)
{
token_t *t;
u_char *dptr;
if(text == NULL) {
return NULL;
}
- /* Make sure that text is null terminated */
textlen = strlen(text);
- if(text[textlen] != '\0') {
- return NULL;
- }
GET_TOKEN_AREA(t, dptr, textlen + 4);
if(t == NULL) {
if(text == NULL) {
return NULL;
}
- /* Make sure that text is null terminated */
textlen = strlen(text);
- if(text[textlen] != '\0') {
- return NULL;
- }
GET_TOKEN_AREA(t, dptr, textlen + 4);
if(t == NULL) {
* token ID 1 byte
* sequence number 4 bytes
*/
-token_t *au_to_seq(long audit_count)
+token_t *au_to_seq(u_int32_t audit_count)
{
token_t *t;
u_char *dptr;
int nextlen;
nextlen = strlen(nextarg);
- if(nextarg[nextlen] != '\0') {
- return NULL;
- }
-
totlen += nextlen + 1;
count++;
nextarg = *(args + count);
int nextlen;
nextlen = strlen(nextenv);
- if(nextenv[nextlen] != '\0') {
- return NULL;
- }
-
totlen += nextlen + 1;
count++;
nextenv = *(env + count);