Ignore:
Timestamp:
Mar 12, 2008, 9:08:18 AM (18 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.28a

Location:
branches/samba-3.0/source/smbd
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/smbd/build_options.c

    r62 r124  
    492492        output(screen, "   HAVE_STRING_H\n");
    493493#endif
     494
     495
     496
    494497#ifdef HAVE_SYSCALL_H
    495498        output(screen, "   HAVE_SYSCALL_H\n");
     
    11241127        output(screen, "   HAVE_INOTIFY\n");
    11251128#endif
     1129
     1130
     1131
    11261132#ifdef HAVE_IPRINT
    11271133        output(screen, "   HAVE_IPRINT\n");
     
    12651271        output(screen, "   HAVE_KRB5_PRINCIPAL_GET_COMP_STRING\n");
    12661272#endif
     1273
     1274
     1275
    12671276#ifdef HAVE_KRB5_PRINC_COMPONENT
    12681277        output(screen, "   HAVE_KRB5_PRINC_COMPONENT\n");
    12691278#endif
     1279
     1280
     1281
    12701282#ifdef HAVE_KRB5_PRINC_SIZE
    12711283        output(screen, "   HAVE_KRB5_PRINC_SIZE\n");
     
    13031315#ifdef HAVE_KV5M_KEYTAB
    13041316        output(screen, "   HAVE_KV5M_KEYTAB\n");
     1317
     1318
     1319
    13051320#endif
    13061321#ifdef HAVE_LDAP
     
    24342449        output(screen, "   REPLACE_GETPASS\n");
    24352450#endif
     2451
     2452
     2453
    24362454#ifdef REPLACE_INET_NTOA
    24372455        output(screen, "   REPLACE_INET_NTOA\n");
     
    29462964#ifdef vfs_netatalk_init
    29472965        output(screen, "   vfs_netatalk_init\n");
     2966
     2967
     2968
    29482969#endif
    29492970#ifdef vfs_posixacl_init
  • branches/samba-3.0/source/smbd/chgpasswd.c

    r1 r124  
    127127        gid_t gid;
    128128        uid_t uid;
     129
    129130
    130131        if (pass == NULL)
     
    154155                return (False);
    155156        }
    156 #if defined(I_PUSH) && defined(I_FIND)
     157#if defined(TIOCSCTTY)
     158        if (ioctl(slave, TIOCSCTTY, 0) < 0)
     159        {
     160                DEBUG(3, ("Error in ioctl call for slave pty\n"));
     161                /* return(False); */
     162        }
     163#elif defined(I_PUSH) && defined(I_FIND)
    157164        if (ioctl(slave, I_FIND, "ptem") == 0) {
    158165                ioctl(slave, I_PUSH, "ptem");
     
    160167        if (ioctl(slave, I_FIND, "ldterm") == 0) {
    161168                ioctl(slave, I_PUSH, "ldterm");
    162         }
    163 #elif defined(TIOCSCTTY)
    164         if (ioctl(slave, TIOCSCTTY, 0) < 0)
    165         {
    166                 DEBUG(3, ("Error in ioctl call for slave pty\n"));
    167                 /* return(False); */
    168169        }
    169170#endif
     
    223224
    224225        /* execl() password-change application */
    225         if (execl("/bin/sh", "sh", "-c", passwordprogram, NULL) < 0)
     226        if (execl) < 0)
    226227        {
    227228                DEBUG(3, ("Bad status returned from %s\n", passwordprogram));
     
    499500        if (lp_pam_password_change()) {
    500501                BOOL ret;
     502
     503
     504
    501505
    502506                if (as_root)
     
    511515                if (as_root)
    512516                        unbecome_root();
     517
     518
     519
     520
    513521
    514522                return ret;
  • branches/samba-3.0/source/smbd/dosmode.c

    r57 r124  
    453453
    454454        DEBUG(10,("file_set_dosmode: setting dos mode 0x%x on file %s\n", dosmode, fname));
    455         if (!st || (st && !VALID_STAT(*st))) {
     455
     456        if (st == NULL) {
     457                SET_STAT_INVALID(st1);
    456458                st = &st1;
     459
     460
     461
    457462                if (SMB_VFS_STAT(conn,fname,st))
    458463                        return(-1);
    459464        }
     465
     466
    460467
    461468        get_acl_group_bits(conn, fname, &st->st_mode);
     
    466473                dosmode &= ~aDIR;
    467474
    468         if (dos_mode(conn,fname,st) == dosmode)
     475        if (dos_mode(conn,fname,st) == dosmode) {
     476                st->st_mode = unixmode;
    469477                return(0);
     478
    470479
    471480        /* Store the DOS attributes in an EA by preference. */
    472481        if (set_ea_dos_attribute(conn, fname, st, dosmode)) {
     482
    473483                return 0;
    474484        }
     
    509519                notify_fname(conn, NOTIFY_ACTION_MODIFIED,
    510520                             FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
     521
    511522                return 0;
    512523        }
     
    541552                notify_fname(conn, NOTIFY_ACTION_MODIFIED,
    542553                             FILE_NOTIFY_CHANGE_ATTRIBUTES, fname);
     554
     555
     556
    543557        }
    544558
  • branches/samba-3.0/source/smbd/notify.c

    r62 r124  
    6666        int i;
    6767        UNISTR uni_name;
     68
     69
    6870
    6971        for (i=0; i<num_changes; i++) {
  • branches/samba-3.0/source/smbd/notify_inotify.c

    r39 r124  
    3131#endif
    3232
     33
     34
    3335#include <linux/inotify.h>
    3436#include <asm/unistd.h>
    3537
    36 #ifndef HAVE_INOTIFY_INIT
     38
    3739/*
    3840  glibc doesn't define these functions yet (as of March 2006)
     
    5254        return syscall(__NR_inotify_rm_watch, fd, wd);
    5355}
     56
     57
     58
     59
    5460#endif
    5561
  • branches/samba-3.0/source/smbd/open.c

    r105 r124  
    13761376#endif /* O_SYNC */
    13771377 
    1378         if (posix_open & (access_mask & FILE_APPEND_DATA)) {
     1378        if (posix_open & (access_mask & FILE_APPEND_DATA)) {
    13791379                flags2 |= O_APPEND;
    13801380        }
     
    18191819                    lp_store_dos_attributes(SNUM(conn))) {
    18201820                        if (!posix_open) {
    1821                                 file_set_dosmode(conn, fname,
    1822                                          new_dos_attributes | aARCH, NULL,
    1823                                          parent_dir);
     1821                                SMB_STRUCT_STAT tmp_sbuf;
     1822                                SET_STAT_INVALID(tmp_sbuf);
     1823                                if (file_set_dosmode(
     1824                                                conn, fname,
     1825                                                new_dos_attributes | aARCH,
     1826                                                &tmp_sbuf,
     1827                                                parent_dir) == 0) {
     1828                                        unx_mode = tmp_sbuf.st_mode;
     1829                                }
    18241830                        }
    18251831                }
  • branches/samba-3.0/source/smbd/password.c

    r118 r124  
    9292        if (vuser == NULL)
    9393                return;
    94        
     94
    9595        SAFE_FREE(vuser->homedir);
    9696        SAFE_FREE(vuser->unix_homedir);
    9797        SAFE_FREE(vuser->logon_script);
    98        
     98
     99        if (vuser->auth_ntlmssp_state) {
     100                auth_ntlmssp_end(&vuser->auth_ntlmssp_state);
     101        }
     102
    99103        session_yield(vuser);
    100104        SAFE_FREE(vuser->session_keystr);
     
    112116        SAFE_FREE(vuser->groups);
    113117        TALLOC_FREE(vuser->nt_user_token);
     118
     119
     120
     121
     122
     123
     124
     125
     126
     127
     128
     129
     130
     131
     132
     133
     134
    114135
    115136        SAFE_FREE(vuser);
     
    164185        if (num_validated_vuids >= 0xFFFF-VUID_OFFSET) {
    165186                data_blob_free(&session_key);
     187
    166188                return UID_FIELD_INVALID;
    167189        }
     
    170192                DEBUG(0,("Failed to malloc users struct!\n"));
    171193                data_blob_free(&session_key);
     194
    172195                return UID_FIELD_INVALID;
    173196        }
     
    176199
    177200        /* Allocate a free vuid. Yes this is a linear search... :-) */
    178         while( get_valid_user_struct(next_vuid) != NULL ) {
     201        while( (get_valid_user_struct(next_vuid) != NULL)
     202               || (get_partial_auth_user_struct(next_vuid) != NULL) ) {
    179203                next_vuid++;
    180204                /* Check for vuid wrap. */
  • branches/samba-3.0/source/smbd/posix_acls.c

    r105 r124  
    13371337                                psa1->flags |= (psa2->flags & (SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT));
    13381338                                psa2->flags &= ~(SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT);
    1339                                
     1339
    13401340                        } else if (psa2->flags & SEC_ACE_FLAG_INHERIT_ONLY) {
    13411341
    13421342                                psa2->flags |= (psa1->flags & (SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT));
    13431343                                psa1->flags &= ~(SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT);
    1344                                
     1344
    13451345                        }
    13461346                }