~ubuntu-branches/ubuntu/hardy/linux-ftpd-ssl/hardy

« back to all changes in this revision

Viewing changes to ftpd/ftpd.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-05-27 15:00:27 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040527150027-r77z246n0vw6tk4b
Tags: 0.17.18+0.3-1
* Bring linux-ftpd in line with current netkit-telnet
* Build for sid/sarge
* Make ftp-ssl protocol compatible with
  http://www.ietf.org/internet-drafts/draft-murray-auth-ftp-ssl-09.txt
  or http://www.ietf.org/rfc/rfc2228.txt. This can break compatiblility
  with older ftp-ssl (closes: #154138)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1172
1172
 
1173
1173
static int pam_doit(void)
1174
1174
{
1175
 
        char *user;
1176
1175
        int error;
1177
1176
 
1178
1177
        error = pam_authenticate(pamh, 0);
1192
1191
                return 1;
1193
1192
        }
1194
1193
        if (error == PAM_SUCCESS) {
 
1194
                const void *vp;
 
1195
 
1195
1196
                /* Alright, we got it */
1196
1197
                error = pam_acct_mgmt(pamh, 0);
1197
1198
                if (error == PAM_SUCCESS)
1199
1200
                if (error == PAM_SUCCESS)
1200
1201
                        error = pam_setcred(pamh, PAM_ESTABLISH_CRED);
1201
1202
                if (error == PAM_SUCCESS)
1202
 
                        error = pam_get_item(pamh, PAM_USER, (const void **) &user);
 
1203
                        error = pam_get_item(pamh, PAM_USER, &vp);
1203
1204
                if (error == PAM_SUCCESS) {
 
1205
                        const char *user = vp;
 
1206
 
1204
1207
                        if (strcmp(user, "ftp") == 0) {
1205
1208
                                guest = 1;
1206
1209
                        }
2216
2219
        int c;
2217
2220
        char line[LINE_MAX];
2218
2221
 
2219
 
        (void)snprintf(line, sizeof(line), "/bin/ls -lgA %s", filename);
 
2222
        (void)snprintf(line, sizeof(line), "/bin/ls -lA %s", filename);
2220
2223
        fin = ftpd_popen(line, "r");
2221
2224
        lreply(211, "status of %s:", filename);
2222
2225
        while ((c = getc(fin)) != EOF) {