Commit ff46cb20 ff46cb204ec68f636a27731ff16a20ddf7e976e2 by Sergey Poznyakoff

Removed -T option (CAN-2004-0984)

1 parent 22ec3a0d
...@@ -75,7 +75,6 @@ static int flags; ...@@ -75,7 +75,6 @@ static int flags;
75 static int retries; 75 static int retries;
76 static int force; 76 static int force;
77 static int debug; 77 static int debug;
78 static const char *program;
79 78
80 static error_t 79 static error_t
81 parse_opt (int key, char *arg, struct argp_state *state) 80 parse_opt (int key, char *arg, struct argp_state *state)
...@@ -90,13 +89,6 @@ parse_opt (int key, char *arg, struct argp_state *state) ...@@ -90,13 +89,6 @@ parse_opt (int key, char *arg, struct argp_state *state)
90 unlock = 1; 89 unlock = 1;
91 break; 90 break;
92 91
93 case 'T':
94 /* This options exists only to test whether internal and external
95 locking work correctly/the same. */
96 flags |= MU_LOCKER_EXTERNAL;
97 program = arg;
98 break;
99
100 case 'r': 92 case 'r':
101 if (arg) 93 if (arg)
102 { 94 {
...@@ -138,15 +130,15 @@ main (int argc, char *argv[]) ...@@ -138,15 +130,15 @@ main (int argc, char *argv[])
138 { 130 {
139 locker_t locker = 0; 131 locker_t locker = 0;
140 int err = 0; 132 int err = 0;
141 pid_t usergid = getgid(); 133 pid_t usergid = getgid ();
142 pid_t mailgid = getegid(); 134 pid_t mailgid = getegid ();
143 135
144 /* Native Language Support */ 136 /* Native Language Support */
145 mu_init_nls (); 137 mu_init_nls ();
146 138
147 /* Drop permissions during argument parsing. */ 139 /* Drop permissions during argument parsing. */
148 140
149 if(setegid(usergid) < 0) 141 if (setegid (usergid) < 0)
150 return MU_DL_EX_ERROR; 142 return MU_DL_EX_ERROR;
151 143
152 mu_argp_init (program_version, NULL); 144 mu_argp_init (program_version, NULL);
...@@ -168,10 +160,7 @@ main (int argc, char *argv[]) ...@@ -168,10 +160,7 @@ main (int argc, char *argv[])
168 if (retries != 0) 160 if (retries != 0)
169 locker_set_retries (locker, retries); 161 locker_set_retries (locker, retries);
170 162
171 if (program != 0) 163 if (setegid (mailgid) < 0)
172 locker_set_external (locker, program);
173
174 if(setegid(mailgid) < 0)
175 return MU_DL_EX_ERROR; 164 return MU_DL_EX_ERROR;
176 165
177 if (unlock) 166 if (unlock)
......