~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to source/client/mount.cifs.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-03-03 22:02:23 UTC
  • mfrom: (0.28.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090303220223-3bdlm2d9fwx1p1ye
Tags: 2:3.3.1-1ubuntu1
* Merge from Debian unstable (LP: #337094), remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access. 
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
  + debian/rules:
    - enable "native" PIE hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
* Dropped changes, merged in Debian:
  + debian/libpam-smbpass.pam-config, debian/libpam-smbpass.postinst,
    debian/libpam-smbpass.prerm, debian/libpam-smbpass.files,
    debian/rules:
    - Make libpam-smbpasswd depend on libpam-runtime to allow 
      libpam-smbpasswd for auto-configuration.
  + debian/control:
    - Provide a config block for the new PAM framework to auto-configure
      itself
  + debian/samba.postinst:
    - When populating the new sambashare group, it is not an error
      if the user simply does not exist; test for this case and let
      the install continue instead of aborting.
  + debian/winbind.files:
    - include additional files

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
 
86
86
const char *thisprogram;
87
87
int verboseflag = 0;
 
88
int fakemnt = 0;
88
89
static int got_password = 0;
89
90
static int got_user = 0;
90
91
static int got_domain = 0;
1030
1031
        char * resolved_path = NULL;
1031
1032
        char * temp;
1032
1033
        char * dev_name;
1033
 
        int rc;
 
1034
        int rc = 0;
1034
1035
        int rsize = 0;
1035
1036
        int wsize = 0;
1036
1037
        int nomtab = 0;
1103
1104
                        mount_cifs_usage ();
1104
1105
                        exit(EX_USAGE);
1105
1106
                case 'n':
1106
 
                    ++nomtab;
1107
 
                    break;
 
1107
                        ++nomtab;
 
1108
                        break;
1108
1109
                case 'b':
1109
1110
#ifdef MS_BIND
1110
1111
                        flags |= MS_BIND;
1209
1210
                        break;
1210
1211
                case 't':
1211
1212
                        break;
 
1213
                case 'f':
 
1214
                        ++fakemnt;
 
1215
                        break;
1212
1216
                default:
1213
1217
                        printf("unknown mount option %c\n",c);
1214
1218
                        mount_cifs_usage();
1410
1414
                }
1411
1415
        }
1412
1416
 
1413
 
        if (mount(dev_name, mountpoint, "cifs", flags, options)) {
 
1417
        if (!fakemnt && mount(dev_name, mountpoint, "cifs", flags, options)) {
1414
1418
                switch (errno) {
1415
1419
                case ECONNREFUSED:
1416
1420
                case EHOSTUNREACH:
1440
1444
                goto mount_exit;
1441
1445
        }
1442
1446
 
 
1447
        if (nomtab)
 
1448
                goto mount_exit;
1443
1449
        atexit(unlock_mtab);
1444
1450
        rc = lock_mtab();
1445
1451
        if (rc) {