From: yuan linyu <[email protected]> Date: Fri, 10 Feb 2017 20:11:13 +0800
> From: yuan linyu <[email protected]> > > SCM_MAX_FD can fully replace it. > > Signed-off-by: yuan linyu <[email protected]> I don't think so: > @@ -341,7 +332,6 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl) > if (new_fpl) { > for (i = 0; i < fpl->count; i++) > get_file(fpl->fp[i]); > - new_fpl->max = new_fpl->count; > new_fpl->user = get_uid(fpl->user); It's not set the SCM_MAX_FD here, it's set to whatever fpl->count is. In other words, your patch breaks things.
