Changeset 746 for vendor/current/source3/lib
- Timestamp:
- Nov 27, 2012, 4:56:06 PM (13 years ago)
- Location:
- vendor/current/source3/lib
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/lib/ctdbd_conn.c
r740 r746 1201 1201 struct ctdbd_traverse_state state; 1202 1202 1203 become_root(); 1203 1204 status = ctdbd_init_connection(NULL, &conn); 1205 unbecome_root(); 1204 1206 if (!NT_STATUS_IS_OK(status)) { 1205 1207 DEBUG(0, ("ctdbd_init_connection failed: %s\n", -
vendor/current/source3/lib/dbwrap_ctdb.c
r740 r746 23 23 #include "lib/util/tdb_wrap.h" 24 24 #include "util_tdb.h" 25 25 26 #ifdef CLUSTER_SUPPORT 26 27 #include "ctdb.h" … … 1247 1248 } 1248 1249 1250 /* wrapper to use traverse_persistent_callback with dbwrap */ 1251 static int traverse_persistent_callback_dbwrap(struct db_record *rec, void* data) 1252 { 1253 return traverse_persistent_callback(NULL, rec->key, rec->value, data); 1254 } 1255 1256 1249 1257 static int db_ctdb_traverse(struct db_context *db, 1250 1258 int (*fn)(struct db_record *rec, … … 1261 1269 1262 1270 if (db->persistent) { 1271 struct tdb_context *ltdb = ctx->wtdb->tdb; 1272 int ret; 1273 1263 1274 /* for persistent databases we don't need to do a ctdb traverse, 1264 1275 we can do a faster local traverse */ 1265 return tdb_traverse(ctx->wtdb->tdb, traverse_persistent_callback, &state); 1276 ret = tdb_traverse(ltdb, traverse_persistent_callback, &state); 1277 if (ret < 0) { 1278 return ret; 1279 } 1280 if (ctx->transaction && ctx->transaction->m_write) { 1281 /* 1282 * we now have to handle keys not yet 1283 * present at transaction start 1284 */ 1285 struct db_context *newkeys = db_open_rbt(talloc_tos()); 1286 struct ctdb_marshall_buffer *mbuf = ctx->transaction->m_write; 1287 struct ctdb_rec_data *rec=NULL; 1288 NTSTATUS status; 1289 int i; 1290 int count = 0; 1291 1292 if (newkeys == NULL) { 1293 return -1; 1294 } 1295 1296 for (i=0; i<mbuf->count; i++) { 1297 TDB_DATA key; 1298 rec =db_ctdb_marshall_loop_next(mbuf, rec, 1299 NULL, NULL, 1300 &key, NULL); 1301 SMB_ASSERT(rec != NULL); 1302 1303 if (!tdb_exists(ltdb, key)) { 1304 dbwrap_store(newkeys, key, tdb_null, 0); 1305 } 1306 } 1307 status = dbwrap_traverse(newkeys, 1308 traverse_persistent_callback_dbwrap, 1309 &state, 1310 &count); 1311 talloc_free(newkeys); 1312 if (!NT_STATUS_IS_OK(status)) { 1313 return -1; 1314 } 1315 ret += count; 1316 } 1317 return ret; 1266 1318 } 1267 1319 -
vendor/current/source3/lib/dbwrap_util.c
r740 r746 447 447 NTSTATUS dbwrap_traverse(struct db_context *db, 448 448 int (*f)(struct db_record*, void*), 449 void *private_data) 449 void *private_data, 450 int *count) 450 451 { 451 452 int ret = db->traverse(db, f, private_data); 452 return (ret == -1) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK; 453 } 454 455 456 453 454 if (ret < 0) { 455 return NT_STATUS_INTERNAL_DB_CORRUPTION; 456 } 457 458 if (count != NULL) { 459 *count = ret; 460 } 461 462 return NT_STATUS_OK; 463 } 457 464 458 465 NTSTATUS dbwrap_delete_bystring_upper(struct db_context *db, const char *key) -
vendor/current/source3/lib/filename_util.c
r740 r746 48 48 /** 49 49 * There are actually legitimate callers of this such as functions that 50 * enumerate streams using the SMB_VFS_STREAMINFOinterface and then want to50 * enumerate streams using the vfs_streaminfo interface and then want to 51 51 * operate on each stream. 52 52 */ -
vendor/current/source3/lib/fncall.c
r740 r746 281 281 int job_id; 282 282 283 job_id = pthreadpool_finished_job(ctx->pool); 284 if (job_id <= 0) { 283 if (pthreadpool_finished_job(ctx->pool, &job_id) != 0) { 285 284 return; 286 285 } -
vendor/current/source3/lib/ldb_compat.c
r740 r746 85 85 } 86 86 87 88 87 static bool need_encode(unsigned char cval) 88 { 89 if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", cval)) { 90 return true; 91 } 92 return false; 93 } 89 94 90 95 /* … … 100 105 101 106 for (i=0;i<val.length;i++) { 102 if ( !isprint(buf[i]) || strchr(" *()\\&|!\"",buf[i])) {107 if (need_encode(buf[i])) { 103 108 len += 2; 104 109 } … … 109 114 len = 0; 110 115 for (i=0;i<val.length;i++) { 111 if ( !isprint(buf[i]) || strchr(" *()\\&|!\"",buf[i])) {116 if (need_encode(buf[i])) { 112 117 snprintf(ret+len, 4, "\\%02X", buf[i]); 113 118 len += 3; -
vendor/current/source3/lib/netapi/netapi.c
r740 r746 104 104 NET_API_STATUS status; 105 105 struct libnetapi_ctx *ctx = NULL; 106 char *krb5_cc_env = NULL;107 106 108 107 frame = talloc_stackframe(); … … 115 114 116 115 BlockSignals(True, SIGPIPE); 117 118 krb5_cc_env = getenv(KRB5_ENV_CCNAME);119 if (!krb5_cc_env || (strlen(krb5_cc_env) == 0)) {120 ctx->krb5_cc_env = talloc_strdup(frame, "MEMORY:libnetapi");121 setenv(KRB5_ENV_CCNAME, ctx->krb5_cc_env, 1);122 }123 116 124 117 if (getenv("USER")) { … … 267 260 } 268 261 262 /**************************************************************** 263 ****************************************************************/ 264 269 265 NET_API_STATUS libnetapi_set_use_ccache(struct libnetapi_ctx *ctx) 270 266 { -
vendor/current/source3/lib/pidfile.c
r740 r746 31 31 /* return the pid in a pidfile. return 0 if the process (or pidfile) 32 32 does not exist */ 33 pid_t pidfile_pid(const char * name)33 pid_t pidfile_pid(const char *program_name) 34 34 { 35 35 int fd; … … 37 37 pid_t pid; 38 38 unsigned int ret; 39 char *name; 40 const char *short_configfile; 39 41 char * pidFile; 40 42 43 /* Add a suffix to the program name if this is a process with a 44 * none default configuration file name. */ 45 if (strcmp( CONFIGFILE, get_dyn_CONFIGFILE()) == 0) { 46 name = SMB_STRDUP(program_name); 47 } else { 48 short_configfile = strrchr( get_dyn_CONFIGFILE(), '/'); 49 if (short_configfile == NULL) { 50 /* conf file in current directory */ 51 short_configfile = get_dyn_CONFIGFILE(); 52 } else { 53 /* full/relative path provided */ 54 short_configfile++; 55 } 56 if (asprintf(&name, "%s-%s", program_name, 57 short_configfile) == -1) { 58 smb_panic("asprintf failed"); 59 } 60 } 61 41 62 if (asprintf(&pidFile, "%s/%s.pid", lp_piddir(), name) == -1) { 63 SAFE_FREE(name); 42 64 return 0; 43 65 } 66 67 SAFE_FREE(name); 44 68 45 69 fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644); -
vendor/current/source3/lib/pthreadpool/pthreadpool.c
r740 r746 285 285 */ 286 286 287 int pthreadpool_finished_job(struct pthreadpool *pool )288 { 289 int re sult;287 int pthreadpool_finished_job(struct pthreadpool *pool, int *jobid) 288 { 289 int ret_jobid; 290 290 ssize_t nread; 291 291 … … 294 294 295 295 while ((nread == -1) && (errno == EINTR)) { 296 nread = read(pool->sig_pipe[0], &re sult, sizeof(int));296 nread = read(pool->sig_pipe[0], &ret_jobid, sizeof(int)); 297 297 } 298 298 if (nread == -1) { … … 302 302 return EINVAL; 303 303 } 304 return result; 304 *jobid = ret_jobid; 305 return 0; 305 306 } 306 307 -
vendor/current/source3/lib/pthreadpool/pthreadpool.h
r740 r746 91 91 * 92 92 * @param[in] pool The pool to query for finished jobs 93 * @return The job_id of the finished job 93 * @param[out] pjobid The job_id of the finished job 94 * @return success: 0, failure: errno 94 95 */ 95 int pthreadpool_finished_job(struct pthreadpool *pool );96 int pthreadpool_finished_job(struct pthreadpool *pool, int *jobid); 96 97 97 98 #endif -
vendor/current/source3/lib/pthreadpool/tests.c
r740 r746 69 69 70 70 for (i=0; i<num_jobs; i++) { 71 ret = pthreadpool_finished_job(p); 72 if ((ret < 0) || (ret >= num_jobs)) { 73 fprintf(stderr, "invalid job number %d\n", ret); 74 return -1; 75 } 76 finished[ret] += 1; 71 int jobid = -1; 72 ret = pthreadpool_finished_job(p, &jobid); 73 if ((ret != 0) || (jobid >= num_jobs)) { 74 fprintf(stderr, "invalid job number %d\n", jobid); 75 return -1; 76 } 77 finished[jobid] += 1; 77 78 } 78 79 … … 276 277 277 278 for (j=0; j<num_pools; j++) { 279 int jobid = -1; 278 280 279 281 if ((pfds[j].revents & (POLLIN|POLLHUP)) == 0) { … … 281 283 } 282 284 283 ret = pthreadpool_finished_job(pools[j] );284 if ((ret < 0) || (ret>= num_jobs * num_threads)) {285 ret = pthreadpool_finished_job(pools[j], &jobid); 286 if ((ret != 0) || (jobid >= num_jobs * num_threads)) { 285 287 fprintf(stderr, "invalid job number %d\n", 286 ret);288 jobid); 287 289 return -1; 288 290 } 289 finished[ ret] += 1;291 finished[jobid] += 1; 290 292 received += 1; 291 293 } -
vendor/current/source3/lib/recvfile.c
r740 r746 31 31 * as we're below the Samba vfs layer. 32 32 * 33 * If tofd is -1 we just drain the incoming socket of count34 * bytes without writing to the outgoing fd.35 * If a write fails we do the same (to cope with disk full)36 * errors.37 *38 33 * Returns -1 on short reads from fromfd (read error) 39 34 * and sets errno. 40 35 * 41 36 * Returns number of bytes written to 'tofd' 42 * or thrown away if 'tofd == -1'.43 37 * return != count then sets errno. 44 38 * Returns count if complete success. … … 97 91 num_written = 0; 98 92 99 while (num_written < read_ret) { 93 /* Don't write any more after a write error. */ 94 while (tofd != -1 && (num_written < read_ret)) { 100 95 ssize_t write_ret; 101 96 102 if (tofd == -1) { 103 write_ret = read_ret; 104 } else { 105 /* Write to file - ignore EINTR. */ 106 write_ret = sys_write(tofd, 107 buffer + num_written, 108 read_ret - num_written); 109 110 if (write_ret <= 0) { 111 /* write error - stop writing. */ 112 tofd = -1; 113 saved_errno = errno; 114 continue; 115 } 97 /* Write to file - ignore EINTR. */ 98 write_ret = sys_write(tofd, 99 buffer + num_written, 100 read_ret - num_written); 101 102 if (write_ret <= 0) { 103 /* write error - stop writing. */ 104 tofd = -1; 105 if (total_written == 0) { 106 /* Ensure we return 107 -1 if the first 108 write failed. */ 109 total_written = -1; 110 } 111 saved_errno = errno; 112 break; 116 113 } 117 114 … … 215 212 216 213 done: 217 if ( total_written <count) {214 if (count) { 218 215 int saved_errno = errno; 219 if (drain_socket(fromfd, count-total_written) != 220 count-total_written) { 216 if (drain_socket(fromfd, count) != count) { 221 217 /* socket is dead. */ 222 218 return -1; … … 244 240 /***************************************************************** 245 241 Throw away "count" bytes from the client socket. 242 Returns count or -1 on error. 246 243 *****************************************************************/ 247 244 248 245 ssize_t drain_socket(int sockfd, size_t count) 249 246 { 250 return default_sys_recvfile(sockfd, -1, (SMB_OFF_T)-1, count); 251 } 247 size_t total = 0; 248 size_t bufsize = MIN(TRANSFER_BUF_SIZE,count); 249 char *buffer = NULL; 250 251 if (count == 0) { 252 return 0; 253 } 254 255 buffer = SMB_MALLOC_ARRAY(char, bufsize); 256 if (buffer == NULL) { 257 return -1; 258 } 259 260 while (total < count) { 261 ssize_t read_ret; 262 size_t toread = MIN(bufsize,count - total); 263 264 /* Read from socket - ignore EINTR. */ 265 read_ret = sys_read(sockfd, buffer, toread); 266 if (read_ret <= 0) { 267 /* EOF or socket error. */ 268 free(buffer); 269 return -1; 270 } 271 total += read_ret; 272 } 273 274 free(buffer); 275 return count; 276 } -
vendor/current/source3/lib/secdesc.c
r740 r746 535 535 const struct security_acl *the_acl = parent_ctr->dacl; 536 536 537 if (the_acl == NULL) { 538 return false; 539 } 540 537 541 for (i = 0; i < the_acl->num_aces; i++) { 538 542 const struct security_ace *ace = &the_acl->aces[i]; … … 560 564 struct security_ace *new_ace_list = NULL; 561 565 unsigned int new_ace_list_ndx = 0, i; 566 bool set_inherited_flags = (parent_ctr->type & SEC_DESC_DACL_AUTO_INHERITED); 562 567 563 568 *ppsd = NULL; … … 622 627 /* First add the regular ACE entry. */ 623 628 init_sec_ace(new_ace, ptrustee, ace->type, 624 ace->access_mask, 0); 629 ace->access_mask, 630 set_inherited_flags ? SEC_ACE_FLAG_INHERITED_ACE : 0); 625 631 626 632 DEBUG(5,("se_create_child_secdesc(): %s:%d/0x%02x/0x%08x" … … 645 651 646 652 init_sec_ace(new_ace, ptrustee, ace->type, 647 ace->access_mask, new_flags); 653 ace->access_mask, new_flags | 654 (set_inherited_flags ? SEC_ACE_FLAG_INHERITED_ACE : 0)); 648 655 649 656 DEBUG(5, ("se_create_child_secdesc(): %s:%d/0x%02x/0x%08x " … … 672 679 *ppsd = make_sec_desc(ctx, 673 680 SECURITY_DESCRIPTOR_REVISION_1, 674 SEC_DESC_SELF_RELATIVE|SEC_DESC_DACL_PRESENT, 681 SEC_DESC_SELF_RELATIVE|SEC_DESC_DACL_PRESENT| 682 (set_inherited_flags ? SEC_DESC_DACL_AUTO_INHERITED : 0), 675 683 owner_sid, 676 684 group_sid, -
vendor/current/source3/lib/serverid.c
r740 r746 234 234 TDB_DATA tdbkey; 235 235 236 if (lp_clustering() && !process_exists(*id)) { 237 return false; 236 if (procid_is_me(id)) { 237 return true; 238 } 239 240 if (!process_exists(*id)) { 241 return false; 242 } 243 244 if (id->unique_id == SERVERID_UNIQUE_ID_NOT_TO_VERIFY) { 245 return true; 238 246 } 239 247 … … 352 360 return db->traverse(db, serverid_traverse_fn, &state); 353 361 } 362 363 uint64_t serverid_get_random_unique_id(void) 364 { 365 uint64_t unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY; 366 367 while (unique_id == SERVERID_UNIQUE_ID_NOT_TO_VERIFY) { 368 generate_random_buffer((uint8_t *)&unique_id, 369 sizeof(unique_id)); 370 } 371 372 return unique_id; 373 } -
vendor/current/source3/lib/substitute.c
r740 r746 196 196 197 197 static char sub_peeraddr[INET6_ADDRSTRLEN]; 198 static const char *sub_peername = "";198 static const char *sub_peername = NULL; 199 199 static char sub_sockaddr[INET6_ADDRSTRLEN]; 200 200 … … 209 209 strlcpy(sub_peeraddr, addr, sizeof(sub_peeraddr)); 210 210 211 if (sub_peername != NULL && 212 sub_peername != sub_peeraddr) { 213 free(discard_const_p(char,sub_peername)); 214 sub_peername = NULL; 215 } 211 216 sub_peername = SMB_STRDUP(peername); 212 217 if (sub_peername == NULL) { … … 647 652 case 'M' : 648 653 a_string = realloc_string_sub(a_string, "%M", 649 sub_peername );654 sub_peername ? sub_peername : ""); 650 655 break; 651 656 case 'R' : -
vendor/current/source3/lib/sysquotas.c
r740 r746 177 177 #ifdef HAVE_XFS_QUOTAS 178 178 {"xfs", sys_get_xfs_quota, sys_set_xfs_quota}, 179 {"gfs", sys_get_xfs_quota, sys_set_xfs_quota}, 180 {"gfs2", sys_get_xfs_quota, sys_set_xfs_quota}, 179 181 #endif /* HAVE_XFS_QUOTAS */ 180 182 #ifdef HAVE_NFS_QUOTAS 181 183 {"nfs", sys_get_nfs_quota, sys_set_nfs_quota}, 184 {"nfs4", sys_get_nfs_quota, sys_set_nfs_quota}, 182 185 #endif /* HAVE_NFS_QUOTAS */ 183 186 {NULL, NULL, NULL} -
vendor/current/source3/lib/system.c
r740 r746 770 770 #elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEKO64) 771 771 return fseeko64(fp, offset, whence); 772 #elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FSEEKO) 773 return fseeko(fp, offset, whence); 772 774 #else 773 775 return fseek(fp, offset, whence); -
vendor/current/source3/lib/util.c
r740 r746 29 29 #include "../lib/util/util_pw.h" 30 30 #include "messages.h" 31 #include "libcli/security/security.h" 31 32 32 33 extern char *global_clobber_region_function; … … 2723 2724 return ptr; 2724 2725 } 2726 2727 /******************************************************************* 2728 Return True if the filename is one of the special executable types. 2729 ********************************************************************/ 2730 2731 bool is_executable(const char *fname) 2732 { 2733 if ((fname = strrchr_m(fname,'.'))) { 2734 if (strequal(fname,".com") || 2735 strequal(fname,".dll") || 2736 strequal(fname,".exe") || 2737 strequal(fname,".sym")) { 2738 return True; 2739 } 2740 } 2741 return False; 2742 } 2743 2744 /**************************************************************************** 2745 Open a file with a share mode - old openX method - map into NTCreate. 2746 ****************************************************************************/ 2747 2748 bool map_open_params_to_ntcreate(const char *smb_base_fname, 2749 int deny_mode, int open_func, 2750 uint32 *paccess_mask, 2751 uint32 *pshare_mode, 2752 uint32 *pcreate_disposition, 2753 uint32 *pcreate_options, 2754 uint32_t *pprivate_flags) 2755 { 2756 uint32 access_mask; 2757 uint32 share_mode; 2758 uint32 create_disposition; 2759 uint32 create_options = FILE_NON_DIRECTORY_FILE; 2760 uint32_t private_flags = 0; 2761 2762 DEBUG(10,("map_open_params_to_ntcreate: fname = %s, deny_mode = 0x%x, " 2763 "open_func = 0x%x\n", 2764 smb_base_fname, (unsigned int)deny_mode, 2765 (unsigned int)open_func )); 2766 2767 /* Create the NT compatible access_mask. */ 2768 switch (GET_OPENX_MODE(deny_mode)) { 2769 case DOS_OPEN_EXEC: /* Implies read-only - used to be FILE_READ_DATA */ 2770 case DOS_OPEN_RDONLY: 2771 access_mask = FILE_GENERIC_READ; 2772 break; 2773 case DOS_OPEN_WRONLY: 2774 access_mask = FILE_GENERIC_WRITE; 2775 break; 2776 case DOS_OPEN_RDWR: 2777 case DOS_OPEN_FCB: 2778 access_mask = FILE_GENERIC_READ|FILE_GENERIC_WRITE; 2779 break; 2780 default: 2781 DEBUG(10,("map_open_params_to_ntcreate: bad open mode = 0x%x\n", 2782 (unsigned int)GET_OPENX_MODE(deny_mode))); 2783 return False; 2784 } 2785 2786 /* Create the NT compatible create_disposition. */ 2787 switch (open_func) { 2788 case OPENX_FILE_EXISTS_FAIL|OPENX_FILE_CREATE_IF_NOT_EXIST: 2789 create_disposition = FILE_CREATE; 2790 break; 2791 2792 case OPENX_FILE_EXISTS_OPEN: 2793 create_disposition = FILE_OPEN; 2794 break; 2795 2796 case OPENX_FILE_EXISTS_OPEN|OPENX_FILE_CREATE_IF_NOT_EXIST: 2797 create_disposition = FILE_OPEN_IF; 2798 break; 2799 2800 case OPENX_FILE_EXISTS_TRUNCATE: 2801 create_disposition = FILE_OVERWRITE; 2802 break; 2803 2804 case OPENX_FILE_EXISTS_TRUNCATE|OPENX_FILE_CREATE_IF_NOT_EXIST: 2805 create_disposition = FILE_OVERWRITE_IF; 2806 break; 2807 2808 default: 2809 /* From samba4 - to be confirmed. */ 2810 if (GET_OPENX_MODE(deny_mode) == DOS_OPEN_EXEC) { 2811 create_disposition = FILE_CREATE; 2812 break; 2813 } 2814 DEBUG(10,("map_open_params_to_ntcreate: bad " 2815 "open_func 0x%x\n", (unsigned int)open_func)); 2816 return False; 2817 } 2818 2819 /* Create the NT compatible share modes. */ 2820 switch (GET_DENY_MODE(deny_mode)) { 2821 case DENY_ALL: 2822 share_mode = FILE_SHARE_NONE; 2823 break; 2824 2825 case DENY_WRITE: 2826 share_mode = FILE_SHARE_READ; 2827 break; 2828 2829 case DENY_READ: 2830 share_mode = FILE_SHARE_WRITE; 2831 break; 2832 2833 case DENY_NONE: 2834 share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE; 2835 break; 2836 2837 case DENY_DOS: 2838 private_flags |= NTCREATEX_OPTIONS_PRIVATE_DENY_DOS; 2839 if (is_executable(smb_base_fname)) { 2840 share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE; 2841 } else { 2842 if (GET_OPENX_MODE(deny_mode) == DOS_OPEN_RDONLY) { 2843 share_mode = FILE_SHARE_READ; 2844 } else { 2845 share_mode = FILE_SHARE_NONE; 2846 } 2847 } 2848 break; 2849 2850 case DENY_FCB: 2851 private_flags |= NTCREATEX_OPTIONS_PRIVATE_DENY_FCB; 2852 share_mode = FILE_SHARE_NONE; 2853 break; 2854 2855 default: 2856 DEBUG(10,("map_open_params_to_ntcreate: bad deny_mode 0x%x\n", 2857 (unsigned int)GET_DENY_MODE(deny_mode) )); 2858 return False; 2859 } 2860 2861 DEBUG(10,("map_open_params_to_ntcreate: file %s, access_mask = 0x%x, " 2862 "share_mode = 0x%x, create_disposition = 0x%x, " 2863 "create_options = 0x%x private_flags = 0x%x\n", 2864 smb_base_fname, 2865 (unsigned int)access_mask, 2866 (unsigned int)share_mode, 2867 (unsigned int)create_disposition, 2868 (unsigned int)create_options, 2869 (unsigned int)private_flags)); 2870 2871 if (paccess_mask) { 2872 *paccess_mask = access_mask; 2873 } 2874 if (pshare_mode) { 2875 *pshare_mode = share_mode; 2876 } 2877 if (pcreate_disposition) { 2878 *pcreate_disposition = create_disposition; 2879 } 2880 if (pcreate_options) { 2881 *pcreate_options = create_options; 2882 } 2883 if (pprivate_flags) { 2884 *pprivate_flags = private_flags; 2885 } 2886 2887 return True; 2888 2889 } -
vendor/current/source3/lib/util_sec.c
r414 r746 335 335 336 336 #if USE_SETRESUID 337 setresuid( geteuid(), -1, -1);337 setresuid(uid, uid, -1); 338 338 #endif 339 339 -
vendor/current/source3/lib/util_sid.c
r740 r746 131 131 struct dom_sid **user_sids, 132 132 uint32_t *num_user_sids, 133 bool include_user_group_rid, 134 bool skip_ressource_groups) 133 bool include_user_group_rid) 135 134 { 136 135 NTSTATUS status; … … 192 191 193 192 for (i = 0; i < info3->sidcount; i++) { 194 195 if (skip_ressource_groups &&196 (info3->sids[i].attributes & SE_GROUP_RESOURCE)) {197 continue;198 }199 200 193 status = add_sid_to_array(mem_ctx, info3->sids[i].sid, 201 194 &sid_array, &num_sids); -
vendor/current/source3/lib/util_sock.c
r740 r746 137 137 #ifdef TCP_QUICKACK 138 138 {"TCP_QUICKACK", IPPROTO_TCP, TCP_QUICKACK, 0, OPT_BOOL}, 139 #endif 140 #ifdef TCP_NODELAYACK 141 {"TCP_NODELAYACK", IPPROTO_TCP, TCP_NODELAYACK, 0, OPT_BOOL}, 139 142 #endif 140 143 #ifdef TCP_KEEPALIVE_THRESHOLD
Note:
See TracChangeset
for help on using the changeset viewer.