Changeset 74


Ignore:
Timestamp:
Sep 21, 2007, 9:12:47 AM (18 years ago)
Author:
Paul Smedley
Message:

Close file handles before rename()

Location:
trunk/samba/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/samba/source/nmbd/nmbd_serverlistdb.c

    r1 r74  
    417417 
    418418        x_fclose(fp);
     419#ifdef __OS2__
     420        close(fp);
     421#endif
    419422        unlink(fname);
    420423        chmod(fnamenew,0644);
  • trunk/samba/source/utils/net_usershare.c

    r1 r74  
    816816
    817817        /* Attempt to replace any existing share by this name. */
     818#ifdef __OS2__
     819        close(tmpfd);
     820#endif
    818821        if (rename(full_path_tmp, full_path) != 0) {
    819822                unlink(full_path_tmp);
     
    826829        }
    827830
     831#ifndef __OS2__
    828832        close(tmpfd);
     833#endif
    829834        talloc_destroy(ctx);
    830835
Note: See TracChangeset for help on using the changeset viewer.