Changeset 454 for trunk/server/source3/smbd
- Timestamp:
- Jun 4, 2010, 3:11:43 PM (15 years ago)
- Location:
- trunk/server/source3/smbd
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/smbd/dosmode.c
r414 r454 180 180 if (ro_opts == MAP_READONLY_YES) { 181 181 /* Original Samba method - map inverse of user "w" bit. */ 182 #ifndef __OS2__ 182 183 if ((smb_fname->st.st_ex_mode & S_IWUSR) == 0) { 184 #else 185 if (os2_isattribute(smb_fname->base_name, aRONLY) == 0) { 186 #endif 183 187 result |= aRONLY; 184 188 } … … 190 194 } /* Else never set the readonly bit. */ 191 195 196 #ifndef __OS2__ 192 197 if (MAP_ARCHIVE(conn) && ((smb_fname->st.st_ex_mode & S_IXUSR) != 0)) 198 #else 199 if (os2_isattribute(smb_fname->base_name, aARCH) == 0) 200 #endif 193 201 result |= aARCH; 194 202 203 #ifndef __OS2__ 195 204 if (MAP_SYSTEM(conn) && ((smb_fname->st.st_ex_mode & S_IXGRP) != 0)) 205 #else 206 if (os2_isattribute(smb_fname->base_name, aSYSTEM) == 0) 207 #endif 196 208 result |= aSYSTEM; 197 209 210 #ifndef __OS2__ 198 211 if (MAP_HIDDEN(conn) && ((smb_fname->st.st_ex_mode & S_IXOTH) != 0)) 212 #else 213 if (os2_isattribute(smb_fname->base_name, aHIDDEN) == 0) 214 #endif 199 215 result |= aHIDDEN; 200 216 … … 249 265 #else 250 266 ) { 267 #endif 268 269 #ifdef __OS2__ //on os2 no error in case of ./.. and errno 2 270 if ((strncmp(smb_fname->base_name, "./..", 4) !=0) || (errno !=2)) 251 271 #endif 252 272 DEBUG(1,("get_ea_dos_attributes: Cannot get attribute " -
trunk/server/source3/smbd/password.c
r414 r454 219 219 return -1; 220 220 } 221 222 #ifdef __OS2__ 223 /* On OS/2 we use drive letters which have a colon. This is also the field 224 separator in master.passwd, so we use a $ instead of a colon for the drive 225 separator, ie e$/user instead of e:/user. This code simply exchanges any $ 226 for a : in the user's homedir */ 227 if (pwd->pw_dir[1] == '$') 228 pwd->pw_dir[1] = ':'; 229 #endif 221 230 222 231 DEBUG(3, ("Adding homes service for user '%s' using home directory: " -
trunk/server/source3/smbd/reply.c
r429 r454 5652 5652 bool dst_exists, old_is_stream, new_is_stream; 5653 5653 5654 /* borrowed from 3.3 source patch by Apple */ 5655 #ifdef __OS2__ 5656 bool check_dest_exist = False; 5657 #else 5658 bool check_dest_exist = True; 5659 #endif 5660 5654 5661 status = check_name(conn, smb_fname_dst_in->base_name); 5655 5662 if (!NT_STATUS_IS_OK(status)) { … … 5789 5796 dst_exists = SMB_VFS_STAT(conn, smb_fname_dst) == 0; 5790 5797 5791 if( !replace_if_exists && dst_exists) {5798 if(check_dest_exist && !replace_if_exists && dst_exists) { 5792 5799 DEBUG(3, ("rename_internals_fsp: dest exists doing rename " 5793 5800 "%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name), -
trunk/server/source3/smbd/server.c
r429 r454 1117 1117 reopen_logs(); 1118 1118 1119 #ifdef __OS2__ 1120 unsigned long _System DosSetPriority (unsigned long ulScope, unsigned long ulClass, long lDelta, unsigned long ulID); 1121 int rc; 1122 rc = DosSetPriority( 1123 0, /* Scope: only one process */ 1124 4, /* set to PRTYC_FOREGROUNDSERVER */ 1125 0, /* set delta - was 0 */ 1126 0); /* Assume current process */ 1127 DEBUG(0,( "Server priority set to PRTYC_FOREGROUNDSERVER\n")); 1128 #endif 1129 1119 1130 DEBUG(0,("smbd version %s started.\n", samba_version_string())); 1120 1131 DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE)); -
trunk/server/source3/smbd/service.c
r429 r454 68 68 d = destname; 69 69 70 #ifndef __OS2__ 70 71 *d++ = '/'; /* Always start with root. */ 71 72 … … 159 160 *(d-1) = '\0'; 160 161 } 162 #else 163 /* Assume OS/2 users are smart enough to put a correct path in smb.conf, and simply copy the string */ 164 safe_strcpy(destname, connectpath, strlen(connectpath)); 165 #endif 161 166 162 167 DEBUG(10,("set_conn_connectpath: service %s, connectpath = %s\n", -
trunk/server/source3/smbd/sesssetup.c
r429 r454 75 75 result = 0; 76 76 77 #ifndef __OS2__ 77 78 tmp = message_push_string(outbuf, "Unix", STR_TERMINATE); 79 #else 80 tmp = message_push_string(outbuf, "eCS (OS/2)", STR_TERMINATE); 81 #endif 78 82 79 83 if (tmp == -1) return -1; -
trunk/server/source3/smbd/trans2.c
r414 r454 128 128 129 129 pea->flags = 0; 130 #ifndef __OS2__ 130 131 if (strnequal(ea_name, "user.", 5)) { 131 132 pea->name = talloc_strdup(mem_ctx, &ea_name[5]); 132 133 } else { 134 #else 135 { 136 #endif 133 137 pea->name = talloc_strdup(mem_ctx, ea_name); 134 138 } … … 287 291 fstring dos_ea_name; 288 292 293 #ifndef __OS2__ 289 294 if (strnequal(names[i], "system.", 7) 290 295 || samba_private_attr_name(names[i])) 296 #else 297 if (samba_private_attr_name(names[i])) 298 #endif 291 299 continue; 292 300 … … 492 500 fstring unix_ea_name; 493 501 502 #ifdef __OS2__ 503 /* All EA's must start with user - except on OS/2 */ 504 fstrcpy(unix_ea_name, ea_list->ea.name); 505 #else 494 506 fstrcpy(unix_ea_name, "user."); /* All EA's must start with user. */ 495 507 fstrcat(unix_ea_name, ea_list->ea.name); 508 #endif 496 509 497 510 canonicalize_ea_name(conn, fsp, fname, unix_ea_name); … … 5454 5467 } 5455 5468 5469 #ifdef __OS2__ 5470 /* YD ticket#60, the file is opened, we cannot write to it, 5471 * so we can return immediately (see above for more comments). 5472 */ 5473 else { 5474 #endif 5475 5456 5476 DEBUG(10,("smb_set_file_time: setting utimes to modified values.\n")); 5457 5477 … … 5463 5483 return map_nt_error_from_unix(errno); 5464 5484 } 5485 #ifdef __OS2__ 5486 } 5487 #endif 5465 5488 5466 5489 notify_fname(conn, NOTIFY_ACTION_MODIFIED, action, -
trunk/server/source3/smbd/vfs.c
r414 r454 716 716 return(0); 717 717 718 #ifdef __OS2__ 719 if ((*path == '/' || *path == '\\' || (*path && path[1] == ':')) && strcsequal(LastDir,path)) 720 #else 718 721 if (*path == '/' && strcsequal(LastDir,path)) 722 #endif 719 723 return(0); 720 724 … … 938 942 resolved_name)); 939 943 944 #ifdef __OS2__ 945 if (*resolved_name != '/' && *resolved_name != '\\' && (strlen(resolved_name) <= 1 || resolved_name[1] != ':')) { 946 #else 940 947 if (*resolved_name != '/') { 948 #endif 941 949 DEBUG(0,("check_reduced_name: realpath doesn't return " 942 950 "absolute paths !\n"));
Note:
See TracChangeset
for help on using the changeset viewer.