Skip to content

Commit

Permalink
* uacctd, fix: nl_groups is a bitmask
Browse files Browse the repository at this point in the history
  • Loading branch information
paololucente authored and paolo committed Oct 18, 2009
1 parent 445f96c commit 07ea81c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cfg_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -2317,8 +2317,8 @@ int cfg_key_uacctd_group(char *filename, char *name, char *value_ptr)
int value, changes = 0;

value = atoi(value_ptr);
if (value < 0) return ERR;
if (value < 1) return ERR;

for (; list; list = list->next, changes++) list->cfg.uacctd_group = value;
for (; list; list = list->next, changes++) list->cfg.uacctd_group = (1 << (value-1));
return changes;
}
2 changes: 1 addition & 1 deletion src/uacctd.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ int main(int argc,char **argv, char **envp)
close(ulog_fd);
exit_all(1);
}
Log(LOG_INFO, "INFO ( default/core ): Netlink ULOG: binding to group %d\n", config.uacctd_group);
Log(LOG_INFO, "INFO ( default/core ): Netlink ULOG: binding to group %x\n", config.uacctd_group);

/* loading pre-tagging map, if any */
if (config.pre_tag_map) {
Expand Down

0 comments on commit 07ea81c

Please sign in to comment.