~ubuntu-branches/ubuntu/maverick/vsftpd/maverick-proposed

« back to all changes in this revision

Viewing changes to postlogin.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-11-28 15:56:37 UTC
  • mfrom: (1.2.3 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20061128155637-7a0diflww1by4yc1
Tags: 2.0.5-2ubuntu1
* Merge from debian unstable, remaining changes:
  - remove stop links from rc0 and rc6
  - lsb init script
  - use snakeoil ssl certs

Show diffs side-by-side

added added

removed removed

Lines of Context:
659
659
    vsf_cmdio_write(p_sess, FTP_FILEFAIL, "Failed to open file.");
660
660
    goto file_close_out;
661
661
  }
 
662
  /* Now deactive O_NONBLOCK, otherwise we have a problem on DMAPI filesystems
 
663
   * such as XFS DMAPI.
 
664
   */
 
665
  vsf_sysutil_deactivate_noblock(opened_file);
662
666
  /* Optionally, we'll be paranoid and only serve publicly readable stuff */
663
667
  if (p_sess->is_anonymous && tunable_anon_world_readable_only &&
664
668
      !vsf_sysutil_statbuf_is_readable_other(s_p_statbuf))
942
946
static void
943
947
handle_upload_common(struct vsf_session* p_sess, int is_append, int is_unique)
944
948
{
 
949
  static struct vsf_sysutil_statbuf* s_p_statbuf;
945
950
  static struct mystr s_filename;
946
951
  struct mystr* p_filename;
947
952
  struct vsf_transfer_ret trans_ret;
993
998
    vsf_cmdio_write(p_sess, FTP_UPLOADFAIL, "Could not create file.");
994
999
    return;
995
1000
  }
 
1001
  vsf_sysutil_fstat(new_file_fd, &s_p_statbuf);
 
1002
  if (vsf_sysutil_statbuf_is_regfile(s_p_statbuf))
 
1003
  {
 
1004
    /* Now deactive O_NONBLOCK, otherwise we have a problem on DMAPI filesystems
 
1005
     * such as XFS DMAPI.
 
1006
     */
 
1007
    vsf_sysutil_deactivate_noblock(new_file_fd);
 
1008
  }
996
1009
  /* Are we required to chown() this file for security? */
997
1010
  if (p_sess->is_anonymous && tunable_chown_uploads)
998
1011
  {