Changeset 124 for branches/samba-3.0/source/smbd
- Timestamp:
- Mar 12, 2008, 9:08:18 AM (18 years ago)
- Location:
- branches/samba-3.0/source/smbd
- Files:
-
- 12 edited
-
build_options.c (modified) (6 diffs)
-
chgpasswd.c (modified) (6 diffs)
-
dosmode.c (modified) (4 diffs)
-
notify.c (modified) (1 diff)
-
notify_inotify.c (modified) (2 diffs)
-
open.c (modified) (2 diffs)
-
password.c (modified) (5 diffs)
-
posix_acls.c (modified) (9 diffs)
-
reply.c (modified) (2 diffs)
-
server.c (modified) (1 diff)
-
sesssetup.c (modified) (9 diffs)
-
trans2.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/smbd/build_options.c
r62 r124 492 492 output(screen, " HAVE_STRING_H\n"); 493 493 #endif 494 495 496 494 497 #ifdef HAVE_SYSCALL_H 495 498 output(screen, " HAVE_SYSCALL_H\n"); … … 1124 1127 output(screen, " HAVE_INOTIFY\n"); 1125 1128 #endif 1129 1130 1131 1126 1132 #ifdef HAVE_IPRINT 1127 1133 output(screen, " HAVE_IPRINT\n"); … … 1265 1271 output(screen, " HAVE_KRB5_PRINCIPAL_GET_COMP_STRING\n"); 1266 1272 #endif 1273 1274 1275 1267 1276 #ifdef HAVE_KRB5_PRINC_COMPONENT 1268 1277 output(screen, " HAVE_KRB5_PRINC_COMPONENT\n"); 1269 1278 #endif 1279 1280 1281 1270 1282 #ifdef HAVE_KRB5_PRINC_SIZE 1271 1283 output(screen, " HAVE_KRB5_PRINC_SIZE\n"); … … 1303 1315 #ifdef HAVE_KV5M_KEYTAB 1304 1316 output(screen, " HAVE_KV5M_KEYTAB\n"); 1317 1318 1319 1305 1320 #endif 1306 1321 #ifdef HAVE_LDAP … … 2434 2449 output(screen, " REPLACE_GETPASS\n"); 2435 2450 #endif 2451 2452 2453 2436 2454 #ifdef REPLACE_INET_NTOA 2437 2455 output(screen, " REPLACE_INET_NTOA\n"); … … 2946 2964 #ifdef vfs_netatalk_init 2947 2965 output(screen, " vfs_netatalk_init\n"); 2966 2967 2968 2948 2969 #endif 2949 2970 #ifdef vfs_posixacl_init -
branches/samba-3.0/source/smbd/chgpasswd.c
r1 r124 127 127 gid_t gid; 128 128 uid_t uid; 129 129 130 130 131 if (pass == NULL) … … 154 155 return (False); 155 156 } 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) 157 164 if (ioctl(slave, I_FIND, "ptem") == 0) { 158 165 ioctl(slave, I_PUSH, "ptem"); … … 160 167 if (ioctl(slave, I_FIND, "ldterm") == 0) { 161 168 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); */168 169 } 169 170 #endif … … 223 224 224 225 /* execl() password-change application */ 225 if (execl ("/bin/sh", "sh", "-c", passwordprogram, NULL) < 0)226 if (execl) < 0) 226 227 { 227 228 DEBUG(3, ("Bad status returned from %s\n", passwordprogram)); … … 499 500 if (lp_pam_password_change()) { 500 501 BOOL ret; 502 503 504 501 505 502 506 if (as_root) … … 511 515 if (as_root) 512 516 unbecome_root(); 517 518 519 520 513 521 514 522 return ret; -
branches/samba-3.0/source/smbd/dosmode.c
r57 r124 453 453 454 454 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); 456 458 st = &st1; 459 460 461 457 462 if (SMB_VFS_STAT(conn,fname,st)) 458 463 return(-1); 459 464 } 465 466 460 467 461 468 get_acl_group_bits(conn, fname, &st->st_mode); … … 466 473 dosmode &= ~aDIR; 467 474 468 if (dos_mode(conn,fname,st) == dosmode) 475 if (dos_mode(conn,fname,st) == dosmode) { 476 st->st_mode = unixmode; 469 477 return(0); 478 470 479 471 480 /* Store the DOS attributes in an EA by preference. */ 472 481 if (set_ea_dos_attribute(conn, fname, st, dosmode)) { 482 473 483 return 0; 474 484 } … … 509 519 notify_fname(conn, NOTIFY_ACTION_MODIFIED, 510 520 FILE_NOTIFY_CHANGE_ATTRIBUTES, fname); 521 511 522 return 0; 512 523 } … … 541 552 notify_fname(conn, NOTIFY_ACTION_MODIFIED, 542 553 FILE_NOTIFY_CHANGE_ATTRIBUTES, fname); 554 555 556 543 557 } 544 558 -
branches/samba-3.0/source/smbd/notify.c
r62 r124 66 66 int i; 67 67 UNISTR uni_name; 68 69 68 70 69 71 for (i=0; i<num_changes; i++) { -
branches/samba-3.0/source/smbd/notify_inotify.c
r39 r124 31 31 #endif 32 32 33 34 33 35 #include <linux/inotify.h> 34 36 #include <asm/unistd.h> 35 37 36 #ifndef HAVE_INOTIFY_INIT 38 37 39 /* 38 40 glibc doesn't define these functions yet (as of March 2006) … … 52 54 return syscall(__NR_inotify_rm_watch, fd, wd); 53 55 } 56 57 58 59 54 60 #endif 55 61 -
branches/samba-3.0/source/smbd/open.c
r105 r124 1376 1376 #endif /* O_SYNC */ 1377 1377 1378 if (posix_open & (access_mask & FILE_APPEND_DATA)) {1378 if (posix_open & (access_mask & FILE_APPEND_DATA)) { 1379 1379 flags2 |= O_APPEND; 1380 1380 } … … 1819 1819 lp_store_dos_attributes(SNUM(conn))) { 1820 1820 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 } 1824 1830 } 1825 1831 } -
branches/samba-3.0/source/smbd/password.c
r118 r124 92 92 if (vuser == NULL) 93 93 return; 94 94 95 95 SAFE_FREE(vuser->homedir); 96 96 SAFE_FREE(vuser->unix_homedir); 97 97 SAFE_FREE(vuser->logon_script); 98 98 99 if (vuser->auth_ntlmssp_state) { 100 auth_ntlmssp_end(&vuser->auth_ntlmssp_state); 101 } 102 99 103 session_yield(vuser); 100 104 SAFE_FREE(vuser->session_keystr); … … 112 116 SAFE_FREE(vuser->groups); 113 117 TALLOC_FREE(vuser->nt_user_token); 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 114 135 115 136 SAFE_FREE(vuser); … … 164 185 if (num_validated_vuids >= 0xFFFF-VUID_OFFSET) { 165 186 data_blob_free(&session_key); 187 166 188 return UID_FIELD_INVALID; 167 189 } … … 170 192 DEBUG(0,("Failed to malloc users struct!\n")); 171 193 data_blob_free(&session_key); 194 172 195 return UID_FIELD_INVALID; 173 196 } … … 176 199 177 200 /* 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) ) { 179 203 next_vuid++; 180 204 /* Check for vuid wrap. */ -
branches/samba-3.0/source/smbd/posix_acls.c
r105 r124 1337 1337 psa1->flags |= (psa2->flags & (SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT)); 1338 1338 psa2->flags &= ~(SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT); 1339 1339 1340 1340 } else if (psa2->flags & SEC_ACE_FLAG_INHERIT_ONLY) { 1341 1341 1342 1342 psa2->flags |= (psa1->flags & (SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT)); 1343 1343 psa1->flags &= ~(SEC_ACE_FLAG_CONTAINER_INHERIT|SEC_ACE_FLAG_OBJECT_INHERIT); 1344 1344 1345 1345 } 1346 1346 } …
