In user summary select mode we iterate over each row in the user
info table and get the directory name from the number stored in the
row. Next we match this name against the given pattern and only take
matching directories into account for the user summary.
Currently we call get_dir_name_of_row(), but this is wrong:
Since we iterate over the user info table, we must call
get_dir_name_of_user_row() instead as the former function expects a
pointer to a dir table row.
This bug caused wrong directory names to be matched against the
pattern, hence the results of the user summary were incorrect.
return output("%s", select_conf.trailer_arg);
}
+/* row: a pointer to a row of the *user* table */
static int user_summary_loop_function(struct osl_row *row, void *data)
{
struct user_summary_info *usi = data;
if (usi->preg) {
char *dirname;
- ret = get_dir_name_of_row(row, &dirname);
+ ret = get_dir_name_of_user_row(row, usi->ui, &dirname);
if (ret < 0)
goto err;
ret = dir_is_admissible(dirname, usi->preg, usi->inverse_matching);