~ubuntu-branches/ubuntu/trusty/vsftpd/trusty-proposed

« back to all changes in this revision

Viewing changes to oneprocess.c

  • Committer: Package Import Robot
  • Author(s): Lorenzo De Liso
  • Date: 2012-12-18 19:59:37 UTC
  • mfrom: (2.3.22 sid)
  • Revision ID: package-import@ubuntu.com-20121218195937-xiwdrfndhhvv87s0
Tags: 3.0.2-1ubuntu1
* Merge from debian unstable (LP: #1092076), remaining changes:
  - Use snakeoil SSL certificates and key.
  - debian/rules, debian/vsftpd.upstart: migrate vsftpd to upstart.
  - Add apport hook:
    + debian/vsftpd.apport: Added.
    + debian/control: Build-depends on dh-apport.
    + debian/rules: Add --with apport.
  - Add debian/watch file.
  - debian/patches/09-disable-anonymous.patch: Disable anonymous login by 
    default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "sysutil.h"
26
26
#include "ptracesandbox.h"
27
27
#include "ftppolicy.h"
 
28
#include "seccompsandbox.h"
28
29
 
29
30
static void one_process_start(void* p_arg);
30
31
 
31
32
void
32
33
vsf_one_process_start(struct vsf_session* p_sess)
33
34
{
34
 
  if (tunable_sandbox)
 
35
  if (tunable_ptrace_sandbox)
35
36
  {
36
37
    struct pt_sandbox* p_sandbox = ptrace_sandbox_alloc();
37
38
    if (p_sandbox == 0)
75
76
  {
76
77
    struct mystr user_name = INIT_MYSTR;
77
78
    struct mystr chdir_str = INIT_MYSTR;
78
 
    str_alloc_text(&user_name, tunable_ftp_username);
 
79
    if (tunable_ftp_username)
 
80
    {
 
81
      str_alloc_text(&user_name, tunable_ftp_username);
 
82
    }
79
83
    if (tunable_anon_root)
80
84
    {
81
85
      str_alloc_text(&chdir_str, tunable_anon_root);
97
101
    str_free(&user_name);
98
102
    str_free(&chdir_str);
99
103
  }
100
 
  if (tunable_sandbox)
 
104
  if (tunable_ptrace_sandbox)
101
105
  {
102
106
    ptrace_sandbox_attach_point();
103
107
  }
 
108
  seccomp_sandbox_init();
 
109
  seccomp_sandbox_setup_postlogin(p_sess);
 
110
  seccomp_sandbox_lockdown();
104
111
  init_connection(p_sess);
105
112
}
106
113