]>
Commit | Line | Data |
---|---|---|
532a528c | 1 | diff -urN pure-ftpd-1.0.16c/src/ftpd.c pure-ftpd-1.0.17/src/ftpd.c |
2 | --- pure-ftpd-1.0.16c/src/ftpd.c 2003-10-19 20:05:08.000000000 +0200 | |
3 | +++ pure-ftpd-1.0.17/src/ftpd.c 2003-11-11 22:09:02.000000000 +0100 | |
4 | @@ -1168,12 +1168,6 @@ | |
5 | } | |
6 | #endif | |
933f38b3 | 7 | |
532a528c | 8 | -#ifdef WITH_PRIVSEP |
9 | -# ifdef USE_CAPABILITIES | |
10 | - drop_login_caps(); | |
11 | -# endif | |
12 | -#endif | |
13 | - | |
14 | #ifndef NON_ROOT_FTP | |
15 | if (authresult.uid > (uid_t) 0) { | |
16 | # ifdef WITH_PRIVSEP | |
17 | @@ -1193,10 +1187,8 @@ | |
18 | } | |
19 | #endif | |
933f38b3 | 20 | |
532a528c | 21 | -#ifndef WITH_PRIVSEP |
22 | -# ifdef USE_CAPABILITIES | |
23 | +#ifdef USE_CAPABILITIES | |
24 | drop_login_caps(); | |
25 | -# endif | |
26 | #endif | |
27 | ||
28 | #ifndef MINIMAL | |
29 | @@ -1678,9 +1670,6 @@ | |
30 | die(421, LOG_ERR, MSG_CHROOT_FAILED); | |
31 | } | |
32 | #ifdef WITH_PRIVSEP | |
33 | -# ifdef USE_CAPABILITIES | |
34 | - drop_login_caps(); | |
35 | -# endif | |
36 | if (setuid(authresult.uid) != 0 || seteuid(authresult.uid) != 0) { | |
37 | _EXIT(EXIT_FAILURE); | |
38 | } | |
39 | @@ -1695,6 +1684,9 @@ | |
40 | # endif | |
41 | # endif | |
933f38b3 | 42 | #endif |
532a528c | 43 | +#ifdef USE_CAPABILITIES |
44 | + drop_login_caps(); | |
45 | +#endif | |
46 | chrooted = 1; | |
47 | #ifdef RATIOS | |
48 | if (ratio_for_non_anon == 0) { | |
49 | @@ -1718,13 +1710,8 @@ | |
50 | } else { | |
51 | addreply(230, MSG_CURRENT_DIR_IS, wd); | |
52 | } | |
53 | -#ifndef WITH_PRIVSEP | |
54 | -# ifdef USE_CAPABILITIES | |
55 | - drop_login_caps(); | |
56 | -# endif | |
57 | -#endif | |
58 | logfile(LOG_INFO, MSG_IS_NOW_LOGGED_IN, account); | |
59 | -# ifdef FTPWHO | |
60 | +#ifdef FTPWHO | |
61 | if (shm_data_cur != NULL) { | |
62 | ftpwho_lock(); | |
63 | strncpy(shm_data_cur->account, account, | |
64 | @@ -1733,7 +1720,7 @@ | |
65 | ftpwho_unlock(); | |
66 | state_needs_update = 1; | |
67 | } | |
68 | -# endif | |
69 | +#endif | |
70 | loggedin = 1; | |
71 | if (getcwd(wd, sizeof wd - (size_t) 1U) == NULL) { | |
72 | wd[0] = '/'; | |
73 |