Quoting Eric Paris <eparis@xxxxxxxxxxxxxx>:
OMG this +1 -1 stuff is nuts... iterate_fd passes fd+1 instead of the fd for the file? seriously? ewwww. I see how this patch fixes it, but still, wouldn't some magic or negative value for no entries found be better than having to understand the crazy logics?
I agree. -ENOENT is both magic and negative :) I tend to think now that iterate_fd() should be rewritten before it's too late and all its current users should be cross-checked against the code prior to the introduction of iterate_fd(). -- Regards, Pavel Roskin -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.