Changeset 6658


Ignore:
Timestamp:
Dec 24, 2010, 9:28:00 PM (8 years ago)
Author:
jow
Message:

libs/lmo: apply FD_CLOEXEC on archive descriptors to avoid leaking i18n file fds into executed subprocesses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/lmo/src/lmo_core.c

    r5297 r6658  
    22 * lmo - Lua Machine Objects - Base functions
    33 *
    4  *   Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
     4 *   Copyright (C) 2009-2010 Jo-Philipp Wich <xm@subsignal.org>
    55 *
    66 *  Licensed under the Apache License, Version 2.0 (the "License");
     
    9494        ar->fd     = in;
    9595        ar->length = idx_offset;
     96
     97        fcntl(ar->fd, F_SETFD, fcntl(ar->fd, F_GETFD) | FD_CLOEXEC);
    9698
    9799        for( i = idx_offset;
     
    231233    return copy_len;
    232234}
    233 
Note: See TracChangeset for help on using the changeset viewer.