~ubuntu-branches/ubuntu/intrepid/proftpd-dfsg/intrepid

« back to all changes in this revision

Viewing changes to debian/patches/auth_fix.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Porcheron
  • Date: 2007-01-19 20:35:43 UTC
  • Revision ID: james.westby@ubuntu.com-20070119203543-286is0wzf6cmnvu7
Tags: 1.3.0-20ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: Add update-inetd to proftpd's dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## auth_fix.dpatch by Francesco Paolo Lovergine <frankie@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad proftpd-dfsg-1.3.0~/modules/mod_auth_unix.c proftpd-dfsg-1.3.0/modules/mod_auth_unix.c
 
9
--- proftpd-dfsg-1.3.0~/modules/mod_auth_unix.c 2005-07-03 20:52:02.000000000 +0200
 
10
+++ proftpd-dfsg-1.3.0/modules/mod_auth_unix.c  2007-01-18 12:23:58.000000000 +0100
 
11
@@ -669,8 +669,9 @@
 
12
 
 
13
 #ifdef COMSEC
 
14
   if (iscomsec()) {
 
15
-    if (strcmp(bigcrypt((char *) pw, (char *) cpw), cpw) != 0)
 
16
-      return ERROR(cmd);
 
17
+    if (strcmp(bigcrypt((char *) pw, (char *) cpw), cpw) != 0) {
 
18
+      return DECLINED(cmd);
 
19
+    }
 
20
 
 
21
   } else {
 
22
 #endif /* COMSEC */
 
23
@@ -719,8 +720,9 @@
 
24
   }
 
25
   PRIVS_RELINQUISH
 
26
 
 
27
-  if (res != SIASUCCESS)
 
28
-    return ERROR(cmd);
 
29
+  if (res != SIASUCCESS) {
 
30
+    return DECLINED(cmd);
 
31
+  }
 
32
 
 
33
 #else /* !PR_USE_SIA */
 
34
 
 
35
@@ -750,11 +752,12 @@
 
36
      * other than HANDLED at the moment.
 
37
      */
 
38
 
 
39
-    if (MODRET_ISHANDLED(mr) && MODRET_HASDATA(mr)) {
 
40
+    if (MODRET_ISHANDLED(mr) &&
 
41
+        MODRET_HASDATA(mr)) {
 
42
       pwent = mr->data;
 
43
 
 
44
-      if ((token = cygwin_logon_user((const struct passwd *) pwent,
 
45
-          pw)) == INVALID_HANDLE_VALUE) {
 
46
+      token = cygwin_logon_user((const struct passwd *) pwent, pw);
 
47
+      if (token == INVALID_HANDLE_VALUE) {
 
48
         pr_log_pri(PR_LOG_NOTICE, "error authenticating Cygwin user: %s",
 
49
           strerror(errno));
 
50
         return ERROR(cmd);
 
51
@@ -762,14 +765,16 @@
 
52
 
 
53
       cygwin_set_impersonation_token(token);
 
54
 
 
55
-    } else
 
56
+    } else {
 
57
       return DECLINED(cmd);
 
58
+    }
 
59
 
 
60
   } else
 
61
 # endif /* CYGWIN */
 
62
 
 
63
-  if (strcmp(crypt(pw, cpw), cpw) != 0)
 
64
-    return ERROR(cmd);
 
65
+  if (strcmp(crypt(pw, cpw), cpw) != 0) {
 
66
+    return DECLINED(cmd);
 
67
+  }
 
68
 #endif /* PR_USE_SIA */
 
69
 
 
70
 #ifdef COMSEC