login: add callback for close_range()
Let's make it more robust for old kernels where is no close_range() or in cases when it's unsuccessful. Reported-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
913829559b
commit
cae071ed72
3 changed files with 5 additions and 10 deletions
|
@ -91,9 +91,7 @@ static inline int close_range(unsigned int first, unsigned int last, int flags)
|
|||
# endif /* SYS_close_range */
|
||||
#endif /* __linux__ */
|
||||
|
||||
#ifndef HAVE_CLOSE_RANGE
|
||||
extern void ul_close_all_fds(unsigned int first, unsigned int last);
|
||||
#endif
|
||||
|
||||
#define UL_COPY_READ_ERROR (-1)
|
||||
#define UL_COPY_WRITE_ERROR (-2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue