From 050126e6844519c0587776932063e54b5f2c527c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 14 Jul 2002 22:21:40 +0000 Subject: [PATCH 001/262] addedd new (t)alloc_sub_* functions they will get a const string and return a (t)alloced epanded one. also modified passdb/* stuff to use this one. (This used to be commit d378ac1e2efb0efc9a0f983d69cf678ca6255fd5) --- source3/lib/substitute.c | 336 ++++++++++++++++++++++++++++++++++---- source3/lib/util_str.c | 6 +- source3/passdb/passdb.c | 8 +- source3/passdb/pdb_ldap.c | 8 +- source3/passdb/pdb_tdb.c | 10 +- 5 files changed, 321 insertions(+), 47 deletions(-) diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index dbd382a9424..1e8d8c2555d 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -83,6 +83,66 @@ static size_t expand_env_var(char *p, int len) return 0; /* Allow the environment contents to be parsed. */ } +/******************************************************************* + Given a pointer to a %$(NAME) in p and the whole string in str + expand it as an environment variable. + Return a new allocated and expanded string. + Based on code by Branko Cibej + When this is called p points at the '%' character. + May substitute multiple occurrencies of the same env var. +********************************************************************/ + + +static char * realloc_expand_env_var(char *str, char *p) +{ + char *envname; + char *envval; + char *q, *r; + int copylen; + + if (p[0] != '%' || p[1] != '$' || p[2] != '(') + return str; + + /* + * Look for the terminating ')'. + */ + + if ((q = strchr_m(p,')')) == NULL) { + DEBUG(0,("expand_env_var: Unterminated environment variable [%s]\n", p)); + return str; + } + + /* + * Extract the name from within the %$(NAME) string. + */ + + r = p + 3; + copylen = q - r; + envname = (char *)malloc(copylen + 1 + 4); // reserve space for use later add %$() chars + if (envname == NULL) return NULL; + strncpy(envname,r,copylen); + envname[copylen] = '\0'; + + if ((envval = getenv(envname)) == NULL) { + DEBUG(0,("expand_env_var: Environment variable [%s] not set\n", envname)); + SAFE_FREE(envname); + return str; + } + + /* + * Copy the full %$(NAME) into envname so it + * can be replaced. + */ + + copylen = q + 1 - p; + strncpy(envname,p,copylen); + envname[copylen] = '\0'; + r = realloc_string_sub(str, envname, envval); + SAFE_FREE(envname); + if (r == NULL) return NULL; + return r; +} + /******************************************************************* Patch from jkf@soton.ac.uk Added this to implement %p (NIS auto-map version of %H) @@ -244,10 +304,6 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len) } } -/**************************************************************************** - Do some standard substitutions in a string. -****************************************************************************/ - static void standard_sub_advanced(int snum, const char *user, const char *connectpath, gid_t gid, const char *smb_name, char *str, size_t len) @@ -305,55 +361,273 @@ static void standard_sub_advanced(int snum, const char *user, standard_sub_basic(smb_name, str, len); } -const char *standard_sub_specified(TALLOC_CTX *mem_ctx, const char *input_string, - const char *username, - const char *domain, - uid_t uid, - gid_t gid) +/**************************************************************************** + Do some standard substitutions in a string. + This function will return an allocated string that have to be freed. +****************************************************************************/ + +char *talloc_sub_basic(TALLOC_CTX *mem_ctx, const char *smb_name, const char *str) { - pstring input_pstring; - char *p, *s; + char *a, *t; + a = alloc_sub_basic(smb_name, str); + if (!a) return NULL; + t = talloc_strdup(mem_ctx, a); + SAFE_FREE(a); + return t; +} - pstrcpy(input_pstring, input_string); +char *alloc_sub_basic(const char *smb_name, const char *str) +{ + char *b, *p, *s, *t, *r, *a_string; + fstring pidstr; + struct passwd *pass; + + a_string = strdup(str); + if (a_string == NULL) { + DEBUG(0, ("alloc_sub_specified: Out of memory!\n")); + return NULL; + } - for (s=input_pstring; (p=strchr_m(s, '%')); s=p) { + for (b = s = a_string; (p = strchr_m(s, '%')); s = a_string + (p - b)) { - int l = sizeof(pstring) - (int)(p-input_pstring); + r = NULL; + b = t = a_string; switch (*(p+1)) { case 'U' : - string_sub(p,"%U",username,l); - break; - case 'u' : - string_sub(p,"%u",username,l); + r = strdup_lower(smb_name); + if (r == NULL) goto error; + t = realloc_string_sub(t, "%U", r); break; case 'G' : + r = strdup(smb_name); + if (r == NULL) goto error; + if ((pass = Get_Pwnam(r))!=NULL) { + t = realloc_string_sub(t, "%G", gidtoname(pass->pw_gid)); + } + break; + case 'D' : + r = strdup_upper(current_user_info.domain); + if (r == NULL) goto error; + t = realloc_string_sub(t, "%D", r); + break; + case 'I' : + t = realloc_string_sub(t, "%I", client_addr()); + break; + case 'L' : + if (*local_machine) + t = realloc_string_sub(t, "%L", local_machine); + else + t = realloc_string_sub(t, "%L", global_myname); + break; + case 'M' : + t = realloc_string_sub(t, "%M", client_name()); + break; + case 'R' : + t = realloc_string_sub(t, "%R", remote_proto); + break; + case 'T' : + t = realloc_string_sub(t, "%T", timestring(False)); + break; + case 'a' : + t = realloc_string_sub(t, "%a", remote_arch); + break; + case 'd' : + slprintf(pidstr,sizeof(pidstr)-1, "%d",(int)sys_getpid()); + t = realloc_string_sub(t, "%d", pidstr); + break; + case 'h' : + t = realloc_string_sub(t, "%h", myhostname()); + break; + case 'm' : + t = realloc_string_sub(t, "%m", remote_machine); + break; + case 'v' : + t = realloc_string_sub(t, "%v", VERSION); + break; + case '$' : + t = realloc_expand_env_var(t, p); /* Expand environment variables */ + break; + + default: + break; + } + + p++; + SAFE_FREE(r); + if (t == NULL) goto error; + a_string = t; + } + + return a_string; +error: + SAFE_FREE(a_string); + return NULL; +} + +/**************************************************************************** + Do some specific substitutions in a string. + This function will return an allocated string that have to be freed. +****************************************************************************/ + +char *talloc_sub_specified(TALLOC_CTX *mem_ctx, + const char *input_string, + const char *username, + const char *domain, + uid_t uid, + gid_t gid) +{ + char *a, *t; + a = alloc_sub_specified(input_string, username, domain, uid, gid); + if (!a) return NULL; + t = talloc_strdup(mem_ctx, a); + SAFE_FREE(a); + return t; +} + +char *alloc_sub_specified(const char *input_string, + const char *username, + const char *domain, + uid_t uid, + gid_t gid) +{ + char *a_string, *ret_string; + char *b, *p, *s, *t; + + a_string = strdup(input_string); + if (a_string == NULL) { + DEBUG(0, ("alloc_sub_specified: Out of memory!\n")); + return NULL; + } + + for (b = s = a_string; (p = strchr_m(s, '%')); s = a_string + (p - b)) { + + b = t = a_string; + + switch (*(p+1)) { + case 'U' : + t = realloc_string_sub(t, "%U", username); + break; + case 'u' : + t = realloc_string_sub(t, "%u", username); + break; + case 'G' : + if (gid != -1) { + t = realloc_string_sub(t, "%G", gidtoname(gid)); + } else { + t = realloc_string_sub(t, "%G", "NO_GROUP"); + } + break; case 'g' : if (gid != -1) { - string_sub(p,"%G",gidtoname(gid),l); - string_sub(p,"%g",gidtoname(gid),l); + t = realloc_string_sub(t, "%g", gidtoname(gid)); } else { - string_sub(p,"%G","NO_GROUP",l); - string_sub(p,"%g","NO_GROUP",l); + t = realloc_string_sub(t, "%g", "NO_GROUP"); } break; case 'D' : - string_sub(p,"%D", domain,l); + t = realloc_string_sub(t, "%D", domain); break; case 'N' : - string_sub(p,"%N", automount_server(username),l); + t = realloc_string_sub(t, "%N", automount_server(username)); break; - case '\0': - p++; - break; /* don't run off the end of the string */ - - default: p+=2; + default: break; } + + p++; + if (t == NULL) { + SAFE_FREE(a_string); + return NULL; + } + a_string = t; } - standard_sub_basic(username, input_pstring, sizeof(pstring)); - return talloc_strdup(mem_ctx, input_pstring); + ret_string = alloc_sub_basic(username, a_string); + SAFE_FREE(a_string); + return ret_string; +} + +char *talloc_sub_advanced(TALLOC_CTX *mem_ctx, + int snum, + const char *user, + const char *connectpath, + gid_t gid, + const char *smb_name, + char *str) +{ + char *a, *t; + a = alloc_sub_advanced(snum, user, connectpath, gid, smb_name, str); + if (!a) return NULL; + t = talloc_strdup(mem_ctx, a); + SAFE_FREE(a); + return t; +} + +char *alloc_sub_advanced(int snum, const char *user, + const char *connectpath, gid_t gid, + const char *smb_name, char *str) +{ + char *a_string, *ret_string; + char *b, *p, *s, *t, *h; + + a_string = strdup(str); + if (a_string == NULL) { + DEBUG(0, ("alloc_sub_specified: Out of memory!\n")); + return NULL; + } + + for (b = s = a_string; (p = strchr_m(s, '%')); s = a_string + (p - b)) { + + b = t = a_string; + + switch (*(p+1)) { + case 'N' : + t = realloc_string_sub(t, "%N", automount_server(user)); + break; + case 'H': + if ((h = get_user_home_dir(user))) + t = realloc_string_sub(t, "%H", h); + break; + case 'P': + t = realloc_string_sub(t, "%P", connectpath); + break; + case 'S': + t = realloc_string_sub(t, "%S", lp_servicename(snum)); + break; + case 'g': + t = realloc_string_sub(t, "%g", gidtoname(gid)); + break; + case 'u': + t = realloc_string_sub(t, "%u", user); + break; + + /* Patch from jkf@soton.ac.uk Left the %N (NIS + * server name) in standard_sub_basic as it is + * a feature for logon servers, hence uses the + * username. The %p (NIS server path) code is + * here as it is used instead of the default + * "path =" string in [homes] and so needs the + * service name, not the username. */ + case 'p': + t = realloc_string_sub(t, "%p", automount_path(lp_servicename(snum))); + break; + + default: + break; + } + + p++; + if (t == NULL) { + SAFE_FREE(a_string); + return NULL; + } + a_string = t; + } + + ret_string = alloc_sub_basic(smb_name, a_string); + SAFE_FREE(a_string); + return ret_string; } /**************************************************************************** diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 4c8d5d8bf7c..88a72f15360 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -762,7 +762,7 @@ char *realloc_string_sub(char *string, const char *pattern, const char *insert) return NULL; } string = t; - s = t + (p - s); + p = t + (p - s); } if (li != lp) { memmove(p+li,p+lp,strlen(p+lp)+1); @@ -992,7 +992,7 @@ void strlower_m(char *s) /******************************************************************* duplicate convert a string to lower case ********************************************************************/ -char *strdup_lower(char *s) +char *strdup_lower(const char *s) { char *t = strdup(s); if (t == NULL) { @@ -1026,7 +1026,7 @@ void strupper_m(char *s) /******************************************************************* convert a string to upper case ********************************************************************/ -char *strdup_upper(char *s) +char *strdup_upper(const char *s) { char *t = strdup(s); if (t == NULL) { diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 2bf3eccfb7a..4e3d558e987 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -207,28 +207,28 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) if (pwd->pw_name[strlen(pwd->pw_name)-1] != '$') { pdb_set_profile_path(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_path(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); pdb_set_homedir(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_home(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); pdb_set_dir_drive(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_drive(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), False); pdb_set_logon_script(sam_account, - standard_sub_specified((sam_account)->mem_ctx, + talloc_sub_specified((sam_account)->mem_ctx, lp_logon_script(), pwd->pw_name, global_myname, pwd->pw_uid, pwd->pw_gid), diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index fd5ad7ee125..24eb7b9dc1f 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -695,7 +695,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "homeDrive", dir_drive)) { - pdb_set_dir_drive(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_dir_drive(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_drive(), username, domain, uid, gid), @@ -705,7 +705,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "smbHome", homedir)) { - pdb_set_homedir(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_homedir(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_home(), username, domain, uid, gid), @@ -715,7 +715,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "scriptPath", logon_script)) { - pdb_set_logon_script(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_logon_script(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_script(), username, domain, uid, gid), @@ -725,7 +725,7 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, } if (!get_single_attribute(ldap_struct, entry, "profilePath", profile_path)) { - pdb_set_profile_path(sampass, standard_sub_specified(sampass->mem_ctx, + pdb_set_profile_path(sampass, talloc_sub_specified(sampass->mem_ctx, lp_logon_path(), username, domain, uid, gid), diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index b309f675b35..62793189696 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -188,7 +188,7 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, } else { pdb_set_homedir(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_home(), username, domain, uid, gid), @@ -199,7 +199,7 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, pdb_set_dir_drive(sampass, dir_drive, True); else { pdb_set_dir_drive(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_drive(), username, domain, uid, gid), @@ -210,18 +210,18 @@ static BOOL init_sam_from_buffer (struct tdbsam_privates *tdb_state, pdb_set_logon_script(sampass, logon_script, True); else { pdb_set_logon_script(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_script(), username, domain, uid, gid), False); } - + if (profile_path) { pdb_set_profile_path(sampass, profile_path, True); } else { pdb_set_profile_path(sampass, - standard_sub_specified(sampass->mem_ctx, + talloc_sub_specified(sampass->mem_ctx, lp_logon_path(), username, domain, uid, gid), From 4dd9357dd55e0b65f99b42bfc6082ae3e2a19b0d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 14 Jul 2002 23:45:55 +0000 Subject: [PATCH 002/262] after thinking about the env variable hack for avoiding group membership enumeration I realised it could be a security hole for setuid progs. This adds a proper nss function instead. (This used to be commit c7c49d87af5e9a0bef058e6d79188d8b11fefc02) --- source3/nsswitch/winbind_nss.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/source3/nsswitch/winbind_nss.c b/source3/nsswitch/winbind_nss.c index 681bcd2bf7b..5dc3d32279a 100644 --- a/source3/nsswitch/winbind_nss.c +++ b/source3/nsswitch/winbind_nss.c @@ -1054,14 +1054,15 @@ _nss_winbind_endgrent(void) /* Get next entry from ntdom group database */ -NSS_STATUS -_nss_winbind_getgrent_r(struct group *result, - char *buffer, size_t buflen, int *errnop) +static NSS_STATUS +winbind_getgrent(enum winbindd_cmd cmd, + struct group *result, + char *buffer, size_t buflen, int *errnop) { NSS_STATUS ret; static struct winbindd_request request; static int called_again; - enum winbindd_cmd cmd; + #ifdef DEBUG_NSS fprintf(stderr, "[%5d]: getgrent\n", getpid()); @@ -1085,16 +1086,6 @@ _nss_winbind_getgrent_r(struct group *result, request.data.num_entries = MAX_GETGRENT_USERS; - /* this is a hack to work around the fact that posix doesn't - define a 'list groups' call and listing all group members can - be *very* expensive. We use an environment variable to give - us a saner call (tridge) */ - if (getenv("WINBIND_GETGRLST")) { - cmd = WINBINDD_GETGRLST; - } else { - cmd = WINBINDD_GETGRENT; - } - ret = winbindd_request(cmd, &request, &getgrent_response); @@ -1153,6 +1144,21 @@ _nss_winbind_getgrent_r(struct group *result, return ret; } + +NSS_STATUS +_nss_winbind_getgrent_r(struct group *result, + char *buffer, size_t buflen, int *errnop) +{ + return winbind_getgrent(WINBINDD_GETGRENT, result, buffer, buflen, errnop); +} + +NSS_STATUS +_nss_winbind_getgrlst_r(struct group *result, + char *buffer, size_t buflen, int *errnop) +{ + return winbind_getgrent(WINBINDD_GETGRLST, result, buffer, buflen, errnop); +} + /* Return group struct from group name */ NSS_STATUS From ae10baa5fc98863c242b1036f588f59cf6ae3e0d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 03:51:53 +0000 Subject: [PATCH 003/262] don't report the faiilure of non-blocking locks. They are supposed to fail sometimes, thats why they are non-blocking :) (This used to be commit 775b918b8c63b1fcd9a8db1743505ab718978c19) --- source3/tdb/tdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index 1118ad9c67a..ed75a55e3e9 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -189,7 +189,7 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, } while (ret == -1 && errno == EINTR); if (ret == -1) { - if (!probe) { + if (!probe && lck_type != F_SETLK) { TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n", tdb->fd, offset, rw_type, lck_type)); } From 369040ac5d7220a301b09c16b0a6f4a3ce14c8b6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 03:59:14 +0000 Subject: [PATCH 004/262] fixed a problem with getgroups() where it could include our current effective gid which could mean that the user gets group 0 in their group list for acl interpretation this is a replacement fix for the one richard did in 2.2 (which didn't cope wiith variable behaviour depending on which nss module was in use) (This used to be commit cfc5ca3416cea5ea5d2ac34f5521cb6367e42cd2) --- source3/lib/util_sec.c | 36 ++++++++++++++++++++++++++++++++ source3/rpc_server/srv_pipe.c | 2 +- source3/smbd/password.c | 2 +- source3/smbd/sec_ctx.c | 39 ++++++++++++++++++++++++----------- 4 files changed, 65 insertions(+), 14 deletions(-) diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c index d59b1b04716..132748ce138 100644 --- a/source3/lib/util_sec.c +++ b/source3/lib/util_sec.c @@ -227,6 +227,7 @@ void set_effective_gid(gid_t gid) } static uid_t saved_euid, saved_ruid; +static gid_t saved_egid, saved_rgid; /**************************************************************************** save the real and effective uid for later restoration. Used by the quotas @@ -264,6 +265,41 @@ void restore_re_uid(void) assert_uid(saved_ruid, saved_euid); } + +/**************************************************************************** + save the real and effective gid for later restoration. Used by the + getgroups code +****************************************************************************/ +void save_re_gid(void) +{ + saved_rgid = getgid(); + saved_egid = getegid(); +} + +/**************************************************************************** + and restore them! +****************************************************************************/ +void restore_re_gid(void) +{ +#if USE_SETRESUID + setresgid(saved_rgid, saved_egid, -1); +#elif USE_SETREUID + setregid(saved_rgid, -1); + setregid(-1,saved_egid); +#elif USE_SETUIDX + setgidx(ID_REAL, saved_rgid); + setgidx(ID_EFFECTIVE, saved_egid); +#else + set_effective_gid(saved_egid); + if (getgid() != saved_rgid) + setgid(saved_rgid); + set_effective_gid(saved_egid); +#endif + + assert_gid(saved_rgid, saved_egid); +} + + /**************************************************************************** set the real AND effective uid to the current effective uid in a way that allows root to be regained. diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 1d2c0c27136..b7be415abcd 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -435,7 +435,7 @@ failed authentication on named pipe %s.\n", domain, user_name, wks, p->name )); /* Set up pipe user group membership. */ initialise_groups(p->pipe_user_name, p->pipe_user.uid, p->pipe_user.gid); - get_current_groups( &p->pipe_user.ngroups, &p->pipe_user.groups); + get_current_groups(p->pipe_user.gid, &p->pipe_user.ngroups, &p->pipe_user.groups); if (server_info->ptok) add_supplementary_nt_login_groups(&p->pipe_user.ngroups, &p->pipe_user.groups, &server_info->ptok); diff --git a/source3/smbd/password.c b/source3/smbd/password.c index f9bcad4154c..82c0cef77d7 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -289,7 +289,7 @@ int register_vuid(auth_serversupplied_info *server_info, char *smb_name) /* Find all the groups this uid is in and store them. Used by change_to_user() */ initialise_groups(vuser->user.unix_name, vuser->uid, vuser->gid); - get_current_groups( &vuser->n_groups, &vuser->groups); + get_current_groups(vuser->gid, &vuser->n_groups, &vuser->groups); if (server_info->ptok) add_supplementary_nt_login_groups(&vuser->n_groups, &vuser->groups, &server_info->ptok); diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index 87bf8b17443..bdcdce6e145 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -132,29 +132,39 @@ static void gain_root(void) Get the list of current groups. ****************************************************************************/ -int get_current_groups(int *p_ngroups, gid_t **p_groups) +int get_current_groups(gid_t gid, int *p_ngroups, gid_t **p_groups) { int i; gid_t grp; - int ngroups = sys_getgroups(0,&grp); - gid_t *groups; + int ngroups; + gid_t *groups = NULL; (*p_ngroups) = 0; (*p_groups) = NULL; - if (ngroups <= 0) - return -1; + /* this looks a little strange, but is needed to cope with + systems that put the current egid in the group list + returned from getgroups() (tridge) */ + save_re_gid(); + set_effective_gid(gid); + setgid(gid); - if((groups = (gid_t *)malloc(sizeof(gid_t)*ngroups)) == NULL) { + ngroups = sys_getgroups(0,&grp); + if (ngroups <= 0) { + goto fail; + } + + if((groups = (gid_t *)malloc(sizeof(gid_t)*(ngroups+1))) == NULL) { DEBUG(0,("setup_groups malloc fail !\n")); - return -1; + goto fail; } if ((ngroups = sys_getgroups(ngroups,groups)) == -1) { - SAFE_FREE(groups); - return -1; + goto fail; } + restore_re_gid(); + (*p_ngroups) = ngroups; (*p_groups) = groups; @@ -164,7 +174,12 @@ int get_current_groups(int *p_ngroups, gid_t **p_groups) } DEBUG( 3, ( "\n" ) ); - return ngroups; + return ngroups; + +fail: + SAFE_FREE(groups); + restore_re_gid(); + return -1; } /**************************************************************************** @@ -204,7 +219,7 @@ BOOL initialise_groups(char *user, uid_t uid, gid_t gid) SAFE_FREE(prev_ctx_p->groups); prev_ctx_p->ngroups = 0; - get_current_groups(&prev_ctx_p->ngroups, &prev_ctx_p->groups); + get_current_groups(gid, &prev_ctx_p->ngroups, &prev_ctx_p->groups); done: unbecome_root(); @@ -404,7 +419,7 @@ void init_sec_ctx(void) ctx_p->uid = geteuid(); ctx_p->gid = getegid(); - get_current_groups(&ctx_p->ngroups, &ctx_p->groups); + get_current_groups(ctx_p->gid, &ctx_p->ngroups, &ctx_p->groups); ctx_p->token = NULL; /* Maps to guest user. */ From c238b5c6a19945c34cfdb524a828957772c74cda Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 09:43:34 +0000 Subject: [PATCH 005/262] don't use C++ comments in C - it doesn't work on many compilers (This used to be commit cf853314f9eda479c6f18bfc725fa0b5d88d0a38) --- source3/lib/substitute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index 1e8d8c2555d..6d96a1820f1 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -118,7 +118,7 @@ static char * realloc_expand_env_var(char *str, char *p) r = p + 3; copylen = q - r; - envname = (char *)malloc(copylen + 1 + 4); // reserve space for use later add %$() chars + envname = (char *)malloc(copylen + 1 + 4); /* reserve space for use later add %$() chars */ if (envname == NULL) return NULL; strncpy(envname,r,copylen); envname[copylen] = '\0'; From 7a2dc0872152fa3df572a65d11013ea208a4c8e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 09:46:54 +0000 Subject: [PATCH 006/262] fixed a call to get_current_groups() (This used to be commit 61c524e8102d4f5cdcf7c949b55b5dc67a320c74) --- source3/smbd/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index df930575d30..9ac610ab5a9 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -531,7 +531,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, /* Find all the groups this uid is in and store them. Used by change_to_user() */ initialise_groups(conn->user, conn->uid, conn->gid); - get_current_groups(&conn->ngroups,&conn->groups); + get_current_groups(conn->gid, &conn->ngroups,&conn->groups); conn->nt_user_token = create_nt_token(conn->uid, conn->gid, conn->ngroups, conn->groups, From 0184f3b6d8accd84cdb74da7dfd89df01e89c8b1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:37:42 +0000 Subject: [PATCH 007/262] checking for NULL really is counter-productive, and this one was also generating a warning (This used to be commit cd82ba41b8df024f034fcfa24e967ed8c3c8d035) --- source3/libsmb/cliconnect.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index f0b02b97b02..472db69fd0d 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1119,11 +1119,6 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, struct in_addr ip; extern pstring global_myname; - if (!output_cli) { - DEBUG(0, ("output_cli is NULL!?!")); - SMB_ASSERT("output_cli for cli_full_connection was NULL.\n"); - } - if (!my_name) my_name = global_myname; From fc26773500cc549563bcd00b2657713adf09a840 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:38:34 +0000 Subject: [PATCH 008/262] enum_group_mapping takes an enum not an int (This used to be commit 67a3ca2f235e011472dbe505ce7c34b26f92c44c) --- source3/smbd/lanman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 217bb6a6133..996a17e9322 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -1778,7 +1778,7 @@ static BOOL api_RNetGroupEnum(connection_struct *conn,uint16 vuid, char *param,c return False; /* get list of domain groups SID_DOMAIN_GRP=2 */ - if(!enum_group_mapping(2 , &group_list, &num_entries, False, False)) { + if(!enum_group_mapping(SID_NAME_DOM_GRP , &group_list, &num_entries, False, False)) { DEBUG(3,("api_RNetGroupEnum:failed to get group list")); return False; } From 159118de5ce0999b96ebe7cd7dc823087b0cccf5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:54:35 +0000 Subject: [PATCH 009/262] fixed a number of real bugs found by warnings on the 64 bit irix compiler (This used to be commit 04de6bbc8055e5547af41b10e284b722f40e726d) --- source3/libsmb/cli_wkssvc.c | 3 +-- source3/nsswitch/winbind_nss.c | 8 ++++---- source3/rpc_parse/parse_sec.c | 4 ++-- source3/rpc_server/srv_srvsvc_nt.c | 2 -- source3/wrepld/parser.c | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/source3/libsmb/cli_wkssvc.c b/source3/libsmb/cli_wkssvc.c index 756ff61e5b0..97b948bf628 100644 --- a/source3/libsmb/cli_wkssvc.c +++ b/source3/libsmb/cli_wkssvc.c @@ -40,7 +40,6 @@ NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, prs_struct rbuf; WKS_Q_QUERY_INFO q_o; WKS_R_QUERY_INFO r_o; - NTSTATUS nt_status; if (cli == NULL || wks100 == NULL) return NT_STATUS_UNSUCCESSFUL; @@ -89,6 +88,6 @@ NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* do clean up */ prs_mem_free(&rbuf); - return nt_status; + return NT_STATUS_OK; } diff --git a/source3/nsswitch/winbind_nss.c b/source3/nsswitch/winbind_nss.c index 5dc3d32279a..594b5fbadb2 100644 --- a/source3/nsswitch/winbind_nss.c +++ b/source3/nsswitch/winbind_nss.c @@ -593,7 +593,7 @@ BOOL next_token(char **ptr,char *buff,char *sep, size_t bufsize) static NSS_STATUS fill_pwent(struct passwd *result, struct winbindd_pw *pw, - char **buffer, int *buflen) + char **buffer, size_t *buflen) { /* User name */ @@ -678,8 +678,8 @@ static NSS_STATUS fill_pwent(struct passwd *result, the static data passed to us by libc to put strings and stuff in. Return NSS_STATUS_TRYAGAIN if we run out of memory. */ -static int fill_grent(struct group *result, struct winbindd_gr *gr, - char *gr_mem, char **buffer, int *buflen) +static NSS_STATUS fill_grent(struct group *result, struct winbindd_gr *gr, + char *gr_mem, char **buffer, size_t *buflen) { fstring name; int i; @@ -722,7 +722,7 @@ static int fill_grent(struct group *result, struct winbindd_gr *gr, /* this next value is a pointer to a pointer so let's align it */ /* Calculate number of extra bytes needed to align on pointer size boundry */ - if ((i = (int)*buffer % sizeof(char*)) != 0) + if ((i = (unsigned long)(*buffer) % sizeof(char*)) != 0) i = sizeof(char*) - i; if ((tst = get_static(buffer, buflen, ((gr->num_gr_mem + 1) * diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c index 56eaf4c5b5c..cec37348b80 100644 --- a/source3/rpc_parse/parse_sec.c +++ b/source3/rpc_parse/parse_sec.c @@ -157,7 +157,7 @@ BOOL sec_io_ace(char *desc, SEC_ACE *psa, prs_struct *ps, int depth) adds new SID with its permissions to ACE list ********************************************************************/ -NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, size_t *num, DOM_SID *sid, uint32 mask) +NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, unsigned *num, DOM_SID *sid, uint32 mask) { int i = 0; @@ -165,7 +165,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **new, SEC_ACE *old, size_t *n *num += 1; - if((new[0] = (SEC_ACE *) talloc_zero(ctx, *num * sizeof(SEC_ACE))) == 0) + if((new[0] = (SEC_ACE *) talloc_zero(ctx, (*num) * sizeof(SEC_ACE))) == 0) return NT_STATUS_NO_MEMORY; for (i = 0; i < *num - 1; i ++) diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index b5f6bd2f077..202e869d35c 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -964,8 +964,6 @@ static WERROR init_srv_file_info_ctr(pipes_struct *p, SRV_FILE_INFO_CTR *ctr, ctr->switch_value = switch_value; ctr->num_entries = *total_entries - *resume_hnd; - if (ctr->num_entries < 0) - ctr->num_entries = 0; ctr->num_entries2 = ctr->num_entries; switch (switch_value) { diff --git a/source3/wrepld/parser.c b/source3/wrepld/parser.c index f5b9be67277..b619cb0cef5 100644 --- a/source3/wrepld/parser.c +++ b/source3/wrepld/parser.c @@ -96,7 +96,7 @@ static void decode_wins_name(struct BUFFER *outbuf, WINS_NAME *wins_name) wins_name->name_len=RIVAL(outbuf->buffer, outbuf->offset); outbuf->offset+=4; memcpy(wins_name->name,outbuf->buffer+outbuf->offset, 15); - wins_name->name[16]='\0'; + wins_name->name[15]='\0'; if((p = strchr(wins_name->name,' ')) != NULL) *p = 0; From f8db5303395225f6c14c8f2e383a83adbd970df9 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Mon, 15 Jul 2002 15:14:01 +0000 Subject: [PATCH 010/262] preparing for release of 3.0-alpha18 (This used to be commit 9556d3316cf262d14da4f3481d3e733b23d0862b) --- WHATSNEW.txt | 6 ++++++ source3/include/version.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 3a30b7b1efc..ba9956cdbbb 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,6 +1,12 @@ WHATS NEW IN Samba 3.0 alphaX ============================= +Changes in alpha18 + - huge number of changes! really too many to list ... (and its 1am + here, and I'm too tired) + See the cvs tree at http://build.samba.org/ + + Changes in alpha17 - OpenLinux packaging updates (jht) - Locking updates - fix zero timeout (tridge, jra) diff --git a/source3/include/version.h b/source3/include/version.h index afc40a8cf90..74df1c99141 100644 --- a/source3/include/version.h +++ b/source3/include/version.h @@ -1 +1 @@ -#define VERSION "3.0-alpha17" +#define VERSION "3.0-alpha18" From 78750803d09fdef3e878e73da98d3e7bc338fcb5 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 15 Jul 2002 22:27:07 +0000 Subject: [PATCH 011/262] splitting off storage/retrieval routines for abstracting the registry view front end. Now to plug in the various hooks. (This used to be commit 9772acd9ad44af2800dfb9d8610c2d5c23eaceb4) --- source3/Makefile.in | 8 +- source3/include/rpc_reg.h | 16 ++ source3/registry/reg_frontend.c | 334 +++++++++++++++++++++++++++++++ source3/rpc_server/srv_reg_nt.c | 336 ++------------------------------ 4 files changed, 367 insertions(+), 327 deletions(-) create mode 100644 source3/registry/reg_frontend.c diff --git a/source3/Makefile.in b/source3/Makefile.in index 46cbfcd210b..b4f9c8c5e2e 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -1,4 +1,4 @@ -########################################################################## +######################################################################### # Makefile.in for Samba - rewritten for autoconf support # Copyright Andrew Tridgell 1992-1998 # Copyright (C) 2001 by Martin Pool @@ -177,6 +177,8 @@ LIBMSRPC_SERVER_OBJ = libsmb/trust_passwd.o LIBMSRPC_PICOBJ = $(LIBMSRPC_OBJ:.o=.po) +REGISTRY_OBJ = registry/reg_frontend.o + RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o \ rpc_server/srv_lsa_hnd.o rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o \ rpc_server/srv_pipe_hnd.o rpc_server/srv_reg.o rpc_server/srv_reg_nt.o \ @@ -184,7 +186,7 @@ RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o \ rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o \ rpc_server/srv_util.o rpc_server/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o \ rpc_server/srv_pipe.o rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o \ - rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o + rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o $(REGISTRY_OBJ) # this includes only the low level parse code, not stuff # that requires knowledge of security contexts @@ -261,7 +263,7 @@ SMBD_OBJ = $(SMBD_OBJ1) $(MSDFS_OBJ) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(QUOTAOBJS) $(OPLOCK_OBJ) \ $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \ $(LIBMSRPC_OBJ) $(LIBMSRPC_SERVER_OBJ) \ - $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) + $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 3f3db0f2ba0..8ebfc888ed8 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -63,6 +63,10 @@ #define HKEY_LOCAL_MACHINE 0x80000002 #define HKEY_USERS 0x80000003 +#define KEY_HKLM "HKLM" +#define KEY_HKU "HKU" + + /* Registry data types */ #define REG_NONE 0 @@ -82,6 +86,18 @@ #define REG_FORCE_SHUTDOWN 0x001 #define REG_REBOOT_ON_SHUTDOWN 0x100 +/* structure to store the registry handles */ + +typedef struct _RegistryKey { + + struct _RegistryKey *prev, *next; + + fstring name; /* name of registry key */ + POLICY_HND hnd; + +} Registry_Key; + + /* REG_Q_OPEN_HKCR */ typedef struct q_reg_open_hkcr_info { diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c new file mode 100644 index 00000000000..c4e332ed6b8 --- /dev/null +++ b/source3/registry/reg_frontend.c @@ -0,0 +1,334 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines + * Copyright (C) Gerald Carter 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Implementation of registry database functions. */ + +#include "includes.h" + +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_SRV + + + +static TDB_CONTEXT *tdb_reg; + + +/*********************************************************************** + Open the registry database + ***********************************************************************/ + +static BOOL init_registry_data( void ) +{ + pstring keyname; + char *subkeys[3]; + + /* HKEY_LOCAL_MACHINE */ + + pstrcpy( keyname, KEY_HKLM ); + subkeys[0] = "SYSTEM"; + if ( !store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM" ); + subkeys[0] = "CurrentControlSet"; + if ( !store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet" ); + subkeys[0] = "Control"; + subkeys[1] = "services"; + if ( !store_reg_keys( keyname, subkeys, 2 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control" ); + subkeys[0] = "Print"; + subkeys[1] = "ProduceOptions"; + if ( !store_reg_keys( keyname, subkeys, 2 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/Print" ); + subkeys[0] = "Environments"; + subkeys[1] = "Forms"; + subkeys[2] = "Printers"; + if ( !store_reg_keys( keyname, subkeys, 3 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/ProductOptions" ); + if ( !store_reg_keys( keyname, subkeys, 0 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/services" ); + subkeys[0] = "Netlogon"; + if ( !store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon" ); + subkeys[0] = "parameters"; + if ( !store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon/parameters" ); + if ( !store_reg_keys( keyname, subkeys, 0 )) + return False; + + + /* HKEY_USER */ + + pstrcpy( keyname, KEY_HKU ); + if ( !store_reg_keys( keyname, subkeys, 0 ) ) + return False; + + return True; +} + + +/*********************************************************************** + Open the registry database + ***********************************************************************/ + +BOOL init_registry( void ) +{ + static pid_t local_pid; + + + if (tdb_reg && local_pid == sys_getpid()) + return True; + + /* + * try to open first without creating so we can determine + * if we need to init the data in the registry + */ + + tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); + if ( !tdb_reg ) + { + tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if ( !tdb_reg ) { + DEBUG(0,("init_registry: Failed to open registry %s (%s)\n", + lock_path("registry.tdb"), strerror(errno) )); + return False; + } + + DEBUG(10,("init_registry: Successfully created registry tdb\n")); + + /* create the registry here */ + if ( !init_registry_data() ) { + DEBUG(0,("init_registry: Failed to initiailize data in registry!\n")); + return False; + } + } + + local_pid = sys_getpid(); + + return True; +} + +/*********************************************************************** + Add subkey strings to the registry tdb under a defined key + fmt is the same format as tdb_pack except this function only supports + fstrings + ***********************************************************************/ + +BOOL store_reg_keys( char *keyname, char **subkeys, uint32 num_subkeys ) +{ + TDB_DATA kbuf, dbuf; + char *buffer, *tmpbuf; + int i = 0; + uint32 len, buflen; + BOOL ret = True; + + if ( !keyname ) + return False; + + /* allocate some initial memory */ + + buffer = malloc(sizeof(pstring)); + buflen = sizeof(pstring); + len = 0; + + /* store the number of subkeys */ + + len += tdb_pack(buffer+len, buflen-len, "d", num_subkeys); + + /* pack all the strings */ + + for (i=0; i buflen ) { + /* allocate some extra space */ + if ((tmpbuf = Realloc( buffer, len*2 )) == NULL) { + DEBUG(0,("store_reg_keys: Failed to realloc memory of size [%d]\n", len*2)); + ret = False; + goto done; + } + buffer = tmpbuf; + buflen = len*2; + + len = tdb_pack(buffer+len, buflen-len, "f", subkeys[i]); + } + } + + /* finally write out the data */ + + kbuf.dptr = keyname; + kbuf.dsize = strlen(keyname)+1; + dbuf.dptr = buffer; + dbuf.dsize = len; + if ( tdb_store( tdb_reg, kbuf, dbuf, TDB_REPLACE ) == -1) { + ret = False; + goto done; + } + +done: + SAFE_FREE( buffer ); + return ret; +} + +/*********************************************************************** + Retrieve an array of strings containing subkeys. Memory should be + released by the caller. The subkeys are stored in a catenated string + of null terminated character strings + ***********************************************************************/ + +int fetch_reg_keys( char* key, char **subkeys ) +{ + pstring path; + uint32 num_items; + TDB_DATA dbuf; + char *buf; + uint32 buflen, len; + int i; + char *s; + + + pstrcpy( path, key ); + + /* convert to key format */ + pstring_sub( path, "\\", "/" ); + + dbuf = tdb_fetch_by_string( tdb_reg, path ); + + buf = dbuf.dptr; + buflen = dbuf.dsize; + + if ( !buf ) { + DEBUG(5,("fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); + return 0; + } + + len = tdb_unpack( buf, buflen, "d", &num_items); + if (num_items) { + if ( (*subkeys = (char*)malloc(sizeof(fstring)*num_items)) == NULL ) { + DEBUG(0,("fetch_reg_keys: Failed to malloc memory for subkey array containing [%d] items!\n", + num_items)); + num_items = -1; + goto done; + } + } + + s = *subkeys; + for (i=0; idata5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ ((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) -/* structure to store the registry handles */ - -typedef struct _RegistryKey { - struct _RegistryKey *prev, *next; - - fstring name; /* name of registry key */ - POLICY_HND hnd; - -} Registry_Key; static Registry_Key *regkeys_list; -static TDB_CONTEXT *tdb_reg; -/*********************************************************************** - Add subkey strings to the registry tdb under a defined key - fmt is the same format as tdb_pack except this function only supports - fstrings - ***********************************************************************/ + +/****************************************************************** + free() function for Registry_Key + *****************************************************************/ -static BOOL store_reg_keys( TDB_CONTEXT *tdb, char *keyname, char **subkeys, uint32 num_subkeys ) +static void free_reg_info(void *ptr) { - TDB_DATA kbuf, dbuf; - char *buffer, *tmpbuf; - int i = 0; - uint32 len, buflen; - BOOL ret = True; + Registry_Key *info = (Registry_Key*)ptr; - if ( !keyname ) - return False; - - /* allocate some initial memory */ - - buffer = malloc(sizeof(pstring)); - buflen = sizeof(pstring); - len = 0; - - /* store the number of subkeys */ - - len += tdb_pack(buffer+len, buflen-len, "d", num_subkeys); - - /* pack all the strings */ - - for (i=0; i buflen ) { - /* allocate some extra space */ - if ((tmpbuf = Realloc( buffer, len*2 )) == NULL) { - DEBUG(0,("store_reg_keys: Failed to realloc memory of size [%d]\n", len*2)); - ret = False; - goto done; - } - buffer = tmpbuf; - buflen = len*2; - - len = tdb_pack(buffer+len, buflen-len, "f", subkeys[i]); - } - } - - /* finally write out the data */ - - kbuf.dptr = keyname; - kbuf.dsize = strlen(keyname)+1; - dbuf.dptr = buffer; - dbuf.dsize = len; - if ( tdb_store( tdb, kbuf, dbuf, TDB_REPLACE ) == -1) { - ret = False; - goto done; - } + DLIST_REMOVE(regkeys_list, info); -done: - SAFE_FREE( buffer ); - return ret; -} - -/*********************************************************************** - Retrieve an array of strings containing subkeys. Memory should be - released by the caller. The subkeys are stored in a catenated string - of null terminated character strings - ***********************************************************************/ - -static int fetch_reg_keys( TDB_CONTEXT *tdb, char* key, char **subkeys ) -{ - pstring path; - uint32 num_items; - TDB_DATA dbuf; - char *buf; - uint32 buflen, len; - int i; - char *s; - - - pstrcpy( path, key ); - - /* convert to key format */ - pstring_sub( path, "\\", "/" ); - - dbuf = tdb_fetch_by_string( tdb, path ); - - buf = dbuf.dptr; - buflen = dbuf.dsize; - - if ( !buf ) { - DEBUG(5,("fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); - return 0; - } - - len = tdb_unpack( buf, buflen, "d", &num_items); - if (num_items) { - if ( (*subkeys = (char*)malloc(sizeof(fstring)*num_items)) == NULL ) { - DEBUG(0,("fetch_reg_keys: Failed to malloc memory for subkey array containing [%d] items!\n", - num_items)); - num_items = -1; - goto done; - } - } - - s = *subkeys; - for (i=0; iname, &subkeys ); + num_subkeys = fetch_reg_keys( key->name, &subkeys ); if ( num_subkeys == -1 ) return False; @@ -498,6 +185,7 @@ static BOOL get_value_information( Registry_Key *key, uint32 *maxnum, #endif } + /******************************************************************** reg_close ********************************************************************/ @@ -567,7 +255,7 @@ NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTR /* do a check on the name, here */ - if ( (num_subkeys=fetch_reg_keys_count( tdb_reg, path )) == -1 ) + if ( (num_subkeys=fetch_reg_keys_count( path )) == -1 ) return NT_STATUS_ACCESS_DENIED; if (!open_registry_key(p, &pol, path, 0x0)) @@ -724,7 +412,7 @@ NTSTATUS _reg_enum_key(pipes_struct *p, REG_Q_ENUM_KEY *q_u, REG_R_ENUM_KEY *r_u DEBUG(8,("_reg_enum_key: enumerating key [%s]\n", regkey->name)); - if ( !fetch_reg_keys_specific( tdb_reg, regkey->name, subkey, q_u->key_index ) ) + if ( !fetch_reg_keys_specific( regkey->name, subkey, q_u->key_index ) ) { status = werror_to_ntstatus( WERR_NO_MORE_ITEMS ); goto done; From b3aeabedd0af56fc38ddc391a52a9ff7f331f9ef Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Jul 2002 00:07:02 +0000 Subject: [PATCH 012/262] Put printing tdbs in a subdirectory to prevent name collisions. Jeremy. (This used to be commit b013b9437557f2d427e4b646b49ad7d99e94c164) --- source3/printing/printing.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 7bfce43af61..eb6d2f0159b 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -186,7 +186,8 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) DLIST_ADD(print_db_head, p); } - pstrcpy(printdb_path, lock_path(printername)); + pstrcpy(printdb_path, lock_path("printing/")); + pstrcat(printdb_path, printername); pstrcat(printdb_path, ".tdb"); p->tdb = tdb_open_log(printdb_path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!p->tdb) { @@ -217,11 +218,15 @@ BOOL print_backend_init(void) { struct printer_queueid_map *p; char *sversion = "INFO/version"; + pstring printing_path; if (local_pid == sys_getpid()) return True; unlink(lock_path("printing.tdb")); + pstrcpy(printing_path,lock_path("printing")); + mkdir(printing_path,0755); + local_pid = sys_getpid(); /* handle a Samba upgrade */ From bb7de652efdee663aef2325de440047795be7e99 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 16 Jul 2002 18:45:59 +0000 Subject: [PATCH 013/262] Use codepage 850 as a default for the dos character set. Tridge, is this OK? (This used to be commit db5d91fedfe9355f4a79aee9dc60d77dd068b334) --- source3/param/loadparm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 6e3ce460cd4..37f8bb3ca48 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1201,6 +1201,9 @@ static void init_globals(void) /* using UTF8 by default allows us to support all chars */ string_set(&Globals.unix_charset, "UTF8"); + /* Use codepage 850 as a default for the dos character set */ + string_set(&Globals.dos_charset, "CP850"); + /* * Allow the default PASSWD_CHAT to be overridden in local.h. */ From 34ed527b1341d3d30b36ddc13a36227b108ec34e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Jul 2002 21:51:56 +0000 Subject: [PATCH 014/262] print_jobid in the fsp struct should be uint32. Jeremy. (This used to be commit 51c8338c7ac8665fcaaac6de5f2d81b460e803f5) --- source3/include/smb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/include/smb.h b/source3/include/smb.h index a67101ff099..636e4ab00c4 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -383,7 +383,7 @@ typedef struct files_struct int fnum; struct connection_struct *conn; int fd; - int print_jobid; + uint32 print_jobid; SMB_DEV_T dev; SMB_INO_T inode; BOOL delete_on_close; From cc9511af8c3bb1b805ba34049e7861e226ed5f7d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Jul 2002 00:38:37 +0000 Subject: [PATCH 015/262] Lanman print jobs are *16* bits, not 32. arggggh. Map them.... Jeremy. (This used to be commit 2b06fd305be10fa8a8629adb4a99ccd3960786da) --- source3/printing/printing.c | 79 +++++++++++++++++++++++++++++++++++++ source3/smbd/lanman.c | 16 ++++---- source3/smbd/posix_acls.c | 2 +- 3 files changed, 88 insertions(+), 9 deletions(-) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index eb6d2f0159b..f8dfea0a126 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -39,6 +39,84 @@ static struct printif *current_printif = &generic_printif; jobids are assigned when a job starts spooling. */ +/*************************************************************************** + Nightmare. LANMAN jobid's are 16 bit numbers..... We must map them to 32 + bit RPC jobids.... JRA. +***************************************************************************/ + +static TDB_CONTEXT *rap_tdb; +static uint16 next_rap_jobid; + +uint16 pjobid_to_rap(uint32 jobid) +{ + uint16 rap_jobid; + TDB_DATA data, key; + + if (!rap_tdb) { + /* Create the in-memory tdb. */ + rap_tdb = tdb_open_log(NULL, 0, TDB_INTERNAL, (O_RDWR|O_CREAT), 0644); + if (!rap_tdb) + return 0; + } + + key.dptr = (char *)&jobid; + key.dsize = sizeof(jobid); + data = tdb_fetch(rap_tdb, key); + if (data.dptr && data.dsize == sizeof(uint16)) { + memcpy(&rap_jobid, data.dptr, sizeof(uint16)); + SAFE_FREE(data.dptr); + return rap_jobid; + } + /* Not found - create and store mapping. */ + rap_jobid = ++next_rap_jobid; + if (rap_jobid == 0) + rap_jobid = ++next_rap_jobid; + data.dptr = (char *)&rap_jobid; + data.dsize = sizeof(rap_jobid); + tdb_store(rap_tdb, key, data, TDB_REPLACE); + tdb_store(rap_tdb, data, key, TDB_REPLACE); + return rap_jobid; +} + +uint32 rap_to_pjobid(uint16 rap_jobid) +{ + TDB_DATA data, key; + uint32 jobid = 0; + + if (!rap_tdb) + return 0; + + key.dptr = (char *)&rap_jobid; + key.dsize = sizeof(rap_jobid); + data = tdb_fetch(rap_tdb, key); + if (data.dptr && data.dsize == sizeof(uint32)) { + memcpy(&jobid, data.dptr, sizeof(uint32)); + SAFE_FREE(data.dptr); + } + return jobid; +} + +static void rap_jobid_delete(uint32 jobid) +{ + TDB_DATA key, data; + uint16 rap_jobid; + + if (!rap_tdb) + return; + key.dptr = (char *)&jobid; + key.dsize = sizeof(jobid); + data = tdb_fetch(rap_tdb, key); + if (!data.dptr || (data.dsize != sizeof(uint16))) + return; + + memcpy(&rap_jobid, data.dptr, sizeof(uint16)); + SAFE_FREE(data.dptr); + data.dptr = (char *)&rap_jobid; + data.dsize = sizeof(rap_jobid); + tdb_delete(rap_tdb, key); + tdb_delete(rap_tdb, data); +} + static pid_t local_pid; /* Mapping between printer names and queue id's in job id's. */ @@ -501,6 +579,7 @@ static void pjob_delete(uint32 jobid) /* Remove from printing.tdb */ tdb_delete(pdb->tdb, print_key(jobid)); + rap_jobid_delete(jobid); } /**************************************************************************** diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 996a17e9322..619ecd736aa 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -443,7 +443,7 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel, /* the client expects localtime */ t -= TimeDiff(t); - PACKI(desc,"W",queue->job); /* uJobId */ + PACKI(desc,"W",pjobid_to_rap(queue->job)); /* uJobId */ if (uLevel == 1) { PACKS(desc,"B21",queue->fs_user); /* szUserName */ PACKS(desc,"B",""); /* pad */ @@ -933,7 +933,7 @@ static BOOL api_DosPrintQGetInfo(connection_struct *conn, if (!mdrcnt && lp_disable_spoolss()) desc.errcode = ERRbuftoosmall; - *rdata_len = desc.usedlen; + *rdata_len = desc.usedlen; *rparam_len = 6; *rparam = REALLOC(*rparam,*rparam_len); SSVALS(*rparam,0,desc.errcode); @@ -2185,7 +2185,7 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param extern struct current_user current_user; WERROR werr = WERR_OK; - jobid = SVAL(p,0); + jobid = rap_to_pjobid(SVAL(p,0)); /* check it's a supported varient */ if (!(strcsequal(str1,"W") && strcsequal(str2,""))) @@ -2318,7 +2318,7 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha int function = SVAL(p,4); int place, errcode; - jobid = SVAL(p,0); + jobid = rap_to_pjobid(SVAL(p,0)); *rparam_len = 4; *rparam = REALLOC(*rparam,*rparam_len); @@ -2994,7 +2994,7 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn,uint16 vuid, char *para int count; int i; int snum; - int job; + uint32 jobid; struct pack_desc desc; print_queue_struct *queue=NULL; print_status_struct status; @@ -3011,14 +3011,14 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn,uint16 vuid, char *para if (strcmp(str1,"WWrLh") != 0) return False; if (!check_printjob_info(&desc,uLevel,str2)) return False; - job = SVAL(p,0); - snum = print_job_snum(job); + jobid = rap_to_pjobid(SVAL(p,0)); + snum = print_job_snum(jobid); if (snum < 0 || !VALID_SNUM(snum)) return(False); count = print_queue_status(snum,&queue,&status); for (i = 0; i < count; i++) { - if (queue[i].job == job) break; + if (queue[i].job == jobid) break; } if (mdrcnt > 0) { diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 85818d524a3..043e33e8367 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -2296,7 +2296,7 @@ static int chmod_acl_internals( connection_struct *conn, SMB_ACL_T posix_acl, mo switch(tagtype) { case SMB_ACL_USER_OBJ: perms = unix_perms_to_acl_perms(mode, S_IRUSR, S_IWUSR, S_IXUSR); - break; + break; case SMB_ACL_GROUP_OBJ: perms = unix_perms_to_acl_perms(mode, S_IRGRP, S_IWGRP, S_IXGRP); break; From 29426b4a50275e24020ae67898cd7d156a341a7f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Jul 2002 19:12:17 +0000 Subject: [PATCH 016/262] Gone back to explicit queue number passing as snum - removed encoding of queueid in job number. This means we must have an internal tdb to store mapping from 16 bit RAP jobid's to 32 bit RPC jobids. Jeremy. (This used to be commit 4ff64f69706cc94d5dba7762754d00790c476963) --- source3/param/loadparm.c | 4 - source3/printing/printfsp.c | 6 +- source3/printing/printing.c | 367 +++++++++------------------- source3/rpc_server/srv_spoolss_nt.c | 31 ++- source3/smbd/fileio.c | 2 +- source3/smbd/lanman.c | 33 +-- source3/smbd/reply.c | 5 +- source3/smbd/server.c | 2 - source3/smbd/trans2.c | 7 +- 9 files changed, 170 insertions(+), 287 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 37f8bb3ca48..0602e901a41 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1974,8 +1974,6 @@ static BOOL lp_add_ipc(char *ipc_name, BOOL guest_ok) return (True); } -BOOL (*register_printer_fn)(const char *); - /*************************************************************************** add a new printer service, with defaults coming from service iFrom. ***************************************************************************/ @@ -2008,8 +2006,6 @@ BOOL lp_add_printer(char *pszPrintername, int iDefaultService) DEBUG(3, ("adding printer service %s\n", pszPrintername)); update_server_announce_as_printserver(); - if (register_printer_fn && (!(*register_printer_fn)(pszPrintername))) - return False; return (True); } diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c index 9f33d57ad52..ff50ac47c49 100644 --- a/source3/printing/printfsp.c +++ b/source3/printing/printfsp.c @@ -54,7 +54,7 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname) /* setup a full fsp */ fsp->print_jobid = jobid; - fsp->fd = print_job_fd(jobid); + fsp->fd = print_job_fd(SNUM(conn),jobid); GetTimeOfDay(&fsp->open_time); fsp->vuid = current_user.vuid; fsp->size = 0; @@ -70,7 +70,7 @@ files_struct *print_fsp_open(connection_struct *conn, char *fname) fsp->is_directory = False; fsp->directory_delete_on_close = False; fsp->conn = conn; - string_set(&fsp->fsp_name,print_job_fname(jobid)); + string_set(&fsp->fsp_name,print_job_fname(SNUM(conn),jobid)); fsp->wbmpx_ptr = NULL; fsp->wcp = NULL; conn->vfs_ops.fstat(fsp,fsp->fd, &sbuf); @@ -96,7 +96,7 @@ void print_fsp_end(files_struct *fsp, BOOL normal_close) sys_ftruncate(fsp->fd, 0); } - print_job_end(fsp->print_jobid, normal_close); + print_job_end(SNUM(fsp->conn),fsp->print_jobid, normal_close); if (fsp->fsp_name) { string_free(&fsp->fsp_name); diff --git a/source3/printing/printing.c b/source3/printing/printing.c index f8dfea0a126..9b0e8cdfb0a 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -47,10 +47,11 @@ static struct printif *current_printif = &generic_printif; static TDB_CONTEXT *rap_tdb; static uint16 next_rap_jobid; -uint16 pjobid_to_rap(uint32 jobid) +uint16 pjobid_to_rap(int snum, uint32 jobid) { uint16 rap_jobid; TDB_DATA data, key; + char jinfo[8]; if (!rap_tdb) { /* Create the in-memory tdb. */ @@ -59,8 +60,11 @@ uint16 pjobid_to_rap(uint32 jobid) return 0; } - key.dptr = (char *)&jobid; - key.dsize = sizeof(jobid); + SIVAL(&jinfo,0,(int32)snum); + SIVAL(&jinfo,4,jobid); + + key.dptr = (char *)&jinfo; + key.dsize = sizeof(jinfo); data = tdb_fetch(rap_tdb, key); if (data.dptr && data.dsize == sizeof(uint16)) { memcpy(&rap_jobid, data.dptr, sizeof(uint16)); @@ -78,33 +82,40 @@ uint16 pjobid_to_rap(uint32 jobid) return rap_jobid; } -uint32 rap_to_pjobid(uint16 rap_jobid) +BOOL rap_to_pjobid(uint16 rap_jobid, int *psnum, uint32 *pjobid) { TDB_DATA data, key; - uint32 jobid = 0; + char jinfo[8]; if (!rap_tdb) - return 0; + return False; key.dptr = (char *)&rap_jobid; key.dsize = sizeof(rap_jobid); data = tdb_fetch(rap_tdb, key); - if (data.dptr && data.dsize == sizeof(uint32)) { - memcpy(&jobid, data.dptr, sizeof(uint32)); + if (data.dptr && data.dsize == sizeof(jinfo)) { + *psnum = IVAL(&jinfo,0); + *pjobid = IVAL(&jinfo,4); SAFE_FREE(data.dptr); + return True; } - return jobid; + return False; } -static void rap_jobid_delete(uint32 jobid) +static void rap_jobid_delete(int snum, uint32 jobid) { TDB_DATA key, data; uint16 rap_jobid; + char jinfo[8]; if (!rap_tdb) return; - key.dptr = (char *)&jobid; - key.dsize = sizeof(jobid); + + SIVAL(&jinfo,0,(int32)snum); + SIVAL(&jinfo,4,jobid); + + key.dptr = (char *)&jinfo; + key.dsize = sizeof(jinfo); data = tdb_fetch(rap_tdb, key); if (!data.dptr || (data.dsize != sizeof(uint16))) return; @@ -119,96 +130,6 @@ static void rap_jobid_delete(uint32 jobid) static pid_t local_pid; -/* Mapping between printer names and queue id's in job id's. */ -struct printer_queueid_map { - struct printer_queueid_map *next, *prev; - char *printername; - uint32 queueid; -}; - -static struct printer_queueid_map *printer_queueid_map_head; -static uint32 last_queueid; - -#define QUEUEID_BITS 12 -#define QUEUEID_MASK ((1<<(QUEUEID_BITS))-1) -#define QUEUEID_TO_JOBID(queueid) (((queueid) & QUEUEID_MASK) << 20 ) - -/**************************************************************************** - Create an association between a printer name and a queueid. Used to encode - the printer queueid in jobid's. - This could be converted to use an internal tdb if searching the list is - too slow. JRA. -****************************************************************************/ - -BOOL create_printer_queueid(const char *printername) -{ - struct printer_queueid_map *p; - - for (p = printer_queueid_map_head; p; p = p->next) { - if (strequal(p->printername, printername)) - return True; - } - - p = (struct printer_queueid_map *)malloc(sizeof(*p)); - if (!p) { - DEBUG(0,("create_printer_queueid: malloc fail !\n")); - return False; - } - ZERO_STRUCTP(p); - p->printername = strdup(printername); - if (!p->printername) { - DEBUG(0,("create_printer_queueid: malloc fail !\n")); - SAFE_FREE(p); - return False; - } - p->queueid = (++last_queueid); - if (p->queueid > QUEUEID_MASK) { - DEBUG(0,("create_printer_queueid: malloc fail !\n")); - SAFE_FREE(p->printername); - SAFE_FREE(p); - return False; - } - DLIST_ADD(printer_queueid_map_head, p); - return True; -} - -void set_register_printer_fn(void) -{ - extern BOOL (*register_printer_fn)(const char *); - register_printer_fn = create_printer_queueid; -} - -/**************************************************************************** - Lookups. -****************************************************************************/ - -static uint32 get_printer_queueid_byname(const char *printername) -{ - struct printer_queueid_map *p; - - for (p = printer_queueid_map_head; p; p = p->next) { - if (strequal(p->printername, printername)) - return p->queueid; - } - return 0; -} - -/**************************************************************************** - Lookups. -****************************************************************************/ - -static const char *get_printer_name_byjobid(uint32 jobid) -{ - struct printer_queueid_map *p; - uint32 queueid = (((jobid)>>20) & QUEUEID_MASK); - - for (p = printer_queueid_map_head; p; p = p->next) { - if (p->queueid == queueid) - return p->printername; - } - return NULL; -} - static int get_queue_status(int, print_status_struct *); #define MAX_PRINT_DBS_OPEN 1 @@ -279,14 +200,6 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) return p; } -static struct tdb_print_db *get_print_db_byjobid( uint32 jobid) -{ - const char *printername = get_printer_name_byjobid(jobid); - if (!printername) - return NULL; - return get_print_db_byname(printername); -} - /**************************************************************************** Initialise the printing backend. Called once at startup. Does not survive a fork @@ -294,9 +207,10 @@ static struct tdb_print_db *get_print_db_byjobid( uint32 jobid) BOOL print_backend_init(void) { - struct printer_queueid_map *p; char *sversion = "INFO/version"; pstring printing_path; + int services = lp_numservices(); + int snum; if (local_pid == sys_getpid()) return True; @@ -309,9 +223,12 @@ BOOL print_backend_init(void) /* handle a Samba upgrade */ - for (p = printer_queueid_map_head; p; p = p->next) { - struct tdb_print_db *pdb = get_print_db_byname(p->printername); + for (snum = 0; snum < services; snum++) { + struct tdb_print_db *pdb; + if (!lp_print_ok(snum)) + continue; + pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) continue; tdb_lock_bystring(pdb->tdb, sversion); @@ -369,11 +286,11 @@ static TDB_DATA print_key(uint32 jobid) Useful function to find a print job in the database. ****************************************************************************/ -static struct printjob *print_job_find(uint32 jobid) +static struct printjob *print_job_find(int snum, uint32 jobid) { static struct printjob pjob; TDB_DATA ret; - struct tdb_print_db *pdb = get_print_db_byjobid(jobid); + struct tdb_print_db *pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) return NULL; @@ -417,11 +334,16 @@ static int unixjob_traverse_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, uint32 sysjob_to_jobid(int unix_jobid) { - struct printer_queueid_map *p; + int services = lp_numservices(); + int snum; + sysjob_to_jobid_value = (uint32)-1; - for (p = printer_queueid_map_head; p; p = p->next) { - struct tdb_print_db *pdb = get_print_db_byname(p->printername); + for (snum = 0; snum < services; snum++) { + struct tdb_print_db *pdb; + if (!lp_print_ok(snum)) + continue; + pdb = get_print_db_byname(lp_const_servicename(snum)); if (pdb) tdb_traverse(pdb->tdb, unixjob_traverse_fn, &unix_jobid); if (sysjob_to_jobid_value != (uint32)-1) @@ -468,14 +390,10 @@ static uint32 map_to_spoolss_status(uint32 lpq_status) return 0; } -static void pjob_store_notify(uint32 jobid, struct printjob *old_data, +static void pjob_store_notify(int snum, uint32 jobid, struct printjob *old_data, struct printjob *new_data) { BOOL new_job = False; - int snum = print_job_snum(jobid); - - if (snum == -1) - return; if (!old_data) new_job = True; @@ -510,11 +428,11 @@ static void pjob_store_notify(uint32 jobid, struct printjob *old_data, Store a job structure back to the database. ****************************************************************************/ -static BOOL pjob_store(uint32 jobid, struct printjob *pjob) +static BOOL pjob_store(int snum, uint32 jobid, struct printjob *pjob) { TDB_DATA old_data, new_data; BOOL ret; - struct tdb_print_db *pdb = get_print_db_byjobid(jobid); + struct tdb_print_db *pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) return False; @@ -533,7 +451,7 @@ static BOOL pjob_store(uint32 jobid, struct printjob *pjob) if (ret && (old_data.dsize == 0 || old_data.dsize == sizeof(*pjob))) { pjob_store_notify( - jobid, (struct printjob *)old_data.dptr, + snum, jobid, (struct printjob *)old_data.dptr, (struct printjob *)new_data.dptr); free(old_data.dptr); } @@ -545,12 +463,11 @@ static BOOL pjob_store(uint32 jobid, struct printjob *pjob) Remove a job structure from the database. ****************************************************************************/ -static void pjob_delete(uint32 jobid) +static void pjob_delete(int snum, uint32 jobid) { - int snum; - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); uint32 job_status = 0; - struct tdb_print_db *pdb = get_print_db_byjobid(jobid); + struct tdb_print_db *pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) return; @@ -569,7 +486,6 @@ static void pjob_delete(uint32 jobid) JOB_STATUS_DELETED for the port monitor to delete the job properly. */ - snum = print_job_snum(jobid); job_status |= JOB_STATUS_DELETING; notify_job_status(snum, jobid, job_status); @@ -579,7 +495,7 @@ static void pjob_delete(uint32 jobid) /* Remove from printing.tdb */ tdb_delete(pdb->tdb, print_key(jobid)); - rap_jobid_delete(jobid); + rap_jobid_delete(snum, jobid); } /**************************************************************************** @@ -607,13 +523,12 @@ static uint32 print_parse_jobid(char *fname) static void print_unix_job(int snum, print_queue_struct *q) { - uint32 queueid = get_printer_queueid_byname(PRINTERNAME(snum)); - uint32 jobid = (q->job + UNIX_JOB_START) | QUEUEID_TO_JOBID(queueid); + uint32 jobid = q->job + UNIX_JOB_START; struct printjob pj, *old_pj; /* Preserve the timestamp on an existing unix print job */ - old_pj = print_job_find(jobid); + old_pj = print_job_find(snum, jobid); ZERO_STRUCT(pj); @@ -630,7 +545,7 @@ static void print_unix_job(int snum, print_queue_struct *q) fstrcpy(pj.user, q->fs_user); fstrcpy(pj.queuename, lp_const_servicename(snum)); - pjob_store(jobid, &pj); + pjob_store(snum, jobid, &pj); } @@ -645,7 +560,6 @@ struct traverse_struct { static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void *state) { - uint32 queueid; struct traverse_struct *ts = (struct traverse_struct *)state; struct printjob pjob; uint32 jobid; @@ -661,18 +575,16 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void return 0; } - queueid = get_printer_queueid_byname(pjob.queuename); - if (!pjob.smbjob) { /* remove a unix job if it isn't in the system queue any more */ for (i=0;iqcount;i++) { - uint32 u_jobid = ((ts->queue[i].job + UNIX_JOB_START) | QUEUEID_TO_JOBID(queueid)); + uint32 u_jobid = (ts->queue[i].job + UNIX_JOB_START); if (jobid == u_jobid) break; } if (i == ts->qcount) - pjob_delete(jobid); + pjob_delete(ts->snum, jobid); else ts->total_jobs++; return 0; @@ -684,14 +596,14 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void exist then kill it. This cleans up after smbd deaths */ if (!process_exists(pjob.pid)) - pjob_delete(jobid); + pjob_delete(ts->snum, jobid); else ts->total_jobs++; return 0; } for (i=0;iqcount;i++) { - uint32 curr_jobid = print_parse_jobid(ts->queue[i].fs_file) | QUEUEID_TO_JOBID(queueid); + uint32 curr_jobid = print_parse_jobid(ts->queue[i].fs_file); if (jobid == curr_jobid) break; } @@ -711,7 +623,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void submitted less than lp_lpqcachetime() seconds ago. */ if ((cur_t - pjob.starttime) > lp_lpqcachetime()) - pjob_delete(jobid); + pjob_delete(ts->snum, jobid); else ts->total_jobs++; } @@ -772,7 +684,7 @@ static pid_t get_updating_pid(fstring printer_name) in the tdb. ****************************************************************************/ -static void set_updating_pid(fstring printer_name, BOOL delete) +static void set_updating_pid(const fstring printer_name, BOOL delete) { fstring keystr; TDB_DATA key; @@ -897,7 +809,7 @@ static void print_queue_update(int snum) } /* we have an active SMB print job - update its status */ - pjob = print_job_find(jobid); + pjob = print_job_find(snum, jobid); if (!pjob) { /* err, somethings wrong. Probably smbd was restarted with jobs in the queue. All we can do is treat them @@ -909,7 +821,7 @@ static void print_queue_update(int snum) pjob->sysjob = queue[i].job; pjob->status = queue[i].status; - pjob_store(jobid, pjob); + pjob_store(snum, jobid, pjob); } /* now delete any queued entries that don't appear in the @@ -955,36 +867,21 @@ static void print_queue_update(int snum) Check if a jobid is valid. It is valid if it exists in the database. ****************************************************************************/ -BOOL print_job_exists(uint32 jobid) +BOOL print_job_exists(int snum, uint32 jobid) { - struct tdb_print_db *pdb = get_print_db_byjobid(jobid); + struct tdb_print_db *pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) return False; return tdb_exists(pdb->tdb, print_key(jobid)); } -/**************************************************************************** - Work out which service a jobid is for. - Note that we have to look up by queue name to ensure that it works for - other than the process that started the job. -****************************************************************************/ - -int print_job_snum(uint32 jobid) -{ - struct printjob *pjob = print_job_find(jobid); - if (!pjob) - return -1; - - return find_service(pjob->queuename); -} - /**************************************************************************** Give the fd used for a jobid. ****************************************************************************/ -int print_job_fd(uint32 jobid) +int print_job_fd(int snum, uint32 jobid) { - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); if (!pjob) return -1; /* don't allow another process to get this info - it is meaningless */ @@ -999,9 +896,9 @@ int print_job_fd(uint32 jobid) has not been spooled. ****************************************************************************/ -char *print_job_fname(uint32 jobid) +char *print_job_fname(int snum, uint32 jobid) { - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); if (!pjob || pjob->spooled || pjob->pid != local_pid) return NULL; return pjob->filename; @@ -1011,7 +908,7 @@ char *print_job_fname(uint32 jobid) Set the place in the queue for a job. ****************************************************************************/ -BOOL print_job_set_place(uint32 jobid, int place) +BOOL print_job_set_place(int snum, uint32 jobid, int place) { DEBUG(2,("print_job_set_place not implemented yet\n")); return False; @@ -1021,24 +918,24 @@ BOOL print_job_set_place(uint32 jobid, int place) Set the name of a job. Only possible for owner. ****************************************************************************/ -BOOL print_job_set_name(uint32 jobid, char *name) +BOOL print_job_set_name(int snum, uint32 jobid, char *name) { - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); if (!pjob || pjob->pid != local_pid) return False; fstrcpy(pjob->jobname, name); - return pjob_store(jobid, pjob); + return pjob_store(snum, jobid, pjob); } /**************************************************************************** Delete a print job - don't update queue. ****************************************************************************/ -static BOOL print_job_delete1(uint32 jobid) +static BOOL print_job_delete1(int snum, uint32 jobid) { - struct printjob *pjob = print_job_find(jobid); - int snum, result = 0; + struct printjob *pjob = print_job_find(snum, jobid); + int result = 0; if (!pjob) return False; @@ -1050,12 +947,6 @@ static BOOL print_job_delete1(uint32 jobid) if (pjob->status == LPQ_DELETING) return True; - snum = print_job_snum(jobid); - if (snum == -1) { - DEBUG(5,("print_job_delete1: unknown service number for jobid %u\n", (unsigned int)jobid)); - return False; - } - /* Hrm - we need to be able to cope with deleting a job before it has reached the spooler. */ @@ -1066,7 +957,7 @@ static BOOL print_job_delete1(uint32 jobid) /* Set the tdb entry to be deleting. */ pjob->status = LPQ_DELETING; - pjob_store(jobid, pjob); + pjob_store(snum, jobid, pjob); if (pjob->spooled && pjob->sysjob != -1) result = (*(current_printif->job_delete))(snum, pjob); @@ -1075,7 +966,7 @@ static BOOL print_job_delete1(uint32 jobid) been spooled. */ if (result == 0) - pjob_delete(jobid); + pjob_delete(snum, jobid); return (result == 0); } @@ -1084,9 +975,9 @@ static BOOL print_job_delete1(uint32 jobid) Return true if the current user owns the print job. ****************************************************************************/ -static BOOL is_owner(struct current_user *user, uint32 jobid) +static BOOL is_owner(struct current_user *user, int snum, uint32 jobid) { - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); user_struct *vuser; if (!pjob || !user) @@ -1103,17 +994,11 @@ static BOOL is_owner(struct current_user *user, uint32 jobid) Delete a print job. ****************************************************************************/ -BOOL print_job_delete(struct current_user *user, uint32 jobid, WERROR *errcode) +BOOL print_job_delete(struct current_user *user, int snum, uint32 jobid, WERROR *errcode) { - int snum = print_job_snum(jobid); BOOL owner; - if (snum == -1) { - DEBUG(5,("print_job_delete: unknown service number for jobid %d\n", jobid)); - return False; - } - - owner = is_owner(user, jobid); + owner = is_owner(user, snum, jobid); /* Check access against security descriptor or whether the user owns their job. */ @@ -1125,7 +1010,7 @@ BOOL print_job_delete(struct current_user *user, uint32 jobid, WERROR *errcode) return False; } - if (!print_job_delete1(jobid)) + if (!print_job_delete1(snum, jobid)) return False; /* force update the database and say the delete failed if the @@ -1133,17 +1018,17 @@ BOOL print_job_delete(struct current_user *user, uint32 jobid, WERROR *errcode) print_queue_update(snum); - return !print_job_exists(jobid); + return !print_job_exists(snum, jobid); } /**************************************************************************** Pause a job. ****************************************************************************/ -BOOL print_job_pause(struct current_user *user, uint32 jobid, WERROR *errcode) +BOOL print_job_pause(struct current_user *user, int snum, uint32 jobid, WERROR *errcode) { - struct printjob *pjob = print_job_find(jobid); - int snum, ret = -1; + struct printjob *pjob = print_job_find(snum, jobid); + int ret = -1; if (!pjob || !user) return False; @@ -1151,13 +1036,7 @@ BOOL print_job_pause(struct current_user *user, uint32 jobid, WERROR *errcode) if (!pjob->spooled || pjob->sysjob == -1) return False; - snum = print_job_snum(jobid); - if (snum == -1) { - DEBUG(5,("print_job_pause: unknown service number for jobid %u\n", (unsigned int)jobid)); - return False; - } - - if (!is_owner(user, jobid) && + if (!is_owner(user, snum, jobid) && !print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) { DEBUG(3, ("pause denied by security descriptor\n")); *errcode = WERR_ACCESS_DENIED; @@ -1188,10 +1067,10 @@ BOOL print_job_pause(struct current_user *user, uint32 jobid, WERROR *errcode) Resume a job. ****************************************************************************/ -BOOL print_job_resume(struct current_user *user, uint32 jobid, WERROR *errcode) +BOOL print_job_resume(struct current_user *user, int snum, uint32 jobid, WERROR *errcode) { - struct printjob *pjob = print_job_find(jobid); - int snum, ret; + struct printjob *pjob = print_job_find(snum, jobid); + int ret; if (!pjob || !user) return False; @@ -1199,13 +1078,7 @@ BOOL print_job_resume(struct current_user *user, uint32 jobid, WERROR *errcode) if (!pjob->spooled || pjob->sysjob == -1) return False; - snum = print_job_snum(jobid); - if (snum == -1) { - DEBUG(5,("print_job_resume: unknown service number for jobid %u\n", (unsigned int)jobid)); - return False; - } - - if (!is_owner(user, jobid) && + if (!is_owner(user, snum, jobid) && !print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) { DEBUG(3, ("resume denied by security descriptor\n")); *errcode = WERR_ACCESS_DENIED; @@ -1233,10 +1106,10 @@ BOOL print_job_resume(struct current_user *user, uint32 jobid, WERROR *errcode) Write to a print file. ****************************************************************************/ -int print_job_write(uint32 jobid, const char *buf, int size) +int print_job_write(int snum, uint32 jobid, const char *buf, int size) { int return_code; - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); if (!pjob) return -1; @@ -1247,7 +1120,7 @@ int print_job_write(uint32 jobid, const char *buf, int size) return_code = write(pjob->fd, buf, size); if (return_code>0) { pjob->size += size; - pjob_store(jobid, pjob); + pjob_store(snum, jobid, pjob); } return return_code; } @@ -1345,17 +1218,23 @@ int print_queue_length(int snum, print_status_struct *pstatus) static int get_total_jobs(void) { int total_jobs; - struct printer_queueid_map *p; + int snum; + int services = lp_numservices(); - for (p = printer_queueid_map_head; p; p = p->next) { + for (snum = 0; snum < services; snum++) { + struct tdb_print_db *pdb; int jobs; - struct tdb_print_db *pdb = get_print_db_byname(p->printername); + + if (!lp_print_ok(snum)) + continue; + + pdb = get_print_db_byname(lp_const_servicename(snum)); if (!pdb) continue; /* make sure the database is up to date */ - if (print_cache_expired(lp_servicenumber(p->printername))) - print_queue_update(lp_servicenumber(p->printername)); + if (print_cache_expired(snum)) + print_queue_update(snum); jobs = tdb_fetch_int32(pdb->tdb, "INFO/total_jobs"); if (jobs > 0) @@ -1378,7 +1257,6 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname) int njobs = 0; const char *printername = lp_const_servicename(snum); struct tdb_print_db *pdb = get_print_db_byname(printername); - uint32 queueid = queueid = get_printer_queueid_byname(printername); errno = 0; @@ -1460,10 +1338,10 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname) next_jobid = 1; for (jobid = NEXT_JOBID(next_jobid); jobid != next_jobid; jobid = NEXT_JOBID(jobid)) { - if (!print_job_exists(jobid | QUEUEID_TO_JOBID(queueid))) + if (!print_job_exists(snum, jobid)) break; } - if (jobid == next_jobid || !pjob_store(jobid | QUEUEID_TO_JOBID(queueid), &pjob)) { + if (jobid == next_jobid || !pjob_store(snum, jobid, &pjob)) { DEBUG(3, ("print_job_start: either jobid (%d)==next_jobid(%d) or pjob_store failed.\n", jobid, next_jobid )); jobid = -1; @@ -1476,9 +1354,6 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname) goto fail; } - /* Ensure the queuid is added to the jobid. */ - jobid |= QUEUEID_TO_JOBID(queueid); - /* we have a job entry - now create the spool file */ slprintf(pjob.filename, sizeof(pjob.filename)-1, "%s/%s%.8u.XXXXXX", path, PRINT_SPOOL_PREFIX, (unsigned int)jobid); @@ -1497,7 +1372,7 @@ to open spool file %s.\n", pjob.filename)); goto fail; } - pjob_store(jobid, &pjob); + pjob_store(snum, jobid, &pjob); tdb_unlock_bystring(pdb->tdb, "INFO/nextjob"); @@ -1509,14 +1384,14 @@ to open spool file %s.\n", pjob.filename)); * tim@fsg.com 09/06/94 */ if (lp_postscript(snum)) { - print_job_write(jobid, "%!\n",3); + print_job_write(snum, jobid, "%!\n",3); } return jobid; fail: if (jobid != -1) - pjob_delete(jobid); + pjob_delete(snum, jobid); tdb_unlock_bystring(pdb->tdb, "INFO/nextjob"); @@ -1528,9 +1403,9 @@ to open spool file %s.\n", pjob.filename)); Update the number of pages spooled to jobid ****************************************************************************/ -void print_job_endpage(uint32 jobid) +void print_job_endpage(int snum, uint32 jobid) { - struct printjob *pjob = print_job_find(jobid); + struct printjob *pjob = print_job_find(snum, jobid); if (!pjob) return; /* don't allow another process to get this info - it is meaningless */ @@ -1538,7 +1413,7 @@ void print_job_endpage(uint32 jobid) return; pjob->page_count++; - pjob_store(jobid, pjob); + pjob_store(snum, jobid, pjob); } /**************************************************************************** @@ -1547,10 +1422,10 @@ void print_job_endpage(uint32 jobid) error. ****************************************************************************/ -BOOL print_job_end(uint32 jobid, BOOL normal_close) +BOOL print_job_end(int snum, uint32 jobid, BOOL normal_close) { - struct printjob *pjob = print_job_find(jobid); - int snum, ret; + struct printjob *pjob = print_job_find(snum, jobid); + int ret; SMB_STRUCT_STAT sbuf; if (!pjob) @@ -1559,12 +1434,6 @@ BOOL print_job_end(uint32 jobid, BOOL normal_close) if (pjob->spooled || pjob->pid != local_pid) return False; - snum = print_job_snum(jobid); - if (snum == -1) { - DEBUG(5,("print_job_end: unknown service number for jobid %u\n", (unsigned int)jobid)); - return False; - } - if (normal_close && (sys_fstat(pjob->fd, &sbuf) == 0)) { pjob->size = sbuf.st_size; close(pjob->fd); @@ -1589,7 +1458,7 @@ BOOL print_job_end(uint32 jobid, BOOL normal_close) DEBUG(5,("print_job_end: canceling spool of %s (%s)\n", pjob->filename, pjob->size ? "deleted" : "zero length" )); unlink(pjob->filename); - pjob_delete(jobid); + pjob_delete(snum, jobid); return True; } @@ -1602,7 +1471,7 @@ BOOL print_job_end(uint32 jobid, BOOL normal_close) pjob->spooled = True; pjob->status = LPQ_QUEUED; - pjob_store(jobid, pjob); + pjob_store(snum, jobid, pjob); /* make sure the database is up to date */ if (print_cache_expired(snum)) @@ -1615,7 +1484,7 @@ fail: /* The print job was not succesfully started. Cleanup */ /* Still need to add proper error return propagation! 010122:JRR */ unlink(pjob->filename); - pjob_delete(jobid); + pjob_delete(snum, jobid); return False; } @@ -1877,10 +1746,10 @@ BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode) njobs = print_queue_status(snum, &queue, &status); for (i=0;idocument_started=False; - print_job_end(Printer->jobid,True); + print_job_end(snum, Printer->jobid,True); /* error codes unhandled so far ... */ return WERR_OK; @@ -4793,6 +4797,7 @@ WERROR _spoolss_startpageprinter(pipes_struct *p, SPOOL_Q_STARTPAGEPRINTER *q_u, WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPOOL_R_ENDPAGEPRINTER *r_u) { POLICY_HND *handle = &q_u->handle; + int snum; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); @@ -4801,8 +4806,11 @@ WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPO return WERR_BADFID; } + if (!get_printer_snum(p, handle, &snum)) + return WERR_BADFID; + Printer->page_started=False; - print_job_endpage(Printer->jobid); + print_job_endpage(snum, Printer->jobid); return WERR_OK; } @@ -4819,7 +4827,6 @@ WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, S /* uint32 level = q_u->doc_info_container.level; - notused. */ DOC_INFO *docinfo = &q_u->doc_info_container.docinfo; uint32 *jobid = &r_u->jobid; - DOC_INFO_1 *info_1 = &docinfo->doc_info_1; int snum; pstring jobname; @@ -4898,7 +4905,7 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R uint32 buffer_size = q_u->buffer_size; uint8 *buffer = q_u->buffer; uint32 *buffer_written = &q_u->buffer_size2; - + int snum; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); if (!Printer) { @@ -4907,8 +4914,10 @@ WERROR _spoolss_writeprinter(pipes_struct *p, SPOOL_Q_WRITEPRINTER *q_u, SPOOL_R return WERR_BADFID; } - (*buffer_written) = print_job_write(Printer->jobid, (char *)buffer, buffer_size); + if (!get_printer_snum(p, handle, &snum)) + return WERR_BADFID; + (*buffer_written) = print_job_write(snum, Printer->jobid, (char *)buffer, buffer_size); r_u->buffer_written = q_u->buffer_size2; @@ -5907,7 +5916,7 @@ WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u return WERR_BADFID; } - if (!print_job_exists(jobid)) { + if (!print_job_exists(snum, jobid)) { return WERR_INVALID_PRINTER_NAME; } @@ -5916,18 +5925,18 @@ WERROR _spoolss_setjob(pipes_struct *p, SPOOL_Q_SETJOB *q_u, SPOOL_R_SETJOB *r_u switch (command) { case JOB_CONTROL_CANCEL: case JOB_CONTROL_DELETE: - if (print_job_delete(&user, jobid, &errcode)) { + if (print_job_delete(&user, snum, jobid, &errcode)) { errcode = WERR_OK; } break; case JOB_CONTROL_PAUSE: - if (print_job_pause(&user, jobid, &errcode)) { + if (print_job_pause(&user, snum, jobid, &errcode)) { errcode = WERR_OK; } break; case JOB_CONTROL_RESTART: case JOB_CONTROL_RESUME: - if (print_job_resume(&user, jobid, &errcode)) { + if (print_job_resume(&user, snum, jobid, &errcode)) { errcode = WERR_OK; } break; diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index 710ba396d8d..89f05092b45 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -163,7 +163,7 @@ ssize_t write_file(files_struct *fsp, char *data, SMB_OFF_T pos, size_t n) int write_path = -1; if (fsp->print_file) - return print_job_write(fsp->print_jobid, data, n); + return print_job_write(SNUM(fsp->conn), fsp->print_jobid, data, n); if (!fsp->can_write) { errno = EPERM; diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 619ecd736aa..049dae98e3f 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -443,7 +443,7 @@ static void fill_printjob_info(connection_struct *conn, int snum, int uLevel, /* the client expects localtime */ t -= TimeDiff(t); - PACKI(desc,"W",pjobid_to_rap(queue->job)); /* uJobId */ + PACKI(desc,"W",pjobid_to_rap(snum,queue->job)); /* uJobId */ if (uLevel == 1) { PACKS(desc,"B21",queue->fs_user); /* szUserName */ PACKS(desc,"B",""); /* pad */ @@ -2181,11 +2181,14 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param char *str1 = param+2; char *str2 = skip_string(str1,1); char *p = skip_string(str2,1); - int jobid, errcode; + uint32 jobid; + int snum; + int errcode; extern struct current_user current_user; WERROR werr = WERR_OK; - jobid = rap_to_pjobid(SVAL(p,0)); + if(!rap_to_pjobid(SVAL(p,0),&snum,&jobid)) + return False; /* check it's a supported varient */ if (!(strcsequal(str1,"W") && strcsequal(str2,""))) @@ -2195,7 +2198,7 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param *rparam = REALLOC(*rparam,*rparam_len); *rdata_len = 0; - if (!print_job_exists(jobid)) { + if (!print_job_exists(snum, jobid)) { errcode = NERR_JobNotFound; goto out; } @@ -2204,15 +2207,15 @@ static BOOL api_RDosPrintJobDel(connection_struct *conn,uint16 vuid, char *param switch (function) { case 81: /* delete */ - if (print_job_delete(¤t_user, jobid, &werr)) + if (print_job_delete(¤t_user, snum, jobid, &werr)) errcode = NERR_Success; break; case 82: /* pause */ - if (print_job_pause(¤t_user, jobid, &werr)) + if (print_job_pause(¤t_user, snum, jobid, &werr)) errcode = NERR_Success; break; case 83: /* resume */ - if (print_job_resume(¤t_user, jobid, &werr)) + if (print_job_resume(¤t_user, snum, jobid, &werr)) errcode = NERR_Success; break; } @@ -2313,12 +2316,14 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha char *str1 = param+2; char *str2 = skip_string(str1,1); char *p = skip_string(str2,1); - int jobid; + uint32 jobid; + int snum; int uLevel = SVAL(p,2); int function = SVAL(p,4); int place, errcode; - jobid = rap_to_pjobid(SVAL(p,0)); + if(!rap_to_pjobid(SVAL(p,0),&snum,&jobid)) + return False; *rparam_len = 4; *rparam = REALLOC(*rparam,*rparam_len); @@ -2329,7 +2334,7 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha (!check_printjob_info(&desc,uLevel,str2))) return(False); - if (!print_job_exists(jobid)) { + if (!print_job_exists(snum, jobid)) { errcode=NERR_JobNotFound; goto out; } @@ -2341,14 +2346,14 @@ static BOOL api_PrintJobInfo(connection_struct *conn,uint16 vuid,char *param,cha /* change job place in the queue, data gives the new place */ place = SVAL(data,0); - if (print_job_set_place(jobid, place)) { + if (print_job_set_place(snum, jobid, place)) { errcode=NERR_Success; } break; case 0xb: /* change print job name, data gives the name */ - if (print_job_set_name(jobid, data)) { + if (print_job_set_name(snum, jobid, data)) { errcode=NERR_Success; } break; @@ -3011,8 +3016,8 @@ static BOOL api_WPrintJobGetInfo(connection_struct *conn,uint16 vuid, char *para if (strcmp(str1,"WWrLh") != 0) return False; if (!check_printjob_info(&desc,uLevel,str2)) return False; - jobid = rap_to_pjobid(SVAL(p,0)); - snum = print_job_snum(jobid); + if(!rap_to_pjobid(SVAL(p,0),&snum,&jobid)) + return False; if (snum < 0 || !VALID_SNUM(snum)) return(False); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 0ccdf7c241b..8f666910a51 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -354,10 +354,13 @@ int reply_ioctl(connection_struct *conn, switch (ioctl_code) { case IOCTL_QUERY_JOB_INFO: - SSVAL(p,0,fsp->print_jobid); /* Job number */ + { + uint16 rap_jobid = pjobid_to_rap(SNUM(fsp->conn), fsp->print_jobid); + SSVAL(p,0,rap_jobid); /* Job number */ srvstr_push(outbuf, p+2, global_myname, 15, STR_TERMINATE|STR_ASCII); srvstr_push(outbuf, p+18, lp_servicename(SNUM(conn)), 13, STR_TERMINATE|STR_ASCII); break; + } } END_PROFILE(SMBioctl); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 6f0d0238b0d..e1e65136597 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -382,8 +382,6 @@ BOOL reload_services(BOOL test) { BOOL ret; - set_register_printer_fn(); - if (lp_loaded()) { pstring fname; pstrcpy(fname,lp_configfile()); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index f1dfb39aacf..2532096dea3 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2970,9 +2970,11 @@ static int call_trans2ioctl(connection_struct *conn, char* inbuf, { char *pdata = *ppdata; files_struct *fsp = file_fsp(inbuf,smb_vwv15); - + if ((SVAL(inbuf,(smb_setup+4)) == LMCAT_SPL) && (SVAL(inbuf,(smb_setup+6)) == LMFUNC_GETJOBID)) { + uint16 rap_jobid; + pdata = Realloc(*ppdata, 32); if(pdata == NULL) return ERROR_DOS(ERRDOS,ERRnomem); @@ -2981,7 +2983,8 @@ static int call_trans2ioctl(connection_struct *conn, char* inbuf, /* NOTE - THIS IS ASCII ONLY AT THE MOMENT - NOT SURE IF OS/2 CAN ACCEPT THIS IN UNICODE. JRA. */ - SSVAL(pdata,0,fsp->print_jobid); /* Job number */ + rap_jobid = pjobid_to_rap(SNUM(fsp->conn), fsp->print_jobid); /* Job number */ + SSVAL(pdata,0,rap_jobid); /* Job number */ srvstr_push( outbuf, pdata + 2, global_myname, 15, STR_ASCII|STR_TERMINATE); /* Our NetBIOS name */ srvstr_push( outbuf, pdata+18, lp_servicename(SNUM(conn)), 13, STR_ASCII|STR_TERMINATE); /* Service name */ send_trans2_replies(outbuf,bufsize,*pparams,0,*ppdata,32); From a754c80ae0b71487cd2daf79d7928b6c00f15099 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 01:50:58 +0000 Subject: [PATCH 017/262] Use of uninitialized variable caught by valgrind. Jeremy. (This used to be commit 44410af397c386f58067679012856150b07b47e8) --- source3/smbd/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 9ac610ab5a9..e048201c4b1 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -797,7 +797,7 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password, } } } else if ((lp_security() != SEC_SHARE) && (vuser->homes_snum != -1) - && strequal(service, lp_servicename(vuser->homes_snum))) { + && strequal(service_in, lp_servicename(vuser->homes_snum))) { DATA_BLOB no_pw = data_blob(NULL, 0); DEBUG(5, ("making a connection to 'homes' service [%s] created at session setup time\n", service)); return make_connection_snum(vuser->homes_snum, From 5d840349bddead00cda36c3879691c879a14d4f3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 19:15:49 +0000 Subject: [PATCH 018/262] We have to look at the length before checking for "~" as the string may be shorter than 6 chars. Caught by valgrind. Jeremy. (This used to be commit b846bbfa831922b0be52e54804a46d7870895bfc) --- source3/smbd/mangle_hash2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index e2c4b43bc37..9d64728c7ac 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -202,13 +202,13 @@ static BOOL is_mangled_component(const char *name) M_DEBUG(0,("is_mangled_component %s ?\n", name)); - /* the best distinguishing characteristic is the ~ */ - if (name[6] != '~') return False; - /* check the length */ len = strlen(name); if (len > 12 || len < 8) return False; + /* the best distinguishing characteristic is the ~ */ + if (len > 7 && name[6] != '~') return False; + /* check extension */ if (len > 8) { if (name[8] != '.') return False; From 9154aa791ecdbad975ac23943af08ec2ef939f5e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 18 Jul 2002 22:22:30 +0000 Subject: [PATCH 019/262] Unneded extra check on len (This used to be commit e3b3c148208792ac2ccbfd468ad580b1264f9876) --- source3/smbd/mangle_hash2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/mangle_hash2.c b/source3/smbd/mangle_hash2.c index 9d64728c7ac..6b53cc72aa4 100644 --- a/source3/smbd/mangle_hash2.c +++ b/source3/smbd/mangle_hash2.c @@ -207,7 +207,7 @@ static BOOL is_mangled_component(const char *name) if (len > 12 || len < 8) return False; /* the best distinguishing characteristic is the ~ */ - if (len > 7 && name[6] != '~') return False; + if (name[6] != '~') return False; /* check extension */ if (len > 8) { From 2afc1ca42c6a945fa1385328cd1c69065829d233 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 18 Jul 2002 22:55:48 +0000 Subject: [PATCH 020/262] The previous code would not allow things like string_sub(str, "\\", "/", 0). It complained about an overflow of 0 bytes. Jeremy please check since you modified this last. (This used to be commit a5aad760061e21635319a9b5628990cf59b827ed) --- source3/lib/util_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 88a72f15360..7da4358e661 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -670,7 +670,7 @@ void string_sub(char *s,const char *pattern, const char *insert, size_t len) len = ls; while (lp <= ls && (p = strstr(s,pattern))) { - if (ls + (li-lp) >= len) { + if (ls + (li-lp) > len) { DEBUG(0,("ERROR: string overflow by %d in string_sub(%.50s, %d)\n", (int)(ls + (li-lp) - len), pattern, (int)len)); From 06ae9ac5d98a752d8ca17686a4a3b1786fbe520d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 18 Jul 2002 23:00:24 +0000 Subject: [PATCH 021/262] virtual registry framework with initial printing hooks. (This used to be commit a43d9788fa8823d678ee72470421b980165ec2b0) --- source3/Makefile.in | 5 +- source3/include/adt_tree.h | 38 +++ source3/include/includes.h | 1 + source3/include/rpc_reg.h | 43 +++- source3/lib/adt_tree.c | 414 +++++++++++++++++++++++++++++++ source3/registry/reg_cachehook.c | 96 +++++++ source3/registry/reg_db.c | 311 +++++++++++++++++++++++ source3/registry/reg_frontend.c | 357 ++++++-------------------- source3/registry/reg_printing.c | 243 ++++++++++++++++++ source3/rpc_server/srv_reg_nt.c | 198 +++++++++------ source3/script/mkproto.awk | 2 +- 11 files changed, 1351 insertions(+), 357 deletions(-) create mode 100644 source3/include/adt_tree.h create mode 100644 source3/lib/adt_tree.c create mode 100644 source3/registry/reg_cachehook.c create mode 100644 source3/registry/reg_db.c create mode 100644 source3/registry/reg_printing.c diff --git a/source3/Makefile.in b/source3/Makefile.in index b4f9c8c5e2e..765b22a7736 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -138,7 +138,7 @@ LIB_OBJ = lib/charcnv.o lib/debug.o lib/fault.o \ lib/md5.o lib/hmacmd5.o lib/iconv.o lib/smbpasswd.o \ nsswitch/wb_client.o nsswitch/wb_common.o \ lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \ - $(TDB_OBJ) + lib/adt_tree.o $(TDB_OBJ) READLINE_OBJ = lib/readline.o @@ -177,7 +177,8 @@ LIBMSRPC_SERVER_OBJ = libsmb/trust_passwd.o LIBMSRPC_PICOBJ = $(LIBMSRPC_OBJ:.o=.po) -REGISTRY_OBJ = registry/reg_frontend.o +REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \ + registry/reg_db.o RPC_SERVER_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o \ rpc_server/srv_lsa_hnd.o rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o \ diff --git a/source3/include/adt_tree.h b/source3/include/adt_tree.h new file mode 100644 index 00000000000..b1bf7ad85dc --- /dev/null +++ b/source3/include/adt_tree.h @@ -0,0 +1,38 @@ +/* + * Unix SMB/CIFS implementation. + * Generic Abstract Data Types + * Copyright (C) Gerald Carter 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ADT_TREE_H +#define ADT_TREE_H + +typedef struct _tree_node { + struct _tree_node *parent; + struct _tree_node **children; + int num_children; + char *key; + void *data_p; +} TREE_NODE; + +typedef struct _tree_root { + TREE_NODE *root; + int (*compare)(void* x, void *y); + void (*free)(void *p); +} SORTED_TREE; + +#endif diff --git a/source3/include/includes.h b/source3/include/includes.h index 435810a1bab..04d11afafb9 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -710,6 +710,7 @@ extern int errno; #include "messages.h" #include "charset.h" #include "dynconfig.h" +#include "adt_tree.h" #include "util_getent.h" diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 8ebfc888ed8..9c5f614f91f 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -65,6 +65,7 @@ #define KEY_HKLM "HKLM" #define KEY_HKU "HKU" +#define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print" /* Registry data types */ @@ -86,16 +87,52 @@ #define REG_FORCE_SHUTDOWN 0x001 #define REG_REBOOT_ON_SHUTDOWN 0x100 +/* structure to contain registry values */ + +typedef struct _RegistryValue { + fstring valuename; + uint16 type; + uint32 size; /* in bytes */ + union { + char *string; + uint32 dword; + uint8 *binary; + } data; +} REGISTRY_VALUE; + + +/* + * container for function pointers to enumeration routines + * for vitural registry view + */ + +typedef struct _reg_ops { + /* functions for enumerating subkeys and values */ + int (*subkey_fn)( char *key, char **subkeys ); + int (*subkey_specific_fn)( char *key, char** subkey, uint32 index ); + int (*value_fn) ( char *key, REGISTRY_VALUE **val ); + BOOL (*store_subkeys_fn)( char *key, char **subkeys, uint32 num_subkeys ); + BOOL (*store_values_fn)( char *key, REGISTRY_VALUE **val, uint32 num_values ); +} REGISTRY_OPS; + +typedef struct _reg_hook { + char *keyname; /* full path to name of key */ + REGISTRY_OPS *ops; /* registry function hooks */ +} REGISTRY_HOOK; + + + /* structure to store the registry handles */ typedef struct _RegistryKey { struct _RegistryKey *prev, *next; - fstring name; /* name of registry key */ POLICY_HND hnd; + fstring name; /* full name of registry key */ + REGISTRY_HOOK *hook; -} Registry_Key; +} REGISTRY_KEY; /* REG_Q_OPEN_HKCR */ @@ -123,7 +160,7 @@ typedef struct q_reg_open_hklm_info uint32 ptr; uint16 unknown_0; /* 0xE084 - 16 bit unknown */ uint16 unknown_1; /* random. changes */ - uint32 access_mask; /* 0x0000 0002 - 32 bit unknown */ + uint32 access_mask; } REG_Q_OPEN_HKLM; diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c new file mode 100644 index 00000000000..e3519c6c41d --- /dev/null +++ b/source3/lib/adt_tree.c @@ -0,0 +1,414 @@ +/* + * Unix SMB/CIFS implementation. + * Generic Abstract Data Types + * Copyright (C) Gerald Carter 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "includes.h" + + +/************************************************************************** + Initialize the tree's root. The cmp_fn is a callback function used + for comparision of two children + *************************************************************************/ + +SORTED_TREE* sorted_tree_init( int (cmp_fn)(void*, void*), + void (free_fn)(void*) ) +{ + SORTED_TREE *tree = NULL; + + if ( !(tree = (SORTED_TREE*)malloc( sizeof(SORTED_TREE) )) ) + return NULL; + + ZERO_STRUCTP( tree ); + + tree->compare = cmp_fn; + tree->free = free_fn; + + if ( !(tree->root = (TREE_NODE*)malloc( sizeof(TREE_NODE) )) ) { + SAFE_FREE( tree ); + return NULL; + } + + ZERO_STRUCTP( tree->root ); + + return tree; +} + + +/************************************************************************** + Delete a tree and free all allocated memory + *************************************************************************/ + +static void sorted_tree_destroy_children( TREE_NODE *root ) +{ + int i; + + if ( !root ) + return; + + for ( i=0; inum_children; i++ ) + { + sorted_tree_destroy_children( root->children[i] ); + } + + SAFE_FREE( root->children ); + SAFE_FREE( root->key ); + + return; +} + +/************************************************************************** + Delete a tree and free all allocated memory + *************************************************************************/ + +void sorted_tree_destroy( SORTED_TREE *tree ) +{ + if ( tree->root ) + sorted_tree_destroy_children( tree->root ); + + if ( tree->free ) + tree->free( tree->root ); + + SAFE_FREE( tree ); +} + +/************************************************************************** + Find the next child given a key string + *************************************************************************/ + +static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) +{ + TREE_NODE *infant = NULL; + TREE_NODE *child, *crib; + TREE_NODE **siblings; + int i, result; + + if ( !(infant = (TREE_NODE*)malloc( sizeof(TREE_NODE) )) ) + return NULL; + + ZERO_STRUCTP( infant ); + + infant->key = strdup( key ); + infant->parent = node; + + siblings = Realloc( node->children, sizeof(TREE_NODE*)*(node->num_children+1) ); + + if ( siblings ) + node->children = siblings; + + node->num_children++; + + /* first child */ + + if ( node->num_children == 1 ) { + DEBUG(11,("sorted_tree_birth_child: First child of node [%s]! [%s]\n", + node->key ? node->key : "NULL", infant->key )); + node->children[0] = infant; + } + else + { + /* + * multiple siblings .... (at least 2 children) + * + * work from the end of the list forward + * The last child is not set at this point + * Insert the new infanct in ascending order + * from left to right + */ + + for ( i = node->num_children-1; i>=1; i-- ) + { + crib = node->children[i]; + child = node->children[i-1]; + + DEBUG(10,("sorted_tree_birth_child: Looking for crib; infant -> [%s], child -> [%s]\n", + infant->key, child->key)); + + /* the strings should never match assuming that we + have called sorted_tree_find_child() first */ + + result = StrCaseCmp( infant->key, child->key ); + if ( result > 0 ) { + crib = infant; + break; + } + + crib = child; + } + } + + return infant; +} +/************************************************************************** + Find the next child given a key string + *************************************************************************/ + +static TREE_NODE* sorted_tree_find_child( TREE_NODE *node, char* key ) +{ + TREE_NODE *next = NULL; + int i, result; + + if ( !node ) { + DEBUG(0,("sorted_tree_find_child: NULL node passed into function!\n")); + return NULL; + } + + if ( !key ) { + DEBUG(0,("sorted_tree_find_child: NULL key string passed into function!\n")); + return NULL; + } + + for ( i=0; i<(node->num_children); i++ ) + { + result = StrCaseCmp( key, node->children[i]->key ); + + if ( result == 0 ) + next = node->children[i]; + + /* if result > 0 then we've gone to far because + the list of children is sorted by key name + If result == 0, then we have a match */ + + if ( !(result < 0) ) + break; + } + + DEBUG(11,("sorted_tree_find_child: Did %s find [%s]\n", + next ? "" : "not", key )); + + return next; +} + +/************************************************************************** + Add a new node into the tree given a key path and a blob of data + *************************************************************************/ + +BOOL sorted_tree_add( SORTED_TREE *tree, const char *path, void *data_p ) +{ + char *str, *base, *path2; + TREE_NODE *current, *next; + BOOL ret = True; + + DEBUG(8,("sorted_tree_add: Enter\n")); + + if ( !path || *path != '/' ) { + DEBUG(0,("sorted_tree_add: Attempt to add a node with a bad path [%s]\n", + path ? path : "NULL" )); + return False; + } + + if ( !tree ) { + DEBUG(0,("sorted_tree_add: Attempt to add a node to an uninitialized tree!\n")); + return False; + } + + /* move past the first '/' */ + + path++; + path2 = strdup( path ); + if ( !path2 ) { + DEBUG(0,("sorted_tree_add: strdup() failed on string [%s]!?!?!\n", path)); + return False; + } + + + /* + * this works sort of like a 'mkdir -p' call, possibly + * creating an entire path to the new node at once + * The path should be of the form ///... + */ + + base = path2; + str = path2; + current = tree->root; + + do { + /* break off the remaining part of the path */ + + str = strchr( str, '/' ); + if ( str ) + *str = '\0'; + + /* iterate to the next child--birth it if necessary */ + + next = sorted_tree_find_child( current, base ); + if ( !next ) { + next = sorted_tree_birth_child( current, base ); + if ( !next ) { + DEBUG(0,("sorted_tree_add: Failed to create new child!\n")); + ret = False; + goto done; + } + } + current = next; + + /* setup the next part of the path */ + + base = str; + if ( base ) { + *base = '/'; + base++; + str = base; + } + + } while ( base != NULL ); + + current->data_p = data_p; + + DEBUG(10,("sorted_tree_add: Successfully added node [%s] to tree\n", + path )); + + DEBUG(8,("sorted_tree_add: Exit\n")); + +done: + SAFE_FREE( path2 ); + return ret; +} + + +/************************************************************************** + Recursive routine to print out all children of a TREE_NODE + *************************************************************************/ + +static void sorted_tree_print_children( TREE_NODE *node, int debug, char *path ) +{ + int i; + int num_children; + pstring path2; + + if ( !node ) + return; + + + if ( node->key ) + DEBUG(debug,("%s: [%s] (%s)\n", path ? path : "NULL", node->key, + node->data_p ? "data" : "NULL" )); + + *path2 = '\0'; + if ( path ) + pstrcpy( path2, path ); + pstrcat( path2, node->key ? node->key : "NULL" ); + pstrcat( path2, "/" ); + + num_children = node->num_children; + for ( i=0; ichildren[i], debug, path2 ); + + +} + +/************************************************************************** + Dump the kys for a tree to the log file + *************************************************************************/ + +void sorted_tree_print_keys( SORTED_TREE *tree, int debug ) +{ + int i; + int num_children = tree->root->num_children; + + if ( tree->root->key ) + DEBUG(debug,("ROOT/: [%s] (%s)\n", tree->root->key, + tree->root->data_p ? "data" : "NULL" )); + + for ( i=0; iroot->children[i], debug, + tree->root->key ? tree->root->key : "ROOT/" ); + } + +} + +/************************************************************************** + return the data_p for for the node in tree matching the key string + The key string is the full path. We must break it apart and walk + the tree + *************************************************************************/ + +void* sorted_tree_find( SORTED_TREE *tree, char *key ) +{ + char *keystr, *base, *str; + TREE_NODE *current; + void *result = NULL; + + DEBUG(10,("sorted_tree_find: Enter [%s]\n", key ? key : "NULL" )); + + /* sanity checks first */ + + if ( !key ) { + DEBUG(0,("sorted_tree_find: Attempt to search tree using NULL search string!\n")); + return NULL; + } + + if ( !tree ) { + DEBUG(0,("sorted_tree_find: Attempt to search an uninitialized tree using string [%s]!\n", + key ? key : "NULL" )); + return NULL; + } + + if ( !tree->root ) + return NULL; + + /* make a copy to play with */ + + keystr = strdup( key ); + if ( !keystr ) { + DEBUG(0,("sorted_tree_find: strdup() failed on string [%s]!?!?!\n", key)); + return NULL; + } + + /* start breaking the path apart */ + + base = keystr; + str = keystr; + current = tree->root; + + do + { + /* break off the remaining part of the path */ + + str = strchr( str, '/' ); + if ( str ) + *str = '\0'; + + DEBUG(10,("sorted_tree_find: [loop] key => [%s]\n", base)); + + /* iterate to the next child */ + + current = sorted_tree_find_child( current, base ); + + /* setup the next part of the path */ + + base = str; + if ( base ) { + *base = '/'; + base++; + str = base; + } + + } while ( base && current ); + + if ( current ) + result = current->data_p; + + SAFE_FREE( keystr ); + + DEBUG(10,("sorted_tree_find: Exit\n")); + + return result; +} + + diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c new file mode 100644 index 00000000000..daf2f241800 --- /dev/null +++ b/source3/registry/reg_cachehook.c @@ -0,0 +1,96 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines + * Copyright (C) Gerald Carter 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Implementation of registry hook cache tree */ + +#include "includes.h" + +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_SRV + +static SORTED_TREE *cache_tree; + +/********************************************************************** + Initialize the cache tree + *********************************************************************/ + +BOOL reghook_cache_init( void ) +{ + cache_tree = sorted_tree_init( NULL, NULL ); + + return ( cache_tree == NULL ); +} + +/********************************************************************** + Add a new REGISTRY_HOOK to the cache. Note that the keyname + is not in the exact format that a SORTED_TREE expects. + *********************************************************************/ + +BOOL reghook_cache_add( REGISTRY_HOOK *hook ) +{ + pstring key; + + if ( !hook ) + return False; + + pstrcpy( key, "\\"); + pstrcat( key, hook->keyname ); + + pstring_sub( key, "\\", "/" ); + + DEBUG(10,("reghook_cache_add: Adding key [%s]\n", key)); + + return sorted_tree_add( cache_tree, key, hook ); +} + +/********************************************************************** + Initialize the cache tree + *********************************************************************/ + +REGISTRY_HOOK* reghook_cache_find( char *keyname ) +{ + char *key; + + if ( !keyname ) + return NULL; + + if ( (key = strdup( keyname )) == NULL ) { + DEBUG(0,("reghook_cache_find: strdup() failed for string [%s] !?!?!\n", + keyname)); + return NULL; + } + + string_sub( key, "\\", "/", 0 ); + + DEBUG(10,("reghook_cache_find: Searching for keyname [%s]\n", key)); + + return sorted_tree_find( cache_tree, key ) ; +} + +/********************************************************************** + Initialize the cache tree + *********************************************************************/ + +void reghook_dump_cache( int debuglevel ) +{ + DEBUG(debuglevel,("reghook_dump_cache: Starting cache dump now...\n")); + + sorted_tree_print_keys( cache_tree, debuglevel ); +} diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c new file mode 100644 index 00000000000..a521cdcdd05 --- /dev/null +++ b/source3/registry/reg_db.c @@ -0,0 +1,311 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines + * Copyright (C) Gerald Carter 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Implementation of internal registry database functions. */ + +#include "includes.h" + +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_SRV + +static TDB_CONTEXT *tdb_reg; + + +/*********************************************************************** + Open the registry data in the tdb + ***********************************************************************/ + +static BOOL init_registry_data( void ) +{ + pstring keyname; + char *subkeys[3]; + + /* HKEY_LOCAL_MACHINE */ + + pstrcpy( keyname, KEY_HKLM ); + subkeys[0] = "SYSTEM"; + if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM" ); + subkeys[0] = "CurrentControlSet"; + if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet" ); + subkeys[0] = "Control"; + subkeys[1] = "services"; + if ( !regdb_store_reg_keys( keyname, subkeys, 2 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control" ); + subkeys[0] = "Print"; + subkeys[1] = "ProduceOptions"; + if ( !regdb_store_reg_keys( keyname, subkeys, 2 )) + return False; + +#if 0 /* JERRY */ + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/Print" ); + subkeys[0] = "Environments"; + subkeys[1] = "Forms"; + subkeys[2] = "Printers"; + if ( !regdb_store_reg_keys( keyname, subkeys, 0 )) + return False; +#endif + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/ProductOptions" ); + if ( !regdb_store_reg_keys( keyname, subkeys, 0 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/services" ); + subkeys[0] = "Netlogon"; + if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon" ); + subkeys[0] = "parameters"; + if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + return False; + + pstrcpy( keyname, KEY_HKLM ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon/parameters" ); + if ( !regdb_store_reg_keys( keyname, subkeys, 0 )) + return False; + + + /* HKEY_USER */ + + pstrcpy( keyname, KEY_HKU ); + if ( !regdb_store_reg_keys( keyname, subkeys, 0 ) ) + return False; + + return True; +} + +/*********************************************************************** + Open the registry database + ***********************************************************************/ + +BOOL init_registry_db( void ) +{ + static pid_t local_pid; + + if (tdb_reg && local_pid == sys_getpid()) + return True; + + /* + * try to open first without creating so we can determine + * if we need to init the data in the registry + */ + + tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); + if ( !tdb_reg ) + { + tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + if ( !tdb_reg ) { + DEBUG(0,("init_registry: Failed to open registry %s (%s)\n", + lock_path("registry.tdb"), strerror(errno) )); + return False; + } + + DEBUG(10,("init_registry: Successfully created registry tdb\n")); + + /* create the registry here */ + if ( !init_registry_data() ) { + DEBUG(0,("init_registry: Failed to initiailize data in registry!\n")); + return False; + } + } + + local_pid = sys_getpid(); + + return True; +} + + + +/*********************************************************************** + Add subkey strings to the registry tdb under a defined key + fmt is the same format as tdb_pack except this function only supports + fstrings + + The full path to the registry key is used as database after the + \'s are converted to /'s. + ***********************************************************************/ + +BOOL regdb_store_reg_keys( char *keyname, char **subkeys, uint32 num_subkeys ) +{ + TDB_DATA kbuf, dbuf; + char *buffer, *tmpbuf; + int i = 0; + uint32 len, buflen; + BOOL ret = True; + + if ( !keyname ) + return False; + + /* allocate some initial memory */ + + buffer = malloc(sizeof(pstring)); + buflen = sizeof(pstring); + len = 0; + + /* store the number of subkeys */ + + len += tdb_pack(buffer+len, buflen-len, "d", num_subkeys); + + /* pack all the strings */ + + for (i=0; i buflen ) { + /* allocate some extra space */ + if ((tmpbuf = Realloc( buffer, len*2 )) == NULL) { + DEBUG(0,("store_reg_keys: Failed to realloc memory of size [%d]\n", len*2)); + ret = False; + goto done; + } + buffer = tmpbuf; + buflen = len*2; + + len = tdb_pack(buffer+len, buflen-len, "f", subkeys[i]); + } + } + + /* finally write out the data */ + + kbuf.dptr = keyname; + kbuf.dsize = strlen(keyname)+1; + dbuf.dptr = buffer; + dbuf.dsize = len; + if ( tdb_store( tdb_reg, kbuf, dbuf, TDB_REPLACE ) == -1) { + ret = False; + goto done; + } + +done: + SAFE_FREE( buffer ); + return ret; +} + +/*********************************************************************** + Retrieve an array of strings containing subkeys. Memory should be + released by the caller. The subkeys are stored in a catenated string + of null terminated character strings + ***********************************************************************/ + +int regdb_fetch_reg_keys( char* key, char **subkeys ) +{ + pstring path; + uint32 num_items; + TDB_DATA dbuf; + char *buf; + uint32 buflen, len; + int i; + char *s; + + + pstrcpy( path, key ); + + /* convert to key format */ + pstring_sub( path, "\\", "/" ); + + dbuf = tdb_fetch_by_string( tdb_reg, path ); + + buf = dbuf.dptr; + buflen = dbuf.dsize; + + if ( !buf ) { + DEBUG(5,("fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); + return 0; + } + + len = tdb_unpack( buf, buflen, "d", &num_items); + if (num_items) { + if ( (*subkeys = (char*)malloc(sizeof(fstring)*num_items)) == NULL ) { + DEBUG(0,("fetch_reg_keys: Failed to malloc memory for subkey array containing [%d] items!\n", + num_items)); + num_items = -1; + goto done; + } + } + + s = *subkeys; + for (i=0; i buflen ) { - /* allocate some extra space */ - if ((tmpbuf = Realloc( buffer, len*2 )) == NULL) { - DEBUG(0,("store_reg_keys: Failed to realloc memory of size [%d]\n", len*2)); - ret = False; - goto done; - } - buffer = tmpbuf; - buflen = len*2; - - len = tdb_pack(buffer+len, buflen-len, "f", subkeys[i]); - } - } - - /* finally write out the data */ - - kbuf.dptr = keyname; - kbuf.dsize = strlen(keyname)+1; - dbuf.dptr = buffer; - dbuf.dsize = len; - if ( tdb_store( tdb_reg, kbuf, dbuf, TDB_REPLACE ) == -1) { - ret = False; - goto done; - } + return regdb_store_reg_keys( key->name, subkeys, num_subkeys ); -done: - SAFE_FREE( buffer ); - return ret; } /*********************************************************************** - Retrieve an array of strings containing subkeys. Memory should be - released by the caller. The subkeys are stored in a catenated string - of null terminated character strings + High level wrapper function for storing registry values ***********************************************************************/ - -int fetch_reg_keys( char* key, char **subkeys ) + +BOOL store_reg_values( REGISTRY_KEY *key, REGISTRY_VALUE **val, uint32 num_values ) { - pstring path; - uint32 num_items; - TDB_DATA dbuf; - char *buf; - uint32 buflen, len; - int i; - char *s; - - - pstrcpy( path, key ); - - /* convert to key format */ - pstring_sub( path, "\\", "/" ); - - dbuf = tdb_fetch_by_string( tdb_reg, path ); - - buf = dbuf.dptr; - buflen = dbuf.dsize; - - if ( !buf ) { - DEBUG(5,("fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); - return 0; - } - - len = tdb_unpack( buf, buflen, "d", &num_items); - if (num_items) { - if ( (*subkeys = (char*)malloc(sizeof(fstring)*num_items)) == NULL ) { - DEBUG(0,("fetch_reg_keys: Failed to malloc memory for subkey array containing [%d] items!\n", - num_items)); - num_items = -1; - goto done; - } - } - - s = *subkeys; - for (i=0; ihook && key->hook->ops && key->hook->ops->subkey_fn ) + num_subkeys = key->hook->ops->subkey_fn( key->name, subkeys ); + else + num_subkeys = regdb_fetch_reg_keys( key->name, subkeys ); + + return num_subkeys; +} + +/*********************************************************************** + High level wrapper function for retreiving a specific registry subkey + given and index. + ***********************************************************************/ + +BOOL fetch_reg_keys_specific( REGISTRY_KEY *key, char** subkey, uint32 key_index ) +{ + BOOL result; + + if ( key->hook && key->hook->ops && key->hook->ops->subkey_specific_fn ) + result = key->hook->ops->subkey_specific_fn( key->name, subkey, key_index ); + else + result = regdb_fetch_reg_keys_specific( key->name, subkey, key_index ); + + return result; +} + + +/*********************************************************************** + High level wrapper function for enumerating registry values + ***********************************************************************/ + +int fetch_reg_values( REGISTRY_KEY *key, REGISTRY_VALUE **val ) +{ + int num_values; + + if ( key->hook && key->hook->ops && key->hook->ops->value_fn ) + num_values = key->hook->ops->value_fn( key->name, val ); + else + num_values = regdb_fetch_reg_values( key->name, val ); + + return num_values; +} + diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c new file mode 100644 index 00000000000..8144110d1f8 --- /dev/null +++ b/source3/registry/reg_printing.c @@ -0,0 +1,243 @@ +/* + * Unix SMB/CIFS implementation. + * RPC Pipe client / server routines + * Copyright (C) Gerald Carter 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* Implementation of registry virtual views for printing information */ + +#include "includes.h" + +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_RPC_SRV + +#define MAX_TOP_LEVEL_KEYS 3 + +/* some symbolic indexes into the top_level_keys */ + +#define KEY_INDEX_ENVIR 0 +#define KEY_INDEX_FORMS 1 +#define KEY_INDEX_PRINTER 2 + +static char *top_level_keys[MAX_TOP_LEVEL_KEYS] = { + "Environments", + "Forms", + "Printers" +}; + +/********************************************************************** + It is safe to assume that every registry path passed into on of + the exported functions here begins with KEY_PRINTING else + these functions would have never been called. This is a small utility + function to strip the beginning of the path and make a copy that the + caller can modify. Note that the caller is responsible for releasing + the memory allocated here. + **********************************************************************/ + +static char* trim_reg_path( char *path ) +{ + char *p; + + p = path + strlen(KEY_PRINTING); + + if ( *p ) + return strdup(p); + else + return NULL; +} + +/********************************************************************** + handle enumeration of subkeys below KEY_PRINTING. + *********************************************************************/ + +static int handle_printing_subpath( char *key, char **subkeys, uint32 index ) +{ + int result = 0; + char *p, *base; + int i; + + + /* + * break off the first part of the path + * topmost base **must** be one of the strings + * in top_level_keys[] + */ + + base = key; + p = strchr( key, '\\' ); + if ( p ) + *p = '\0'; + + for ( i=0; i[%s]\n", key)); + + path = trim_reg_path( key ); + + /* check to see if we are dealing with the top level key */ + + if ( !path ) + top_level = True; + + if ( top_level ) { + if ( ! (*subkeys = malloc( sizeof(top_level_keys) )) ) + goto done; + + num_subkeys = MAX_TOP_LEVEL_KEYS; + memcpy( *subkeys, top_level_keys, sizeof(top_level_keys) ); + } + else + num_subkeys = handle_printing_subpath( path, subkeys, -1 ); + +done: + SAFE_FREE( path ); + return num_subkeys; +} + +/********************************************************************** + Count the registry subkey names given a registry path. + Caller is responsible for freeing memory to **subkey + *********************************************************************/ + +BOOL printing_subkey_specific( char *key, char** subkey, uint32 index ) +{ + char *path; + BOOL top_level = False; + BOOL result = False; + + DEBUG(10,("printing_subkey_specific: key=>[%s], index=>[%d]\n", key, index)); + + path = trim_reg_path( key ); + + /* check to see if we are dealing with the top level key */ + + if ( !path ) + top_level = True; + + + + if ( top_level ) { + + /* make sure the index is in range */ + + if ( !(index < MAX_TOP_LEVEL_KEYS) ) + goto done; + + if ( !(*subkey = malloc( strlen(top_level_keys[index])+1 )) ) + goto done; + + strncpy( *subkey, top_level_keys[index], strlen(top_level_keys[index])+1 ); + + result = True; + } + else { + if ( handle_printing_subpath( path, subkey, index ) != -1 ) + result = True; + } + +done: + SAFE_FREE( path ); + + return result; +} + +/********************************************************************** + Enumerate registry values given a registry path. + Caller is responsible for freeing memory + *********************************************************************/ + +int printing_value_info( char *key, REGISTRY_VALUE **val ) +{ + DEBUG(10,("printing_value_info: key=>[%s]\n", key)); + + return 0; +} + +/********************************************************************** + Stub function which always returns failure since we don't want + people storing printing information directly via regostry calls + (for now at least) + *********************************************************************/ + +BOOL printing_store_subkey( char *key, char **subkeys, uint32 num_subkeys ) +{ + return False; +} + +/********************************************************************** + Stub function which always returns failure since we don't want + people storing printing information directly via regostry calls + (for now at least) + *********************************************************************/ + +BOOL printing_store_value( char *key, REGISTRY_VALUE **val, uint32 num_values ) +{ + return False; +} + +/* + * Table of function pointers for accessing printing data + */ + +REGISTRY_OPS printing_ops = { + printing_subkey_info, + printing_subkey_specific, + printing_value_info, + printing_store_subkey, + printing_store_value +}; + diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index b5511cfceb6..d5b2394b40f 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -1,11 +1,11 @@ /* * Unix SMB/CIFS implementation. * RPC Pipe client / server routines - * Copyright (C) Andrew Tridgell 1992-1997, - * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Jeremy Allison 2001. - * Copyright (C) Gerald Carter 2002. + * Copyright (C) Andrew Tridgell 1992-1997. + * Copyright (C) Luke Kenneth Casson Leighton 1996-1997. + * Copyright (C) Paul Ashton 1997. + * Copyright (C) Jeremy Allison 2001. + * Copyright (C) Gerald Carter 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,16 +33,16 @@ ((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) -static Registry_Key *regkeys_list; +static REGISTRY_KEY *regkeys_list; /****************************************************************** - free() function for Registry_Key + free() function for REGISTRY_KEY *****************************************************************/ static void free_reg_info(void *ptr) { - Registry_Key *info = (Registry_Key*)ptr; + REGISTRY_KEY *info = (REGISTRY_KEY*)ptr; DLIST_REMOVE(regkeys_list, info); @@ -50,12 +50,12 @@ static void free_reg_info(void *ptr) } /****************************************************************** - Find a registry key handle and return a Registry_Key + Find a registry key handle and return a REGISTRY_KEY *****************************************************************/ -static Registry_Key *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd) +static REGISTRY_KEY *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd) { - Registry_Key *regkey = NULL; + REGISTRY_KEY *regkey = NULL; if(!find_policy_by_hnd(p,hnd,(void **)®key)) { DEBUG(2,("find_regkey_index_by_hnd: Registry Key not found: ")); @@ -69,34 +69,87 @@ static Registry_Key *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd) /******************************************************************* Function for open a new registry handle and creating a handle Note that P should be valid & hnd should already have space + + When we open a key, we store the full path to the key as + HK[LM|U]\\\... *******************************************************************/ -static BOOL open_registry_key(pipes_struct *p, POLICY_HND *hnd, char *name, - uint32 access_granted) +static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY *parent, + char *subkeyname, uint32 access_granted ) { - Registry_Key *regkey = NULL; + REGISTRY_KEY *regkey = NULL; + pstring parent_keyname; + NTSTATUS result = NT_STATUS_OK; + int num_subkeys; + char *subkeys = NULL; + + if ( parent ) { + pstrcpy( parent_keyname, parent->name ); + pstrcat( parent_keyname, "\\" ); + } + else + *parent_keyname = '\0'; + - DEBUG(7,("open_registry_key: name = [%s]\n", name)); + DEBUG(7,("open_registry_key: name = [%s][%s]\n", parent_keyname, subkeyname)); /* All registry keys **must** have a name of non-zero length */ - if (!name || !*name ) - return False; + if (!subkeyname || !*subkeyname ) + return NT_STATUS_OBJECT_NAME_NOT_FOUND; - if ((regkey=(Registry_Key*)malloc(sizeof(Registry_Key))) == NULL) - return False; + if ((regkey=(REGISTRY_KEY*)malloc(sizeof(REGISTRY_KEY))) == NULL) + return NT_STATUS_NO_MEMORY; ZERO_STRUCTP( regkey ); DLIST_ADD( regkeys_list, regkey ); - /* copy the name and obtain a handle */ + /* copy the name */ - fstrcpy( regkey->name, name ); + pstrcpy( regkey->name, parent_keyname ); + pstrcat( regkey->name, subkeyname ); + + /* try to use en existing hook. Otherwise, try to lookup our own */ + + if ( parent && parent->hook ) + regkey->hook = parent->hook; + else + regkey->hook = reghook_cache_find( regkey->name ); + + if ( regkey->hook ) { + DEBUG(10,("open_registry_key: Assigned REGISTRY_HOOK to [%s]\n", + regkey->name )); + } + + /* check if the path really exists...num_subkeys should be >= 0 */ + + num_subkeys = fetch_reg_keys( regkey, &subkeys ); + + /* if the subkey count failed, bail out */ + + if ( num_subkeys == -1 ) { + SAFE_FREE( regkey ); + + /* don't really know what to return here */ + + result = NT_STATUS_ACCESS_DENIED; + } + else { + /* + * This would previously return NT_STATUS_TOO_MANY_SECRETS + * that doesn't sound quite right to me --jerry + */ + + if ( !create_policy_hnd( p, hnd, free_reg_info, regkey ) ) + result = NT_STATUS_OBJECT_NAME_NOT_FOUND; + } DEBUG(7,("open_registry_key: exit\n")); - return create_policy_hnd( p, hnd, free_reg_info, regkey ); + SAFE_FREE( subkeys ); + + return result; } /******************************************************************* @@ -106,7 +159,7 @@ static BOOL open_registry_key(pipes_struct *p, POLICY_HND *hnd, char *name, static BOOL close_registry_key(pipes_struct *p, POLICY_HND *hnd) { - Registry_Key *regkey = find_regkey_index_by_hnd(p, hnd); + REGISTRY_KEY *regkey = find_regkey_index_by_hnd(p, hnd); if ( !regkey ) { DEBUG(2,("close_registry_key: Invalid handle (%s:%u:%u)\n", OUR_HANDLE(hnd))); @@ -122,7 +175,7 @@ static BOOL close_registry_key(pipes_struct *p, POLICY_HND *hnd) retrieve information about the subkeys *******************************************************************/ -static BOOL get_subkey_information( Registry_Key *key, uint32 *maxnum, uint32 *maxlen ) +static BOOL get_subkey_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *maxlen ) { int num_subkeys, i; uint32 max_len; @@ -133,7 +186,11 @@ static BOOL get_subkey_information( Registry_Key *key, uint32 *maxnum, uint32 *m if ( !key ) return False; - num_subkeys = fetch_reg_keys( key->name, &subkeys ); + /* first use any registry hook available. + Fall back to tdb if non available */ + + num_subkeys = fetch_reg_keys( key, &subkeys ); + if ( num_subkeys == -1 ) return False; @@ -161,28 +218,36 @@ static BOOL get_subkey_information( Registry_Key *key, uint32 *maxnum, uint32 *m Samba tdb's (such as ntdrivers.tdb). *******************************************************************/ -static BOOL get_value_information( Registry_Key *key, uint32 *maxnum, +static BOOL get_value_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *maxlen, uint32 *maxsize ) { + REGISTRY_VALUE *val = NULL; + uint32 i, sizemax, lenmax; + int num_values; + if ( !key ) return False; - /* Hard coded key names first */ - /* nothing has valuies right now */ + num_values = fetch_reg_values( key, &val ); - *maxnum = 0; - *maxlen = 0; - *maxsize = 0; + if ( num_values == -1 ) + return False; + + + lenmax = sizemax = 0; + + for ( i=0; ipol, KEY_HKLM, 0x0)) - return NT_STATUS_OBJECT_NAME_NOT_FOUND; - - return NT_STATUS_OK; + return open_registry_key( p, &r_u->pol, NULL, KEY_HKLM, 0x0 ); } /******************************************************************* @@ -220,10 +282,7 @@ NTSTATUS _reg_open_hklm(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM * NTSTATUS _reg_open_hku(pipes_struct *p, REG_Q_OPEN_HKU *q_u, REG_R_OPEN_HKU *r_u) { - if (!open_registry_key(p, &r_u->pol, KEY_HKU, 0x0)) - return NT_STATUS_OBJECT_NAME_NOT_FOUND; - - return NT_STATUS_OK; + return open_registry_key( p, &r_u->pol, NULL, KEY_HKU, 0x0 ); } /******************************************************************* @@ -234,9 +293,8 @@ NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTR { POLICY_HND pol; fstring name; - pstring path; - int num_subkeys; - Registry_Key *key = find_regkey_index_by_hnd(p, &q_u->pol); + REGISTRY_KEY *key = find_regkey_index_by_hnd(p, &q_u->pol); + NTSTATUS result; DEBUG(5,("reg_open_entry: Enter\n")); @@ -244,26 +302,14 @@ NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTR return NT_STATUS_INVALID_HANDLE; rpcstr_pull(name,q_u->uni_name.buffer,sizeof(name),q_u->uni_name.uni_str_len*2,0); - - /* store the full path in the regkey_list */ - pstrcpy( path, key->name ); - pstrcat( path, "\\" ); - pstrcat( path, name ); - - DEBUG(5,("reg_open_entry: %s\n", path)); - - /* do a check on the name, here */ + DEBUG(5,("reg_open_entry: Enter\n")); - if ( (num_subkeys=fetch_reg_keys_count( path )) == -1 ) - return NT_STATUS_ACCESS_DENIED; + result = open_registry_key( p, &pol, key, name, 0x0 ); + + init_reg_r_open_entry( r_u, &pol, result ); - if (!open_registry_key(p, &pol, path, 0x0)) - return NT_STATUS_TOO_MANY_SECRETS; - - init_reg_r_open_entry(r_u, &pol, NT_STATUS_OK); - - DEBUG(5,("reg_open_entry: Exitn")); + DEBUG(5,("reg_open_entry: Exit\n")); return r_u->status; } @@ -280,7 +326,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) UNISTR2 *uni_key = NULL; BUFFER2 *buf = NULL; fstring name; - Registry_Key *key = find_regkey_index_by_hnd( p, &q_u->pol ); + REGISTRY_KEY *key = find_regkey_index_by_hnd( p, &q_u->pol ); DEBUG(5,("_reg_info: Enter\n")); @@ -346,7 +392,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) NTSTATUS _reg_query_key(pipes_struct *p, REG_Q_QUERY_KEY *q_u, REG_R_QUERY_KEY *r_u) { NTSTATUS status = NT_STATUS_OK; - Registry_Key *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); DEBUG(5,("_reg_query_key: Enter\n")); @@ -358,6 +404,7 @@ NTSTATUS _reg_query_key(pipes_struct *p, REG_Q_QUERY_KEY *q_u, REG_R_QUERY_KEY * if ( !get_value_information( regkey, &r_u->num_values, &r_u->max_valnamelen, &r_u->max_valbufsize ) ) return NT_STATUS_ACCESS_DENIED; + r_u->sec_desc = 0x00000078; /* size for key's sec_desc */ @@ -379,7 +426,7 @@ NTSTATUS _reg_query_key(pipes_struct *p, REG_Q_QUERY_KEY *q_u, REG_R_QUERY_KEY * NTSTATUS _reg_unknown_1a(pipes_struct *p, REG_Q_UNKNOWN_1A *q_u, REG_R_UNKNOWN_1A *r_u) { NTSTATUS status = NT_STATUS_OK; - Registry_Key *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); DEBUG(5,("_reg_unknown_1a: Enter\n")); @@ -401,8 +448,8 @@ NTSTATUS _reg_unknown_1a(pipes_struct *p, REG_Q_UNKNOWN_1A *q_u, REG_R_UNKNOWN_1 NTSTATUS _reg_enum_key(pipes_struct *p, REG_Q_ENUM_KEY *q_u, REG_R_ENUM_KEY *r_u) { NTSTATUS status = NT_STATUS_OK; - Registry_Key *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); - fstring subkey; + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + char *subkey; DEBUG(5,("_reg_enum_key: Enter\n")); @@ -412,9 +459,9 @@ NTSTATUS _reg_enum_key(pipes_struct *p, REG_Q_ENUM_KEY *q_u, REG_R_ENUM_KEY *r_u DEBUG(8,("_reg_enum_key: enumerating key [%s]\n", regkey->name)); - if ( !fetch_reg_keys_specific( regkey->name, subkey, q_u->key_index ) ) + if ( !fetch_reg_keys_specific( regkey, &subkey, q_u->key_index ) ) { - status = werror_to_ntstatus( WERR_NO_MORE_ITEMS ); + status = NT_STATUS_NO_MORE_ENTRIES; goto done; } @@ -427,6 +474,7 @@ NTSTATUS _reg_enum_key(pipes_struct *p, REG_Q_ENUM_KEY *q_u, REG_R_ENUM_KEY *r_u DEBUG(5,("_reg_enum_key: Exit\n")); done: + SAFE_FREE( subkey ); return status; } diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index c701ed41cda..eef7180e72b 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK/ ) { gotstart = 1; } From 687624fc187db6c07b946046e46cbbfac90aeafe Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:01:44 +0000 Subject: [PATCH 022/262] Another bug found by valgrind. Don't AND a src length of -1. Jeremy. (This used to be commit a67079882dd1b924d2e007e39b06da438533ef96) --- source3/lib/charcnv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index d42dc994b00..ea5bb87bc38 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -562,7 +562,8 @@ int pull_ucs2(const void *base_ptr, char *dest, const void *src, int dest_len, i } /* ucs2 is always a multiple of 2 bytes */ - src_len &= ~1; + if (src_len != -1) + src_len &= ~1; ret = convert_string(CH_UCS2, CH_UNIX, src, src_len, dest, dest_len); if (dest_len) dest[MIN(ret, dest_len-1)] = 0; From 8e004fe00d2ff0faea35025de895dc72531981d9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:21:45 +0000 Subject: [PATCH 023/262] Formatting fixups. Jeremy. (This used to be commit 4aa922a1afdd538f51d5eff4cb7af2694a88c591) --- source3/lib/util_str.c | 143 +++++++++++++++++++++-------------------- 1 file changed, 75 insertions(+), 68 deletions(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 7da4358e661..be967182053 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -879,68 +879,59 @@ smb_ucs2_t *all_string_sub_wa(smb_ucs2_t *s, const char *pattern, } /**************************************************************************** - splits out the front and back at a separator. + Splits out the front and back at a separator. ****************************************************************************/ + void split_at_last_component(char *path, char *front, char sep, char *back) { char *p = strrchr_m(path, sep); if (p != NULL) - { *p = 0; - } + if (front != NULL) - { pstrcpy(front, path); - } - if (p != NULL) - { + + if (p != NULL) { if (back != NULL) - { pstrcpy(back, p+1); - } *p = '\\'; - } - else - { + } else { if (back != NULL) - { back[0] = 0; - } } } - /**************************************************************************** -write an octal as a string + Write an octal as a string. ****************************************************************************/ + char *octal_string(int i) { static char ret[64]; - if (i == -1) { + if (i == -1) return "-1"; - } slprintf(ret, sizeof(ret)-1, "0%o", i); return ret; } /**************************************************************************** -truncate a string at a specified length + Truncate a string at a specified length. ****************************************************************************/ + char *string_truncate(char *s, int length) { - if (s && strlen(s) > length) { + if (s && strlen(s) > length) s[length] = 0; - } return s; } - /**************************************************************************** -strchr and strrchr_m are very hard to do on general multi-byte strings. -we convert via ucs2 for now + Strchr and strrchr_m are very hard to do on general multi-byte strings. + We convert via ucs2 for now. ****************************************************************************/ + char *strchr_m(const char *s, char c) { wpstring ws; @@ -949,7 +940,8 @@ char *strchr_m(const char *s, char c) push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE); p = strchr_w(ws, UCS2_CHAR(c)); - if (!p) return NULL; + if (!p) + return NULL; *p = 0; pull_ucs2_pstring(s2, ws); return (char *)(s+strlen(s2)); @@ -963,26 +955,29 @@ char *strrchr_m(const char *s, char c) push_ucs2(NULL, ws, s, sizeof(ws), STR_TERMINATE); p = strrchr_w(ws, UCS2_CHAR(c)); - if (!p) return NULL; + if (!p) + return NULL; *p = 0; pull_ucs2_pstring(s2, ws); return (char *)(s+strlen(s2)); } /******************************************************************* - convert a string to lower case + Convert a string to lower case. ********************************************************************/ + void strlower_m(char *s) { /* this is quite a common operation, so we want it to be fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ - while (*s && !(((unsigned char)s[0]) & 0x7F)) { - *s++ = tolower((unsigned char)*s); - } - if (!*s) return; + while (*s && !(((unsigned char)s[0]) & 0x7F)) + *s++ = tolower((unsigned char)*s); + + if (!*s) + return; /* I assume that lowercased string takes the same number of bytes * as source string even in UTF-8 encoding. (VIV) */ @@ -990,8 +985,9 @@ void strlower_m(char *s) } /******************************************************************* - duplicate convert a string to lower case + Duplicate convert a string to lower case. ********************************************************************/ + char *strdup_lower(const char *s) { char *t = strdup(s); @@ -1004,19 +1000,21 @@ char *strdup_lower(const char *s) } /******************************************************************* - convert a string to upper case + Convert a string to upper case. ********************************************************************/ + void strupper_m(char *s) { /* this is quite a common operation, so we want it to be fast. We optimise for the ascii case, knowing that all our supported multi-byte character sets are ascii-compatible (ie. they match for the first 128 chars) */ - while (*s && !(((unsigned char)s[0]) & 0x7F)) { - *s++ = toupper((unsigned char)*s); - } - if (!*s) return; + while (*s && !(((unsigned char)s[0]) & 0x7F)) + *s++ = toupper((unsigned char)*s); + + if (!*s) + return; /* I assume that lowercased string takes the same number of bytes * as source string even in multibyte encoding. (VIV) */ @@ -1024,8 +1022,9 @@ void strupper_m(char *s) } /******************************************************************* - convert a string to upper case + Convert a string to upper case. ********************************************************************/ + char *strdup_upper(const char *s) { char *t = strdup(s); @@ -1048,7 +1047,8 @@ char *binary_string(char *buf, int len) int i, j; const char *hex = "0123456789ABCDEF"; s = malloc(len * 3 + 1); - if (!s) return NULL; + if (!s) + return NULL; for (j=i=0;i> 4]; @@ -1059,8 +1059,8 @@ char *binary_string(char *buf, int len) return s; } - /* Just a typesafety wrapper for snprintf into a pstring */ + int pstr_sprintf(pstring s, const char *fmt, ...) { va_list ap; @@ -1072,8 +1072,8 @@ int pstr_sprintf(pstring s, const char *fmt, ...) return ret; } - /* Just a typesafety wrapper for snprintf into a fstring */ + int fstr_sprintf(fstring s, const char *fmt, ...) { va_list ap; @@ -1085,18 +1085,19 @@ int fstr_sprintf(fstring s, const char *fmt, ...) return ret; } - #ifndef HAVE_STRNDUP /******************************************************************* -some platforms don't have strndup + Some platforms don't have strndup. ********************************************************************/ + char *strndup(const char *s, size_t n) { char *ret; n = strnlen(s, n); ret = malloc(n+1); - if (!ret) return NULL; + if (!ret) + return NULL; memcpy(ret, s, n); ret[n] = 0; @@ -1111,13 +1112,12 @@ some platforms don't have strnlen size_t strnlen(const char *s, size_t n) { int i; - for (i=0; s[i] && i Date: Thu, 18 Jul 2002 23:22:11 +0000 Subject: [PATCH 024/262] Fixed off-by-one in all_string_sub also. Jeremy. (This used to be commit 8b0e47fc1f00c76dfccb6c2b58188d9a5ae67c65) --- source3/lib/util_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index be967182053..c1d20ffd2c0 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -801,7 +801,7 @@ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len) len = ls; while (lp <= ls && (p = strstr(s,pattern))) { - if (ls + (li-lp) >= len) { + if (ls + (li-lp) > len) { DEBUG(0,("ERROR: string overflow by %d in all_string_sub(%.50s, %d)\n", (int)(ls + (li-lp) - len), pattern, (int)len)); From 830540068547f6a4b2702b319fcb06b1cc611808 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:25:19 +0000 Subject: [PATCH 025/262] Don't crash on setfileinfo on printer fsp. Jeremy. (This used to be commit 3a9ceb6b3b915d3153d9cb107f447b13002c0f57) --- source3/smbd/trans2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 2532096dea3..7da1758decc 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2246,7 +2246,8 @@ static int call_trans2setfilepathinfo(connection_struct *conn, SSVAL(params,0,0); send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0); return(-1); - } + } else + return (UNIXERROR(ERRDOS,ERRbadpath)); } else { /* * Original code - this is an open file. From 958b0e35281647e32f8006d73ea67a238df80951 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:26:34 +0000 Subject: [PATCH 026/262] Prevent gcc warning about shadowed global "index". Jeremy (This used to be commit ae924493754220b8ad9e9767eb25f0f53a23327d) --- source3/include/rpc_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 9c5f614f91f..071ef408d40 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -109,7 +109,7 @@ typedef struct _RegistryValue { typedef struct _reg_ops { /* functions for enumerating subkeys and values */ int (*subkey_fn)( char *key, char **subkeys ); - int (*subkey_specific_fn)( char *key, char** subkey, uint32 index ); + int (*subkey_specific_fn)( char *key, char** subkey, uint32 indx ); int (*value_fn) ( char *key, REGISTRY_VALUE **val ); BOOL (*store_subkeys_fn)( char *key, char **subkeys, uint32 num_subkeys ); BOOL (*store_values_fn)( char *key, REGISTRY_VALUE **val, uint32 num_values ); From 7f98456fb3002623773b84c9a785ff6b3bc03b2f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:28:47 +0000 Subject: [PATCH 027/262] Add useful VALGRIND #ifdef. Jeremy. (This used to be commit 07716f3a2316fedfe9a3210fd1dad8f7d1e4d9c8) --- source3/lib/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/lib/util.c b/source3/lib/util.c index be108aa4056..51c926dd0b8 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -505,6 +505,7 @@ close the low 3 fd's and open dev/null in their place ********************************************************************/ void close_low_fds(void) { +#ifndef VALGRIND int fd; int i; close(0); close(1); @@ -525,6 +526,7 @@ void close_low_fds(void) return; } } +#endif } /**************************************************************************** From 923a3a0e1ce0a89a2e9be85cc224729610092b3f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:43:33 +0000 Subject: [PATCH 028/262] Previous fix was incorrect. len in string_sub and all_string_sub is number of *bytes*. >= check was correct, the len=0 case needed changing to len = ls + 1. Jeremy. (This used to be commit 06a4a6d30ade5ea4d123ae640393677c9a510763) --- source3/lib/util_str.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index c1d20ffd2c0..67d3b2108ed 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -667,10 +667,10 @@ void string_sub(char *s,const char *pattern, const char *insert, size_t len) li = (ssize_t)strlen(insert); if (len == 0) - len = ls; + len = ls + 1; /* len is number of *bytes* */ while (lp <= ls && (p = strstr(s,pattern))) { - if (ls + (li-lp) > len) { + if (ls + (li-lp) >= len) { DEBUG(0,("ERROR: string overflow by %d in string_sub(%.50s, %d)\n", (int)(ls + (li-lp) - len), pattern, (int)len)); @@ -798,10 +798,10 @@ void all_string_sub(char *s,const char *pattern,const char *insert, size_t len) return; if (len == 0) - len = ls; + len = ls + 1; /* len is number of *bytes* */ while (lp <= ls && (p = strstr(s,pattern))) { - if (ls + (li-lp) > len) { + if (ls + (li-lp) >= len) { DEBUG(0,("ERROR: string overflow by %d in all_string_sub(%.50s, %d)\n", (int)(ls + (li-lp) - len), pattern, (int)len)); From ce16d9a26df7a3012945ecaa5738cf63110fb5c5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 19 Jul 2002 04:00:21 +0000 Subject: [PATCH 029/262] fixed line buffer mode in XFILE thanks to tim for finding this bug (This used to be commit 91bff7545405ba88bc721f358ccdbf0aac0e3ba6) --- source3/lib/xfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/xfile.c b/source3/lib/xfile.c index 903dfb1ae0a..b5710f3a39e 100644 --- a/source3/lib/xfile.c +++ b/source3/lib/xfile.c @@ -171,7 +171,7 @@ int x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f) flush a bit more than necessary, but that is harmless */ if (f->buftype == X_IOLBF && f->bufused) { int i; - for (i=size-1; i>=0; i--) { + for (i=(size*nmemb)-1; i>=0; i--) { if (*(i+(const char *)p) == '\n') { x_fflush(f); break; From af3d6270d7ca17ba85e773634b3a56b0f1f601bf Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 19 Jul 2002 16:03:52 +0000 Subject: [PATCH 030/262] merge from SAMBA_2_2 spotted by Simo (This used to be commit 590c4ee076dcc14cb516c9ea04b47b1665c48ece) --- examples/LDAP/samba.schema | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/LDAP/samba.schema b/examples/LDAP/samba.schema index be088c74033..61dface0a20 100644 --- a/examples/LDAP/samba.schema +++ b/examples/LDAP/samba.schema @@ -119,8 +119,20 @@ attributetype ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID' # MUST ( uid $ uidNumber ) # MAY ( lmPassword $ ntPassword $ pwdLastSet $ acctFlags )) -objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL - DESC 'Samba Account' +#objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL +# DESC 'Samba Account' +# MUST ( uid $ rid ) +# MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ +# logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ +# displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $ +# description $ userWorkstations $ primaryGroupID $ domain )) + +## The X.500 data model (and therefore LDAPv3) says that each entry can +## only have one structural objectclass. OpenLDAP 2.0 does not enforce +## this currently but will in v2.1 + +objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY + DESC 'Samba Auxilary Account' MUST ( uid $ rid ) MAY ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $ logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ From 5f894476d86fd5a5b453e7043e087714c9e1c6ef Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Jul 2002 16:45:37 +0000 Subject: [PATCH 031/262] Formatting fixup. Fix shadow warning. Jeremy. (This used to be commit beb298898d5700dcd775ee3b1f1965e67214e9e5) --- source3/registry/reg_printing.c | 12 +- source3/smbd/nttrans.c | 831 ++++++++++++++++---------------- 2 files changed, 423 insertions(+), 420 deletions(-) diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 8144110d1f8..cbeab131425 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -153,13 +153,13 @@ done: Caller is responsible for freeing memory to **subkey *********************************************************************/ -BOOL printing_subkey_specific( char *key, char** subkey, uint32 index ) +BOOL printing_subkey_specific( char *key, char** subkey, uint32 indx ) { char *path; BOOL top_level = False; BOOL result = False; - DEBUG(10,("printing_subkey_specific: key=>[%s], index=>[%d]\n", key, index)); + DEBUG(10,("printing_subkey_specific: key=>[%s], index=>[%d]\n", key, indx)); path = trim_reg_path( key ); @@ -174,18 +174,18 @@ BOOL printing_subkey_specific( char *key, char** subkey, uint32 index ) /* make sure the index is in range */ - if ( !(index < MAX_TOP_LEVEL_KEYS) ) + if ( !(indx < MAX_TOP_LEVEL_KEYS) ) goto done; - if ( !(*subkey = malloc( strlen(top_level_keys[index])+1 )) ) + if ( !(*subkey = malloc( strlen(top_level_keys[indx])+1 )) ) goto done; - strncpy( *subkey, top_level_keys[index], strlen(top_level_keys[index])+1 ); + strncpy( *subkey, top_level_keys[indx], strlen(top_level_keys[indx])+1 ); result = True; } else { - if ( handle_printing_subpath( path, subkey, index ) != -1 ) + if ( handle_printing_subpath( path, subkey, indx ) != -1 ) result = True; } diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index e0a0da7a75b..e03588bf058 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -28,19 +28,19 @@ extern BOOL case_preserve; extern BOOL short_case_preserve; static char *known_nt_pipes[] = { - "\\LANMAN", - "\\srvsvc", - "\\samr", - "\\wkssvc", - "\\NETLOGON", - "\\ntlsa", - "\\ntsvcs", - "\\lsass", - "\\lsarpc", - "\\winreg", - "\\spoolss", - "\\netdfs", - NULL + "\\LANMAN", + "\\srvsvc", + "\\samr", + "\\wkssvc", + "\\NETLOGON", + "\\ntlsa", + "\\ntsvcs", + "\\lsass", + "\\lsarpc", + "\\winreg", + "\\spoolss", + "\\netdfs", + NULL }; /* Map generic permissions to file object specific permissions */ @@ -62,184 +62,183 @@ struct generic_mapping file_generic_mapping = { static int send_nt_replies(char *inbuf, char *outbuf, int bufsize, NTSTATUS nt_error, char *params, int paramsize, char *pdata, int datasize) { - extern int max_send; - int data_to_send = datasize; - int params_to_send = paramsize; - int useable_space; - char *pp = params; - char *pd = pdata; - int params_sent_thistime, data_sent_thistime, total_sent_thistime; - int alignment_offset = 3; - int data_alignment_offset = 0; + extern int max_send; + int data_to_send = datasize; + int params_to_send = paramsize; + int useable_space; + char *pp = params; + char *pd = pdata; + int params_sent_thistime, data_sent_thistime, total_sent_thistime; + int alignment_offset = 3; + int data_alignment_offset = 0; - /* - * Initially set the wcnt area to be 18 - this is true for all - * transNT replies. - */ + /* + * Initially set the wcnt area to be 18 - this is true for all + * transNT replies. + */ - set_message(outbuf,18,0,True); + set_message(outbuf,18,0,True); - if (NT_STATUS_V(nt_error)) { - ERROR_NT(nt_error); - } + if (NT_STATUS_V(nt_error)) + ERROR_NT(nt_error); - /* - * If there genuinely are no parameters or data to send just send - * the empty packet. - */ + /* + * If there genuinely are no parameters or data to send just send + * the empty packet. + */ - if(params_to_send == 0 && data_to_send == 0) { - if (!send_smb(smbd_server_fd(),outbuf)) - exit_server("send_nt_replies: send_smb failed."); - return 0; - } + if(params_to_send == 0 && data_to_send == 0) { + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("send_nt_replies: send_smb failed."); + return 0; + } - /* - * When sending params and data ensure that both are nicely aligned. - * Only do this alignment when there is also data to send - else - * can cause NT redirector problems. - */ + /* + * When sending params and data ensure that both are nicely aligned. + * Only do this alignment when there is also data to send - else + * can cause NT redirector problems. + */ - if (((params_to_send % 4) != 0) && (data_to_send != 0)) - data_alignment_offset = 4 - (params_to_send % 4); + if (((params_to_send % 4) != 0) && (data_to_send != 0)) + data_alignment_offset = 4 - (params_to_send % 4); - /* - * Space is bufsize minus Netbios over TCP header minus SMB header. - * The alignment_offset is to align the param bytes on a four byte - * boundary (2 bytes for data len, one byte pad). - * NT needs this to work correctly. - */ + /* + * Space is bufsize minus Netbios over TCP header minus SMB header. + * The alignment_offset is to align the param bytes on a four byte + * boundary (2 bytes for data len, one byte pad). + * NT needs this to work correctly. + */ - useable_space = bufsize - ((smb_buf(outbuf)+ - alignment_offset+data_alignment_offset) - - outbuf); + useable_space = bufsize - ((smb_buf(outbuf)+ + alignment_offset+data_alignment_offset) - + outbuf); - /* - * useable_space can never be more than max_send minus the - * alignment offset. - */ + /* + * useable_space can never be more than max_send minus the + * alignment offset. + */ - useable_space = MIN(useable_space, - max_send - (alignment_offset+data_alignment_offset)); + useable_space = MIN(useable_space, + max_send - (alignment_offset+data_alignment_offset)); - while (params_to_send || data_to_send) { + while (params_to_send || data_to_send) { - /* - * Calculate whether we will totally or partially fill this packet. - */ + /* + * Calculate whether we will totally or partially fill this packet. + */ - total_sent_thistime = params_to_send + data_to_send + - alignment_offset + data_alignment_offset; + total_sent_thistime = params_to_send + data_to_send + + alignment_offset + data_alignment_offset; - /* - * We can never send more than useable_space. - */ + /* + * We can never send more than useable_space. + */ - total_sent_thistime = MIN(total_sent_thistime, useable_space); + total_sent_thistime = MIN(total_sent_thistime, useable_space); - set_message(outbuf, 18, total_sent_thistime, True); + set_message(outbuf, 18, total_sent_thistime, True); - /* - * Set total params and data to be sent. - */ + /* + * Set total params and data to be sent. + */ - SIVAL(outbuf,smb_ntr_TotalParameterCount,paramsize); - SIVAL(outbuf,smb_ntr_TotalDataCount,datasize); + SIVAL(outbuf,smb_ntr_TotalParameterCount,paramsize); + SIVAL(outbuf,smb_ntr_TotalDataCount,datasize); - /* - * Calculate how many parameters and data we can fit into - * this packet. Parameters get precedence. - */ + /* + * Calculate how many parameters and data we can fit into + * this packet. Parameters get precedence. + */ - params_sent_thistime = MIN(params_to_send,useable_space); - data_sent_thistime = useable_space - params_sent_thistime; - data_sent_thistime = MIN(data_sent_thistime,data_to_send); + params_sent_thistime = MIN(params_to_send,useable_space); + data_sent_thistime = useable_space - params_sent_thistime; + data_sent_thistime = MIN(data_sent_thistime,data_to_send); - SIVAL(outbuf,smb_ntr_ParameterCount,params_sent_thistime); + SIVAL(outbuf,smb_ntr_ParameterCount,params_sent_thistime); - if(params_sent_thistime == 0) { - SIVAL(outbuf,smb_ntr_ParameterOffset,0); - SIVAL(outbuf,smb_ntr_ParameterDisplacement,0); - } else { - /* - * smb_ntr_ParameterOffset is the offset from the start of the SMB header to the - * parameter bytes, however the first 4 bytes of outbuf are - * the Netbios over TCP header. Thus use smb_base() to subtract - * them from the calculation. - */ + if(params_sent_thistime == 0) { + SIVAL(outbuf,smb_ntr_ParameterOffset,0); + SIVAL(outbuf,smb_ntr_ParameterDisplacement,0); + } else { + /* + * smb_ntr_ParameterOffset is the offset from the start of the SMB header to the + * parameter bytes, however the first 4 bytes of outbuf are + * the Netbios over TCP header. Thus use smb_base() to subtract + * them from the calculation. + */ - SIVAL(outbuf,smb_ntr_ParameterOffset, - ((smb_buf(outbuf)+alignment_offset) - smb_base(outbuf))); - /* - * Absolute displacement of param bytes sent in this packet. - */ + SIVAL(outbuf,smb_ntr_ParameterOffset, + ((smb_buf(outbuf)+alignment_offset) - smb_base(outbuf))); + /* + * Absolute displacement of param bytes sent in this packet. + */ - SIVAL(outbuf,smb_ntr_ParameterDisplacement,pp - params); - } + SIVAL(outbuf,smb_ntr_ParameterDisplacement,pp - params); + } - /* - * Deal with the data portion. - */ + /* + * Deal with the data portion. + */ - SIVAL(outbuf,smb_ntr_DataCount, data_sent_thistime); + SIVAL(outbuf,smb_ntr_DataCount, data_sent_thistime); - if(data_sent_thistime == 0) { - SIVAL(outbuf,smb_ntr_DataOffset,0); - SIVAL(outbuf,smb_ntr_DataDisplacement, 0); - } else { - /* - * The offset of the data bytes is the offset of the - * parameter bytes plus the number of parameters being sent this time. - */ + if(data_sent_thistime == 0) { + SIVAL(outbuf,smb_ntr_DataOffset,0); + SIVAL(outbuf,smb_ntr_DataDisplacement, 0); + } else { + /* + * The offset of the data bytes is the offset of the + * parameter bytes plus the number of parameters being sent this time. + */ - SIVAL(outbuf,smb_ntr_DataOffset,((smb_buf(outbuf)+alignment_offset) - - smb_base(outbuf)) + params_sent_thistime + data_alignment_offset); - SIVAL(outbuf,smb_ntr_DataDisplacement, pd - pdata); - } + SIVAL(outbuf,smb_ntr_DataOffset,((smb_buf(outbuf)+alignment_offset) - + smb_base(outbuf)) + params_sent_thistime + data_alignment_offset); + SIVAL(outbuf,smb_ntr_DataDisplacement, pd - pdata); + } - /* - * Copy the param bytes into the packet. - */ + /* + * Copy the param bytes into the packet. + */ - if(params_sent_thistime) - memcpy((smb_buf(outbuf)+alignment_offset),pp,params_sent_thistime); + if(params_sent_thistime) + memcpy((smb_buf(outbuf)+alignment_offset),pp,params_sent_thistime); - /* - * Copy in the data bytes - */ + /* + * Copy in the data bytes + */ - if(data_sent_thistime) - memcpy(smb_buf(outbuf)+alignment_offset+params_sent_thistime+ - data_alignment_offset,pd,data_sent_thistime); + if(data_sent_thistime) + memcpy(smb_buf(outbuf)+alignment_offset+params_sent_thistime+ + data_alignment_offset,pd,data_sent_thistime); - DEBUG(9,("nt_rep: params_sent_thistime = %d, data_sent_thistime = %d, useable_space = %d\n", - params_sent_thistime, data_sent_thistime, useable_space)); - DEBUG(9,("nt_rep: params_to_send = %d, data_to_send = %d, paramsize = %d, datasize = %d\n", - params_to_send, data_to_send, paramsize, datasize)); + DEBUG(9,("nt_rep: params_sent_thistime = %d, data_sent_thistime = %d, useable_space = %d\n", + params_sent_thistime, data_sent_thistime, useable_space)); + DEBUG(9,("nt_rep: params_to_send = %d, data_to_send = %d, paramsize = %d, datasize = %d\n", + params_to_send, data_to_send, paramsize, datasize)); - /* Send the packet */ - if (!send_smb(smbd_server_fd(),outbuf)) - exit_server("send_nt_replies: send_smb failed."); + /* Send the packet */ + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("send_nt_replies: send_smb failed."); - pp += params_sent_thistime; - pd += data_sent_thistime; + pp += params_sent_thistime; + pd += data_sent_thistime; - params_to_send -= params_sent_thistime; - data_to_send -= data_sent_thistime; + params_to_send -= params_sent_thistime; + data_to_send -= data_sent_thistime; - /* - * Sanity check - */ + /* + * Sanity check + */ - if(params_to_send < 0 || data_to_send < 0) { - DEBUG(0,("send_nt_replies failed sanity check pts = %d, dts = %d\n!!!", - params_to_send, data_to_send)); - return -1; - } - } + if(params_to_send < 0 || data_to_send < 0) { + DEBUG(0,("send_nt_replies failed sanity check pts = %d, dts = %d\n!!!", + params_to_send, data_to_send)); + return -1; + } + } - return 0; + return 0; } /**************************************************************************** @@ -1311,6 +1310,7 @@ static int call_nt_transact_create(connection_struct *conn, /**************************************************************************** Reply to a NT CANCEL request. ****************************************************************************/ + int reply_ntcancel(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { @@ -1332,6 +1332,7 @@ int reply_ntcancel(connection_struct *conn, /**************************************************************************** Reply to an unsolicited SMBNTtranss - just ignore it! ****************************************************************************/ + int reply_nttranss(connection_struct *conn, char *inbuf,char *outbuf,int length,int bufsize) { @@ -1345,6 +1346,7 @@ int reply_nttranss(connection_struct *conn, Reply to a notify change - queue the request and don't allow a directory to be opened. ****************************************************************************/ + static int call_nt_transact_notify_change(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, @@ -1445,107 +1447,107 @@ static int call_nt_transact_query_security_desc(connection_struct *conn, int length, int bufsize, char **ppsetup, char **ppparams, char **ppdata) { - uint32 max_data_count = IVAL(inbuf,smb_nt_MaxDataCount); - char *params = *ppparams; - char *data = *ppdata; - prs_struct pd; - SEC_DESC *psd = NULL; - size_t sd_size; - TALLOC_CTX *mem_ctx; + uint32 max_data_count = IVAL(inbuf,smb_nt_MaxDataCount); + char *params = *ppparams; + char *data = *ppdata; + prs_struct pd; + SEC_DESC *psd = NULL; + size_t sd_size; + TALLOC_CTX *mem_ctx; - files_struct *fsp = file_fsp(params,0); + files_struct *fsp = file_fsp(params,0); - if(!fsp) - return ERROR_DOS(ERRDOS,ERRbadfid); + if(!fsp) + return ERROR_DOS(ERRDOS,ERRbadfid); - DEBUG(3,("call_nt_transact_query_security_desc: file = %s\n", fsp->fsp_name )); + DEBUG(3,("call_nt_transact_query_security_desc: file = %s\n", fsp->fsp_name )); - params = Realloc(*ppparams, 4); - if(params == NULL) - return ERROR_DOS(ERRDOS,ERRnomem); + params = Realloc(*ppparams, 4); + if(params == NULL) + return ERROR_DOS(ERRDOS,ERRnomem); - *ppparams = params; + *ppparams = params; - if ((mem_ctx = talloc_init()) == NULL) { - DEBUG(0,("call_nt_transact_query_security_desc: talloc_init failed.\n")); - return ERROR_DOS(ERRDOS,ERRnomem); - } + if ((mem_ctx = talloc_init()) == NULL) { + DEBUG(0,("call_nt_transact_query_security_desc: talloc_init failed.\n")); + return ERROR_DOS(ERRDOS,ERRnomem); + } - /* - * Get the permissions to return. - */ + /* + * Get the permissions to return. + */ - if (!lp_nt_acl_support(SNUM(conn))) - sd_size = get_null_nt_acl(mem_ctx, &psd); - else - sd_size = conn->vfs_ops.fget_nt_acl(fsp, fsp->fd, &psd); + if (!lp_nt_acl_support(SNUM(conn))) + sd_size = get_null_nt_acl(mem_ctx, &psd); + else + sd_size = conn->vfs_ops.fget_nt_acl(fsp, fsp->fd, &psd); - if (sd_size == 0) { - talloc_destroy(mem_ctx); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } + if (sd_size == 0) { + talloc_destroy(mem_ctx); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } - DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %d.\n",(int)sd_size)); + DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %d.\n",(int)sd_size)); - SIVAL(params,0,(uint32)sd_size); + SIVAL(params,0,(uint32)sd_size); - if(max_data_count < sd_size) { + if(max_data_count < sd_size) { - send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_BUFFER_TOO_SMALL, - params, 4, *ppdata, 0); - talloc_destroy(mem_ctx); - return -1; - } + send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_BUFFER_TOO_SMALL, + params, 4, *ppdata, 0); + talloc_destroy(mem_ctx); + return -1; + } - /* - * Allocate the data we will point this at. - */ + /* + * Allocate the data we will point this at. + */ - data = Realloc(*ppdata, sd_size); - if(data == NULL) { - talloc_destroy(mem_ctx); - return ERROR_DOS(ERRDOS,ERRnomem); - } + data = Realloc(*ppdata, sd_size); + if(data == NULL) { + talloc_destroy(mem_ctx); + return ERROR_DOS(ERRDOS,ERRnomem); + } - *ppdata = data; + *ppdata = data; - memset(data, '\0', sd_size); + memset(data, '\0', sd_size); - /* - * Init the parse struct we will marshall into. - */ + /* + * Init the parse struct we will marshall into. + */ - prs_init(&pd, 0, mem_ctx, MARSHALL); + prs_init(&pd, 0, mem_ctx, MARSHALL); - /* - * Setup the prs_struct to point at the memory we just - * allocated. - */ + /* + * Setup the prs_struct to point at the memory we just + * allocated. + */ - prs_give_memory( &pd, data, (uint32)sd_size, False); + prs_give_memory( &pd, data, (uint32)sd_size, False); - /* - * Finally, linearize into the outgoing buffer. - */ + /* + * Finally, linearize into the outgoing buffer. + */ - if(!sec_io_desc( "sd data", &psd, &pd, 1)) { - DEBUG(0,("call_nt_transact_query_security_desc: Error in marshalling \ + if(!sec_io_desc( "sd data", &psd, &pd, 1)) { + DEBUG(0,("call_nt_transact_query_security_desc: Error in marshalling \ security descriptor.\n")); - /* - * Return access denied for want of a better error message.. - */ - talloc_destroy(mem_ctx); - return(UNIXERROR(ERRDOS,ERRnoaccess)); - } + /* + * Return access denied for want of a better error message.. + */ + talloc_destroy(mem_ctx); + return(UNIXERROR(ERRDOS,ERRnoaccess)); + } - /* - * Now we can delete the security descriptor. - */ + /* + * Now we can delete the security descriptor. + */ - talloc_destroy(mem_ctx); + talloc_destroy(mem_ctx); - send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 4, data, (int)sd_size); - return -1; + send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, params, 4, data, (int)sd_size); + return -1; } /**************************************************************************** @@ -1612,213 +1614,214 @@ static int call_nt_transact_ioctl(connection_struct *conn, /**************************************************************************** Reply to a SMBNTtrans. ****************************************************************************/ + int reply_nttrans(connection_struct *conn, - char *inbuf,char *outbuf,int length,int bufsize) + char *inbuf,char *outbuf,int length,int bufsize) { - int outsize = 0; + int outsize = 0; #if 0 /* Not used. */ - uint16 max_setup_count = CVAL(inbuf, smb_nt_MaxSetupCount); - uint32 max_parameter_count = IVAL(inbuf, smb_nt_MaxParameterCount); - uint32 max_data_count = IVAL(inbuf,smb_nt_MaxDataCount); + uint16 max_setup_count = CVAL(inbuf, smb_nt_MaxSetupCount); + uint32 max_parameter_count = IVAL(inbuf, smb_nt_MaxParameterCount); + uint32 max_data_count = IVAL(inbuf,smb_nt_MaxDataCount); #endif /* Not used. */ - uint32 total_parameter_count = IVAL(inbuf, smb_nt_TotalParameterCount); - uint32 total_data_count = IVAL(inbuf, smb_nt_TotalDataCount); - uint32 parameter_count = IVAL(inbuf,smb_nt_ParameterCount); - uint32 parameter_offset = IVAL(inbuf,smb_nt_ParameterOffset); - uint32 data_count = IVAL(inbuf,smb_nt_DataCount); - uint32 data_offset = IVAL(inbuf,smb_nt_DataOffset); - uint16 setup_count = 2*CVAL(inbuf,smb_nt_SetupCount); /* setup count is in *words* */ - uint16 function_code = SVAL( inbuf, smb_nt_Function); - char *params = NULL, *data = NULL, *setup = NULL; - uint32 num_params_sofar, num_data_sofar; - START_PROFILE(SMBnttrans); + uint32 total_parameter_count = IVAL(inbuf, smb_nt_TotalParameterCount); + uint32 total_data_count = IVAL(inbuf, smb_nt_TotalDataCount); + uint32 parameter_count = IVAL(inbuf,smb_nt_ParameterCount); + uint32 parameter_offset = IVAL(inbuf,smb_nt_ParameterOffset); + uint32 data_count = IVAL(inbuf,smb_nt_DataCount); + uint32 data_offset = IVAL(inbuf,smb_nt_DataOffset); + uint16 setup_count = 2*CVAL(inbuf,smb_nt_SetupCount); /* setup count is in *words* */ + uint16 function_code = SVAL( inbuf, smb_nt_Function); + char *params = NULL, *data = NULL, *setup = NULL; + uint32 num_params_sofar, num_data_sofar; + START_PROFILE(SMBnttrans); - if(global_oplock_break && (function_code == NT_TRANSACT_CREATE)) { - /* - * Queue this open message as we are the process of an oplock break. - */ + if(global_oplock_break && (function_code == NT_TRANSACT_CREATE)) { + /* + * Queue this open message as we are the process of an oplock break. + */ - DEBUG(2,("reply_nttrans: queueing message NT_TRANSACT_CREATE \ + DEBUG(2,("reply_nttrans: queueing message NT_TRANSACT_CREATE \ due to being in oplock break state.\n" )); - push_oplock_pending_smb_message( inbuf, length); - END_PROFILE(SMBnttrans); - return -1; - } + push_oplock_pending_smb_message( inbuf, length); + END_PROFILE(SMBnttrans); + return -1; + } - if (IS_IPC(conn) && (function_code != NT_TRANSACT_CREATE)) { - END_PROFILE(SMBnttrans); - return ERROR_DOS(ERRSRV,ERRaccess); - } + if (IS_IPC(conn) && (function_code != NT_TRANSACT_CREATE)) { + END_PROFILE(SMBnttrans); + return ERROR_DOS(ERRSRV,ERRaccess); + } - outsize = set_message(outbuf,0,0,True); + outsize = set_message(outbuf,0,0,True); - /* - * All nttrans messages we handle have smb_wct == 19 + setup_count. - * Ensure this is so as a sanity check. - */ + /* + * All nttrans messages we handle have smb_wct == 19 + setup_count. + * Ensure this is so as a sanity check. + */ - if(CVAL(inbuf, smb_wct) != 19 + (setup_count/2)) { - DEBUG(2,("Invalid smb_wct %d in nttrans call (should be %d)\n", - CVAL(inbuf, smb_wct), 19 + (setup_count/2))); - END_PROFILE(SMBnttrans); - return ERROR_DOS(ERRSRV,ERRerror); - } + if(CVAL(inbuf, smb_wct) != 19 + (setup_count/2)) { + DEBUG(2,("Invalid smb_wct %d in nttrans call (should be %d)\n", + CVAL(inbuf, smb_wct), 19 + (setup_count/2))); + END_PROFILE(SMBnttrans); + return ERROR_DOS(ERRSRV,ERRerror); + } - /* Allocate the space for the setup, the maximum needed parameters and data */ + /* Allocate the space for the setup, the maximum needed parameters and data */ - if(setup_count > 0) - setup = (char *)malloc(setup_count); - if (total_parameter_count > 0) - params = (char *)malloc(total_parameter_count); - if (total_data_count > 0) - data = (char *)malloc(total_data_count); + if(setup_count > 0) + setup = (char *)malloc(setup_count); + if (total_parameter_count > 0) + params = (char *)malloc(total_parameter_count); + if (total_data_count > 0) + data = (char *)malloc(total_data_count); - if ((total_parameter_count && !params) || (total_data_count && !data) || - (setup_count && !setup)) { + if ((total_parameter_count && !params) || (total_data_count && !data) || + (setup_count && !setup)) { + SAFE_FREE(setup); + SAFE_FREE(params); + SAFE_FREE(data); + DEBUG(0,("reply_nttrans : Out of memory\n")); + END_PROFILE(SMBnttrans); + return ERROR_DOS(ERRDOS,ERRnomem); + } + + /* Copy the param and data bytes sent with this request into the params buffer */ + num_params_sofar = parameter_count; + num_data_sofar = data_count; + + if (parameter_count > total_parameter_count || data_count > total_data_count) + exit_server("reply_nttrans: invalid sizes in packet."); + + if(setup) { + memcpy( setup, &inbuf[smb_nt_SetupStart], setup_count); + DEBUG(10,("reply_nttrans: setup_count = %d\n", setup_count)); + dump_data(10, setup, setup_count); + } + if(params) { + memcpy( params, smb_base(inbuf) + parameter_offset, parameter_count); + DEBUG(10,("reply_nttrans: parameter_count = %d\n", parameter_count)); + dump_data(10, params, parameter_count); + } + if(data) { + memcpy( data, smb_base(inbuf) + data_offset, data_count); + DEBUG(10,("reply_nttrans: data_count = %d\n",data_count)); + dump_data(10, data, data_count); + } + + if(num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { + /* We need to send an interim response then receive the rest + of the parameter/data bytes */ + outsize = set_message(outbuf,0,0,True); + if (!send_smb(smbd_server_fd(),outbuf)) + exit_server("reply_nttrans: send_smb failed."); + + while( num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { + BOOL ret; + + ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); + + if((ret && (CVAL(inbuf, smb_com) != SMBnttranss)) || !ret) { + outsize = set_message(outbuf,0,0,True); + if(ret) { + DEBUG(0,("reply_nttrans: Invalid secondary nttrans packet\n")); + } else { + DEBUG(0,("reply_nttrans: %s in getting secondary nttrans response.\n", + (smb_read_error == READ_ERROR) ? "error" : "timeout" )); + } + SAFE_FREE(params); + SAFE_FREE(data); + SAFE_FREE(setup); + END_PROFILE(SMBnttrans); + return ERROR_DOS(ERRSRV,ERRerror); + } + + /* Revise total_params and total_data in case they have changed downwards */ + total_parameter_count = IVAL(inbuf, smb_nts_TotalParameterCount); + total_data_count = IVAL(inbuf, smb_nts_TotalDataCount); + num_params_sofar += (parameter_count = IVAL(inbuf,smb_nts_ParameterCount)); + num_data_sofar += ( data_count = IVAL(inbuf, smb_nts_DataCount)); + if (num_params_sofar > total_parameter_count || num_data_sofar > total_data_count) + exit_server("reply_nttrans2: data overflow in secondary nttrans packet"); + + memcpy( ¶ms[ IVAL(inbuf, smb_nts_ParameterDisplacement)], + smb_base(inbuf) + IVAL(inbuf, smb_nts_ParameterOffset), parameter_count); + memcpy( &data[IVAL(inbuf, smb_nts_DataDisplacement)], + smb_base(inbuf)+ IVAL(inbuf, smb_nts_DataOffset), data_count); + } + } + + if (Protocol >= PROTOCOL_NT1) + SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_IS_LONG_NAME); + + /* Now we must call the relevant NT_TRANS function */ + switch(function_code) { + case NT_TRANSACT_CREATE: + START_PROFILE_NESTED(NT_transact_create); + outsize = call_nt_transact_create(conn, inbuf, outbuf, + length, bufsize, + &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_create); + break; + case NT_TRANSACT_IOCTL: + START_PROFILE_NESTED(NT_transact_ioctl); + outsize = call_nt_transact_ioctl(conn, inbuf, outbuf, + length, bufsize, + &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_ioctl); + break; + case NT_TRANSACT_SET_SECURITY_DESC: + START_PROFILE_NESTED(NT_transact_set_security_desc); + outsize = call_nt_transact_set_security_desc(conn, inbuf, outbuf, + length, bufsize, + &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_set_security_desc); + break; + case NT_TRANSACT_NOTIFY_CHANGE: + START_PROFILE_NESTED(NT_transact_notify_change); + outsize = call_nt_transact_notify_change(conn, inbuf, outbuf, + length, bufsize, + &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_notify_change); + break; + case NT_TRANSACT_RENAME: + START_PROFILE_NESTED(NT_transact_rename); + outsize = call_nt_transact_rename(conn, inbuf, outbuf, + length, bufsize, + &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_rename); + break; + + case NT_TRANSACT_QUERY_SECURITY_DESC: + START_PROFILE_NESTED(NT_transact_query_security_desc); + outsize = call_nt_transact_query_security_desc(conn, inbuf, outbuf, + length, bufsize, + &setup, ¶ms, &data); + END_PROFILE_NESTED(NT_transact_query_security_desc); + break; + default: + /* Error in request */ + DEBUG(0,("reply_nttrans: Unknown request %d in nttrans call\n", function_code)); + SAFE_FREE(setup); + SAFE_FREE(params); + SAFE_FREE(data); + END_PROFILE(SMBnttrans); + return ERROR_DOS(ERRSRV,ERRerror); + } + + /* As we do not know how many data packets will need to be + returned here the various call_nt_transact_xxxx calls + must send their own. Thus a call_nt_transact_xxxx routine only + returns a value other than -1 when it wants to send + an error packet. + */ + SAFE_FREE(setup); SAFE_FREE(params); SAFE_FREE(data); - DEBUG(0,("reply_nttrans : Out of memory\n")); - END_PROFILE(SMBnttrans); - return ERROR_DOS(ERRDOS,ERRnomem); - } - - /* Copy the param and data bytes sent with this request into - the params buffer */ - num_params_sofar = parameter_count; - num_data_sofar = data_count; - - if (parameter_count > total_parameter_count || data_count > total_data_count) - exit_server("reply_nttrans: invalid sizes in packet."); - - if(setup) { - memcpy( setup, &inbuf[smb_nt_SetupStart], setup_count); - DEBUG(10,("reply_nttrans: setup_count = %d\n", setup_count)); - dump_data(10, setup, setup_count); - } - if(params) { - memcpy( params, smb_base(inbuf) + parameter_offset, parameter_count); - DEBUG(10,("reply_nttrans: parameter_count = %d\n", parameter_count)); - dump_data(10, params, parameter_count); - } - if(data) { - memcpy( data, smb_base(inbuf) + data_offset, data_count); - DEBUG(10,("reply_nttrans: data_count = %d\n",data_count)); - dump_data(10, data, data_count); - } - - if(num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { - /* We need to send an interim response then receive the rest - of the parameter/data bytes */ - outsize = set_message(outbuf,0,0,True); - if (!send_smb(smbd_server_fd(),outbuf)) - exit_server("reply_nttrans: send_smb failed."); - - while( num_data_sofar < total_data_count || num_params_sofar < total_parameter_count) { - BOOL ret; - - ret = receive_next_smb(inbuf,bufsize,SMB_SECONDARY_WAIT); - - if((ret && (CVAL(inbuf, smb_com) != SMBnttranss)) || !ret) { - outsize = set_message(outbuf,0,0,True); - if(ret) { - DEBUG(0,("reply_nttrans: Invalid secondary nttrans packet\n")); - } else { - DEBUG(0,("reply_nttrans: %s in getting secondary nttrans response.\n", - (smb_read_error == READ_ERROR) ? "error" : "timeout" )); - } - SAFE_FREE(params); - SAFE_FREE(data); - SAFE_FREE(setup); END_PROFILE(SMBnttrans); - return ERROR_DOS(ERRSRV,ERRerror); - } - - /* Revise total_params and total_data in case they have changed downwards */ - total_parameter_count = IVAL(inbuf, smb_nts_TotalParameterCount); - total_data_count = IVAL(inbuf, smb_nts_TotalDataCount); - num_params_sofar += (parameter_count = IVAL(inbuf,smb_nts_ParameterCount)); - num_data_sofar += ( data_count = IVAL(inbuf, smb_nts_DataCount)); - if (num_params_sofar > total_parameter_count || num_data_sofar > total_data_count) - exit_server("reply_nttrans2: data overflow in secondary nttrans packet"); - - memcpy( ¶ms[ IVAL(inbuf, smb_nts_ParameterDisplacement)], - smb_base(inbuf) + IVAL(inbuf, smb_nts_ParameterOffset), parameter_count); - memcpy( &data[IVAL(inbuf, smb_nts_DataDisplacement)], - smb_base(inbuf)+ IVAL(inbuf, smb_nts_DataOffset), data_count); - } - } - - if (Protocol >= PROTOCOL_NT1) - SSVAL(outbuf,smb_flg2,SVAL(outbuf,smb_flg2) | FLAGS2_IS_LONG_NAME); - - /* Now we must call the relevant NT_TRANS function */ - switch(function_code) { - case NT_TRANSACT_CREATE: - START_PROFILE_NESTED(NT_transact_create); - outsize = call_nt_transact_create(conn, inbuf, outbuf, length, bufsize, - &setup, ¶ms, &data); - END_PROFILE_NESTED(NT_transact_create); - break; - case NT_TRANSACT_IOCTL: - START_PROFILE_NESTED(NT_transact_ioctl); - outsize = call_nt_transact_ioctl(conn, - inbuf, outbuf, length, bufsize, - &setup, ¶ms, &data); - END_PROFILE_NESTED(NT_transact_ioctl); - break; - case NT_TRANSACT_SET_SECURITY_DESC: - START_PROFILE_NESTED(NT_transact_set_security_desc); - outsize = call_nt_transact_set_security_desc(conn, inbuf, outbuf, - length, bufsize, - &setup, ¶ms, &data); - END_PROFILE_NESTED(NT_transact_set_security_desc); - break; - case NT_TRANSACT_NOTIFY_CHANGE: - START_PROFILE_NESTED(NT_transact_notify_change); - outsize = call_nt_transact_notify_change(conn, inbuf, outbuf, - length, bufsize, - &setup, ¶ms, &data); - END_PROFILE_NESTED(NT_transact_notify_change); - break; - case NT_TRANSACT_RENAME: - START_PROFILE_NESTED(NT_transact_rename); - outsize = call_nt_transact_rename(conn, inbuf, outbuf, length, - bufsize, - &setup, ¶ms, &data); - END_PROFILE_NESTED(NT_transact_rename); - break; - - case NT_TRANSACT_QUERY_SECURITY_DESC: - START_PROFILE_NESTED(NT_transact_query_security_desc); - outsize = call_nt_transact_query_security_desc(conn, inbuf, outbuf, - length, bufsize, - &setup, ¶ms, &data); - END_PROFILE_NESTED(NT_transact_query_security_desc); - break; - default: - /* Error in request */ - DEBUG(0,("reply_nttrans: Unknown request %d in nttrans call\n", function_code)); - SAFE_FREE(setup); - SAFE_FREE(params); - SAFE_FREE(data); - END_PROFILE(SMBnttrans); - return ERROR_DOS(ERRSRV,ERRerror); - } - - /* As we do not know how many data packets will need to be - returned here the various call_nt_transact_xxxx calls - must send their own. Thus a call_nt_transact_xxxx routine only - returns a value other than -1 when it wants to send - an error packet. - */ - - SAFE_FREE(setup); - SAFE_FREE(params); - SAFE_FREE(data); - END_PROFILE(SMBnttrans); - return outsize; /* If a correct response was needed the call_nt_transact_xxxx - calls have already sent it. If outsize != -1 then it is - returning an error packet. */ + return outsize; /* If a correct response was needed the call_nt_transact_xxxx + calls have already sent it. If outsize != -1 then it is + returning an error packet. */ } From 80c8fe63d2d2149ff9d2294da281d61a683e27ea Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Jul 2002 17:14:19 +0000 Subject: [PATCH 032/262] Allow trans2 and nttrans messages to be processed in oplock break state. As noticed by Lev Iserovich this seems to fix a problem with oplock breaks and Win2k, and we are protected from problems by existing code in trans2.c and nttrans.c Jeremy. (This used to be commit e3f7d6c03f100962395763a5066313d60b4761d0) --- source3/smbd/nttrans.c | 8 +++++--- source3/smbd/process.c | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index e03588bf058..8f6b4ab374e 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1636,13 +1636,15 @@ int reply_nttrans(connection_struct *conn, uint32 num_params_sofar, num_data_sofar; START_PROFILE(SMBnttrans); - if(global_oplock_break && (function_code == NT_TRANSACT_CREATE)) { + if(global_oplock_break && + ((function_code == NT_TRANSACT_CREATE) || + (function_code == NT_TRANSACT_RENAME))) { /* * Queue this open message as we are the process of an oplock break. */ - DEBUG(2,("reply_nttrans: queueing message NT_TRANSACT_CREATE \ -due to being in oplock break state.\n" )); + DEBUG(2,("reply_nttrans: queueing message code 0x%x \ +due to being in oplock break state.\n", (unsigned int)function_code )); push_oplock_pending_smb_message( inbuf, length); END_PROFILE(SMBnttrans); diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 43d3c6c5314..0363165914a 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -386,7 +386,7 @@ static struct smb_message_struct /* 0x22 */ { "SMBsetattrE",reply_setattrE,AS_USER | NEED_WRITE }, /* 0x23 */ { "SMBgetattrE",reply_getattrE,AS_USER }, /* 0x24 */ { "SMBlockingX",reply_lockingX,AS_USER }, -/* 0x25 */ { "SMBtrans",reply_trans,AS_USER | CAN_IPC | QUEUE_IN_OPLOCK}, +/* 0x25 */ { "SMBtrans",reply_trans,AS_USER | CAN_IPC }, /* 0x26 */ { "SMBtranss",NULL,AS_USER | CAN_IPC}, /* 0x27 */ { "SMBioctl",reply_ioctl,0}, /* 0x28 */ { "SMBioctls",NULL,AS_USER}, @@ -399,7 +399,7 @@ static struct smb_message_struct /* 0x2f */ { "SMBwriteX",reply_write_and_X,AS_USER | CAN_IPC }, /* 0x30 */ { NULL, NULL, 0 }, /* 0x31 */ { NULL, NULL, 0 }, -/* 0x32 */ { "SMBtrans2", reply_trans2, AS_USER | QUEUE_IN_OPLOCK | CAN_IPC }, +/* 0x32 */ { "SMBtrans2", reply_trans2, AS_USER | CAN_IPC }, /* 0x33 */ { "SMBtranss2", reply_transs2, AS_USER}, /* 0x34 */ { "SMBfindclose", reply_findclose,AS_USER}, /* 0x35 */ { "SMBfindnclose", reply_findnclose, AS_USER}, From 9fe3bd1259e7bda901f7a264bd7fc88c72d2112f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 19 Jul 2002 18:49:44 +0000 Subject: [PATCH 033/262] * refactored registry operations some. subkey lists and registry values are now passed around in containers (REGSUBKEY_CTR & REGVAL_CTR) which each possess a TALLOC_CTX. * removed subkey_specific_fn() from REGISTRY_OPS. Is implemented in the form of a wrapper * temporarily broke the printing registry ops. * implemented inheritence for the data_p of nodes in a SORTED_TREE * All REGISTRY_KEY instances now store a valid REGISTRY_HOOK since the default REGOSTRY_OPS structure is stored in the root of the cache_tree. * Probably some other change I forgot.... T (This used to be commit e7b55e8f017e638342d9c8c1a9259000745a0298) --- source3/include/rpc_reg.h | 33 +++-- source3/lib/adt_tree.c | 47 ++++--- source3/registry/reg_cachehook.c | 4 +- source3/registry/reg_db.c | 147 ++++++++++------------ source3/registry/reg_frontend.c | 209 +++++++++++++++++++++++++++---- source3/registry/reg_printing.c | 199 ++++++++++++++++++++--------- source3/rpc_server/srv_reg_nt.c | 95 +++++++------- 7 files changed, 491 insertions(+), 243 deletions(-) diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 071ef408d40..7dbf49cf84f 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -66,7 +66,7 @@ #define KEY_HKLM "HKLM" #define KEY_HKU "HKU" #define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print" - +#define KEY_TREE_ROOT "" /* Registry data types */ @@ -89,7 +89,7 @@ /* structure to contain registry values */ -typedef struct _RegistryValue { +typedef struct { fstring valuename; uint16 type; uint32 size; /* in bytes */ @@ -100,22 +100,37 @@ typedef struct _RegistryValue { } data; } REGISTRY_VALUE; +/* container for regostry values */ + +typedef struct { + TALLOC_CTX *ctx; + uint32 num_values; + REGISTRY_VALUE **values; +} REGVAL_CTR; + +/* container for registry subkey names */ + +typedef struct { + TALLOC_CTX *ctx; + uint32 num_subkeys; + char **subkeys; +} REGSUBKEY_CTR; + /* * container for function pointers to enumeration routines * for vitural registry view */ -typedef struct _reg_ops { +typedef struct { /* functions for enumerating subkeys and values */ - int (*subkey_fn)( char *key, char **subkeys ); - int (*subkey_specific_fn)( char *key, char** subkey, uint32 indx ); - int (*value_fn) ( char *key, REGISTRY_VALUE **val ); - BOOL (*store_subkeys_fn)( char *key, char **subkeys, uint32 num_subkeys ); - BOOL (*store_values_fn)( char *key, REGISTRY_VALUE **val, uint32 num_values ); + int (*subkey_fn)( char *key, REGSUBKEY_CTR *subkeys); + int (*value_fn) ( char *key, REGVAL_CTR *val ); + BOOL (*store_subkeys_fn)( char *key, REGSUBKEY_CTR *subkeys ); + BOOL (*store_values_fn)( char *key, REGVAL_CTR *val ); } REGISTRY_OPS; -typedef struct _reg_hook { +typedef struct { char *keyname; /* full path to name of key */ REGISTRY_OPS *ops; /* registry function hooks */ } REGISTRY_HOOK; diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c index e3519c6c41d..3a6e722c97d 100644 --- a/source3/lib/adt_tree.c +++ b/source3/lib/adt_tree.c @@ -26,7 +26,8 @@ for comparision of two children *************************************************************************/ -SORTED_TREE* sorted_tree_init( int (cmp_fn)(void*, void*), +SORTED_TREE* sorted_tree_init( void *data_p, + int (cmp_fn)(void*, void*), void (free_fn)(void*) ) { SORTED_TREE *tree = NULL; @@ -45,6 +46,7 @@ SORTED_TREE* sorted_tree_init( int (cmp_fn)(void*, void*), } ZERO_STRUCTP( tree->root ); + tree->root->data_p = data_p; return tree; } @@ -94,7 +96,6 @@ void sorted_tree_destroy( SORTED_TREE *tree ) static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) { TREE_NODE *infant = NULL; - TREE_NODE *child, *crib; TREE_NODE **siblings; int i, result; @@ -116,7 +117,7 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) /* first child */ if ( node->num_children == 1 ) { - DEBUG(11,("sorted_tree_birth_child: First child of node [%s]! [%s]\n", + DEBUG(10,("sorted_tree_birth_child: First child of node [%s]! [%s]\n", node->key ? node->key : "NULL", infant->key )); node->children[0] = infant; } @@ -133,23 +134,28 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) for ( i = node->num_children-1; i>=1; i-- ) { - crib = node->children[i]; - child = node->children[i-1]; - DEBUG(10,("sorted_tree_birth_child: Looking for crib; infant -> [%s], child -> [%s]\n", - infant->key, child->key)); + infant->key, node->children[i-1]->key)); /* the strings should never match assuming that we have called sorted_tree_find_child() first */ - result = StrCaseCmp( infant->key, child->key ); + result = StrCaseCmp( infant->key, node->children[i-1]->key ); if ( result > 0 ) { - crib = infant; + node->children[i] = infant; break; } - - crib = child; + + /* bump everything towards the end on slot */ + + node->children[i] = node->children[i-1]; } + + /* if we haven't found the correct clot yet, the child + will be first in the list */ + + if ( i == 0 ) + node->children[0] = infant; } return infant; @@ -376,6 +382,9 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) str = keystr; current = tree->root; + if ( tree->root->data_p ) + result = tree->root->data_p; + do { /* break off the remaining part of the path */ @@ -384,7 +393,7 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) if ( str ) *str = '\0'; - DEBUG(10,("sorted_tree_find: [loop] key => [%s]\n", base)); + DEBUG(11,("sorted_tree_find: [loop] key => [%s]\n", base)); /* iterate to the next child */ @@ -399,10 +408,18 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) str = base; } + /* + * the idea is that the data_p for a parent should + * be inherited by all children, but allow it to be + * overridden farther down + */ + + if ( current && current->data_p ) + result = current->data_p; + } while ( base && current ); - - if ( current ) - result = current->data_p; + + /* result should be the data_p from the lowest match node in the tree */ SAFE_FREE( keystr ); diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index daf2f241800..346ba20eb7d 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -26,6 +26,8 @@ #define DBGC_CLASS DBGC_RPC_SRV static SORTED_TREE *cache_tree; +extern REGISTRY_OPS regdb_ops; /* these are the default */ +static REGISTRY_HOOK default_hook = { KEY_TREE_ROOT, ®db_ops }; /********************************************************************** Initialize the cache tree @@ -33,7 +35,7 @@ static SORTED_TREE *cache_tree; BOOL reghook_cache_init( void ) { - cache_tree = sorted_tree_init( NULL, NULL ); + cache_tree = sorted_tree_init( &default_hook, NULL, NULL ); return ( cache_tree == NULL ); } diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index a521cdcdd05..d44a8d004c0 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -34,73 +34,72 @@ static TDB_CONTEXT *tdb_reg; static BOOL init_registry_data( void ) { - pstring keyname; - char *subkeys[3]; + pstring keyname; + REGSUBKEY_CTR subkeys; + + ZERO_STRUCTP( &subkeys ); + + regsubkey_ctr_init( &subkeys ); /* HKEY_LOCAL_MACHINE */ pstrcpy( keyname, KEY_HKLM ); - subkeys[0] = "SYSTEM"; - if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + regsubkey_ctr_addkey( &subkeys, "SYSTEM" ); + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; + regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM" ); - subkeys[0] = "CurrentControlSet"; - if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + regsubkey_ctr_addkey( &subkeys, "CurrentControlSet" ); + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; + regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet" ); - subkeys[0] = "Control"; - subkeys[1] = "services"; - if ( !regdb_store_reg_keys( keyname, subkeys, 2 )) + regsubkey_ctr_addkey( &subkeys, "Control" ); + regsubkey_ctr_addkey( &subkeys, "services" ); + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; + regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control" ); - subkeys[0] = "Print"; - subkeys[1] = "ProduceOptions"; - if ( !regdb_store_reg_keys( keyname, subkeys, 2 )) + regsubkey_ctr_addkey( &subkeys, "Print" ); + regsubkey_ctr_addkey( &subkeys, "ProductOptions" ); + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; - -#if 0 /* JERRY */ - pstrcpy( keyname, KEY_HKLM ); - pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/Print" ); - subkeys[0] = "Environments"; - subkeys[1] = "Forms"; - subkeys[2] = "Printers"; - if ( !regdb_store_reg_keys( keyname, subkeys, 0 )) - return False; -#endif + regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control/ProductOptions" ); - if ( !regdb_store_reg_keys( keyname, subkeys, 0 )) + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/services" ); - subkeys[0] = "Netlogon"; - if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + regsubkey_ctr_addkey( &subkeys, "Netlogon" ); + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; + regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon" ); - subkeys[0] = "parameters"; - if ( !regdb_store_reg_keys( keyname, subkeys, 1 )) + regsubkey_ctr_addkey( &subkeys, "parameters" ); + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; + regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon/parameters" ); - if ( !regdb_store_reg_keys( keyname, subkeys, 0 )) + if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; - /* HKEY_USER */ pstrcpy( keyname, KEY_HKU ); - if ( !regdb_store_reg_keys( keyname, subkeys, 0 ) ) + if ( !regdb_store_reg_keys( keyname, &subkeys ) ) return False; return True; @@ -157,13 +156,14 @@ BOOL init_registry_db( void ) \'s are converted to /'s. ***********************************************************************/ -BOOL regdb_store_reg_keys( char *keyname, char **subkeys, uint32 num_subkeys ) +BOOL regdb_store_reg_keys( char *keyname, REGSUBKEY_CTR *ctr ) { TDB_DATA kbuf, dbuf; char *buffer, *tmpbuf; int i = 0; uint32 len, buflen; BOOL ret = True; + uint32 num_subkeys = regsubkey_ctr_numkeys( ctr ); if ( !keyname ) return False; @@ -176,23 +176,23 @@ BOOL regdb_store_reg_keys( char *keyname, char **subkeys, uint32 num_subkeys ) /* store the number of subkeys */ - len += tdb_pack(buffer+len, buflen-len, "d", num_subkeys); + len += tdb_pack(buffer+len, buflen-len, "d", num_subkeys ); /* pack all the strings */ for (i=0; i buflen ) { /* allocate some extra space */ if ((tmpbuf = Realloc( buffer, len*2 )) == NULL) { - DEBUG(0,("store_reg_keys: Failed to realloc memory of size [%d]\n", len*2)); + DEBUG(0,("regdb_store_reg_keys: Failed to realloc memory of size [%d]\n", len*2)); ret = False; goto done; } buffer = tmpbuf; buflen = len*2; - len = tdb_pack(buffer+len, buflen-len, "f", subkeys[i]); + len = tdb_pack( buffer+len, buflen-len, "f", regsubkey_ctr_specific_key(ctr, i) ); } } @@ -218,7 +218,7 @@ done: of null terminated character strings ***********************************************************************/ -int regdb_fetch_reg_keys( char* key, char **subkeys ) +int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) { pstring path; uint32 num_items; @@ -226,7 +226,7 @@ int regdb_fetch_reg_keys( char* key, char **subkeys ) char *buf; uint32 buflen, len; int i; - char *s; + fstring subkeyname; pstrcpy( path, key ); @@ -240,63 +240,21 @@ int regdb_fetch_reg_keys( char* key, char **subkeys ) buflen = dbuf.dsize; if ( !buf ) { - DEBUG(5,("fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); + DEBUG(5,("regdb_fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); return 0; } len = tdb_unpack( buf, buflen, "d", &num_items); - if (num_items) { - if ( (*subkeys = (char*)malloc(sizeof(fstring)*num_items)) == NULL ) { - DEBUG(0,("fetch_reg_keys: Failed to malloc memory for subkey array containing [%d] items!\n", - num_items)); - num_items = -1; - goto done; - } - } - s = *subkeys; for (i=0; iname, subkeys, num_subkeys ); + if ( key->hook && key->hook->ops && key->hook->ops->store_subkeys_fn ) + return key->hook->ops->store_subkeys_fn( key->name, subkeys ); + else + return False; } @@ -80,60 +85,210 @@ BOOL store_reg_keys( REGISTRY_KEY *key, char **subkeys, uint32 num_subkeys ) High level wrapper function for storing registry values ***********************************************************************/ -BOOL store_reg_values( REGISTRY_KEY *key, REGISTRY_VALUE **val, uint32 num_values ) +BOOL store_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) { - return True; + if ( key->hook && key->hook->ops && key->hook->ops->store_values_fn ) + return key->hook->ops->store_values_fn( key->name, val ); + else + return False; } /*********************************************************************** High level wrapper function for enumerating registry subkeys + Initialize the TALLOC_CTX if necessary ***********************************************************************/ -int fetch_reg_keys( REGISTRY_KEY *key, char **subkeys ) +int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr ) { - int num_subkeys; + int result = -1; if ( key->hook && key->hook->ops && key->hook->ops->subkey_fn ) - num_subkeys = key->hook->ops->subkey_fn( key->name, subkeys ); - else - num_subkeys = regdb_fetch_reg_keys( key->name, subkeys ); + result = key->hook->ops->subkey_fn( key->name, subkey_ctr ); - return num_subkeys; + return result; } /*********************************************************************** - High level wrapper function for retreiving a specific registry subkey - given and index. + retreive a specific subkey specified by index. Caller is + responsible for freeing memory ***********************************************************************/ BOOL fetch_reg_keys_specific( REGISTRY_KEY *key, char** subkey, uint32 key_index ) { - BOOL result; - - if ( key->hook && key->hook->ops && key->hook->ops->subkey_specific_fn ) - result = key->hook->ops->subkey_specific_fn( key->name, subkey, key_index ); - else - result = regdb_fetch_reg_keys_specific( key->name, subkey, key_index ); + char *s; + REGSUBKEY_CTR ctr; - return result; + ZERO_STRUCTP( &ctr ); + + regsubkey_ctr_init( &ctr ); + + if ( fetch_reg_keys( key, &ctr) == -1 ) + return False; + + if ( !(s = regsubkey_ctr_specific_key( &ctr, key_index )) ) + return False; + + *subkey = strdup( s ); + + regsubkey_ctr_destroy( &ctr ); + + return True; } /*********************************************************************** High level wrapper function for enumerating registry values + Initialize the TALLOC_CTX if necessary ***********************************************************************/ -int fetch_reg_values( REGISTRY_KEY *key, REGISTRY_VALUE **val ) +int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) { - int num_values; + int result = -1; if ( key->hook && key->hook->ops && key->hook->ops->value_fn ) - num_values = key->hook->ops->value_fn( key->name, val ); - else - num_values = regdb_fetch_reg_values( key->name, val ); - - return num_values; + result = key->hook->ops->value_fn( key->name, val ); + + return result; +} + +/*********************************************************************** + Utility function for splitting the base path of a registry path off + by setting base and new_path to the apprapriate offsets withing the + path. + + WARNING!! Does modify the original string! + ***********************************************************************/ + +BOOL reg_split_path( char *path, char **base, char **new_path ) +{ + char *p; + + *new_path = *base = NULL; + + if ( !path) + return False; + + *base = path; + + p = strchr( path, '\\' ); + + if ( p ) { + *p = '\0'; + *new_path = p+1; + } + + return True; } +/* + * Utility functions for REGSUBKEY_CTR + */ + +/*********************************************************************** + Init the talloc context held by a REGSUBKEY_CTR structure + **********************************************************************/ + +void regsubkey_ctr_init( REGSUBKEY_CTR *ctr ) +{ + if ( !ctr->ctx ) + ctr->ctx = talloc_init(); +} + +/*********************************************************************** + Add a new key to the array + **********************************************************************/ + +int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, char *keyname ) +{ + uint32 len; + + if ( keyname ) + { + len = strlen( keyname ); + + if ( ctr->subkeys == 0 ) + ctr->subkeys = talloc( ctr->ctx, 1 ); + else + talloc_realloc( ctr->ctx, ctr->subkeys, ctr->num_subkeys+1 ); + + ctr->subkeys[ctr->num_subkeys] = talloc( ctr->ctx, len+1 ); + strncpy( ctr->subkeys[ctr->num_subkeys], keyname, len+1 ); + ctr->num_subkeys++; + } + + return ctr->num_subkeys; +} + +/*********************************************************************** + How many keys does the container hold ? + **********************************************************************/ + +int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr ) +{ + return ctr->num_subkeys; +} + +/*********************************************************************** + Retreive a specific key string + **********************************************************************/ + +char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 index ) +{ + if ( ! (index < ctr->num_subkeys) ) + return NULL; + + return ctr->subkeys[index]; +} + +/*********************************************************************** + free memory held by a REGSUBKEY_CTR structure + **********************************************************************/ + +void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr ) +{ + if ( ctr ) + talloc_destroy( ctr->ctx ); + + ctr->num_subkeys = 0; + ctr->subkeys = NULL; +} + + +/* + * Utility functions for REGVAL_CTR + */ + +/*********************************************************************** + Init the talloc context held by a REGSUBKEY_CTR structure + **********************************************************************/ + +void regval_ctr_init( REGVAL_CTR *ctr ) +{ + if ( !ctr->ctx ) + ctr->ctx = talloc_init(); +} + +/*********************************************************************** + How many keys does the container hold ? + **********************************************************************/ + +int regval_ctr_numvals( REGVAL_CTR *ctr ) +{ + return ctr->num_values; +} + +/*********************************************************************** + free memory held by a REGVAL_CTR structure + **********************************************************************/ + +void regval_ctr_destroy( REGVAL_CTR *ctr ) +{ + if ( ctr ) + talloc_destroy( ctr->ctx ); + + ctr->num_values = 0; + ctr->values = NULL; +} + diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index cbeab131425..b2403a31338 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -51,9 +51,26 @@ static char *top_level_keys[MAX_TOP_LEVEL_KEYS] = { static char* trim_reg_path( char *path ) { char *p; + uint16 key_len = strlen(KEY_PRINTING); + + /* + * sanity check...this really should never be True. + * It is only here to prevent us from accessing outside + * the path buffer in the extreme case. + */ + + if ( strlen(path) < key_len ) { + DEBUG(0,("trim_reg_path: Registry path too short! [%s]\n", path)); + DEBUG(0,("trim_reg_path: KEY_PRINTING => [%s]!\n", KEY_PRINTING)); + return NULL; + } + p = path + strlen(KEY_PRINTING); + if ( *p == '\\' ) + p++; + if ( *p ) return strdup(p); else @@ -61,15 +78,98 @@ static char* trim_reg_path( char *path ) } /********************************************************************** - handle enumeration of subkeys below KEY_PRINTING. + handle enumeration of subkeys below KEY_PRINTING\Environments *********************************************************************/ -static int handle_printing_subpath( char *key, char **subkeys, uint32 index ) +static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys, int32 idx ) +{ + DEBUG(10,("print_subpath_environments: key=>[%s]\n", key ? key : "NULL" )); + + if ( !key ) + { + /* listed architectures of installed drivers */ + + } + + + return 0; +} + +/********************************************************************** + handle enumeration of subkeys below KEY_PRINTING\Forms + *********************************************************************/ + +static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys, int32 idx ) +{ + DEBUG(10,("print_subpath_forms: key=>[%s]\n", key ? key : "NULL" )); + + return 0; +} + +/********************************************************************** + handle enumeration of values below KEY_PRINTING\Forms + *********************************************************************/ + +static int print_values_forms( char *key, REGVAL_CTR *val, int idx ) +{ + int num_values = 0; + + DEBUG(10,("print_values_forms: key=>[%s]\n", key ? key : "NULL" )); + + /* handle ..\Forms\ */ + +#if 0 /* JERRY */ + if ( !key ) + { + nt_forms_struct *forms = NULL; + int i; + + if ( (num_values = get_ntforms( &forms )) == 0 ) + return 0; + + if ( !(*values = malloc(sizeof(REGISTRY_VALUE) * num_values)) ) { + DEBUG(0,("print_values_forms: Failed to malloc memory for [%d] REGISTRY_VALUE structs!\n", + num_values)); + return -1; + } + + for ( i=0; i[%s]\n", key ? key : "NULL" )); + + return 0; +} + +/********************************************************************** + Routine to handle enumeration of subkeys and values + below KEY_PRINTING (depending on whether or not subkeys/val are + valid pointers. + *********************************************************************/ + +static int handle_printing_subpath( char *key, REGSUBKEY_CTR *subkeys, + REGVAL_CTR *val, int32 key_index, int32 val_index ) { int result = 0; char *p, *base; int i; - + + DEBUG(10,("handle_printing_subpath: key=>[%s], key_index == [%d], val_index == [%d]\n", + key, key_index, val_index)); /* * break off the first part of the path @@ -77,29 +177,36 @@ static int handle_printing_subpath( char *key, char **subkeys, uint32 index ) * in top_level_keys[] */ - base = key; - p = strchr( key, '\\' ); - if ( p ) - *p = '\0'; + reg_split_path( key, &base, &p); for ( i=0; i[%s], i==[%d]\n", base, i)); + + if ( (key_index != -1) && !(i < MAX_TOP_LEVEL_KEYS) ) return -1; - + /* Call routine to handle each top level key */ switch ( i ) { case KEY_INDEX_ENVIR: + if ( subkeys ) + print_subpath_environments( p, subkeys, key_index ); +#if 0 /* JERRY */ + if ( val ) + print_subpath_values_environments( p, val, val_index ); +#endif break; case KEY_INDEX_FORMS: + result = print_subpath_forms( p, subkeys, key_index ); break; case KEY_INDEX_PRINTER: + result = print_subpath_printers( p, subkeys, key_index ); break; /* default case for top level key that has no handler */ @@ -118,7 +225,7 @@ static int handle_printing_subpath( char *key, char **subkeys, uint32 index ) Caller is responsible for freeing memory to **subkeys *********************************************************************/ -int printing_subkey_info( char *key, char **subkeys ) +int printing_subkey_info( char *key, REGSUBKEY_CTR *subkey_ctr ) { char *path; BOOL top_level = False; @@ -134,32 +241,29 @@ int printing_subkey_info( char *key, char **subkeys ) top_level = True; if ( top_level ) { - if ( ! (*subkeys = malloc( sizeof(top_level_keys) )) ) - goto done; - - num_subkeys = MAX_TOP_LEVEL_KEYS; - memcpy( *subkeys, top_level_keys, sizeof(top_level_keys) ); + for ( num_subkeys=0; num_subkeys[%s], index=>[%d]\n", key, indx)); + DEBUG(10,("printing_value_info: key=>[%s]\n", key)); path = trim_reg_path( key ); @@ -168,43 +272,16 @@ BOOL printing_subkey_specific( char *key, char** subkey, uint32 indx ) if ( !path ) top_level = True; - - - if ( top_level ) { - - /* make sure the index is in range */ - - if ( !(indx < MAX_TOP_LEVEL_KEYS) ) - goto done; - - if ( !(*subkey = malloc( strlen(top_level_keys[indx])+1 )) ) - goto done; - - strncpy( *subkey, top_level_keys[indx], strlen(top_level_keys[indx])+1 ); - - result = True; - } - else { - if ( handle_printing_subpath( path, subkey, indx ) != -1 ) - result = True; + /* fill in values from the getprinterdata_printer_server() */ + if ( top_level ) + { + num_values = 0; } + else + num_values = handle_printing_subpath( path, NULL, val, -1, -1 ); + -done: - SAFE_FREE( path ); - - return result; -} - -/********************************************************************** - Enumerate registry values given a registry path. - Caller is responsible for freeing memory - *********************************************************************/ - -int printing_value_info( char *key, REGISTRY_VALUE **val ) -{ - DEBUG(10,("printing_value_info: key=>[%s]\n", key)); - - return 0; + return num_values; } /********************************************************************** @@ -213,7 +290,7 @@ int printing_value_info( char *key, REGISTRY_VALUE **val ) (for now at least) *********************************************************************/ -BOOL printing_store_subkey( char *key, char **subkeys, uint32 num_subkeys ) +BOOL printing_store_subkey( char *key, REGSUBKEY_CTR *subkeys ) { return False; } @@ -224,7 +301,7 @@ BOOL printing_store_subkey( char *key, char **subkeys, uint32 num_subkeys ) (for now at least) *********************************************************************/ -BOOL printing_store_value( char *key, REGISTRY_VALUE **val, uint32 num_values ) +BOOL printing_store_value( char *key, REGVAL_CTR *val ) { return False; } @@ -235,9 +312,9 @@ BOOL printing_store_value( char *key, REGISTRY_VALUE **val, uint32 num_values ) REGISTRY_OPS printing_ops = { printing_subkey_info, - printing_subkey_specific, printing_value_info, printing_store_subkey, printing_store_value }; + diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index d5b2394b40f..ebed13edfe9 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -40,7 +40,7 @@ static REGISTRY_KEY *regkeys_list; free() function for REGISTRY_KEY *****************************************************************/ -static void free_reg_info(void *ptr) +static void free_regkey_info(void *ptr) { REGISTRY_KEY *info = (REGISTRY_KEY*)ptr; @@ -77,11 +77,10 @@ static REGISTRY_KEY *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd) static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY *parent, char *subkeyname, uint32 access_granted ) { - REGISTRY_KEY *regkey = NULL; - pstring parent_keyname; - NTSTATUS result = NT_STATUS_OK; - int num_subkeys; - char *subkeys = NULL; + REGISTRY_KEY *regkey = NULL; + pstring parent_keyname; + NTSTATUS result = NT_STATUS_OK; + REGSUBKEY_CTR subkeys; if ( parent ) { pstrcpy( parent_keyname, parent->name ); @@ -110,27 +109,23 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY pstrcpy( regkey->name, parent_keyname ); pstrcat( regkey->name, subkeyname ); - /* try to use en existing hook. Otherwise, try to lookup our own */ + /* Look up the table of registry I/O operations */ - if ( parent && parent->hook ) - regkey->hook = parent->hook; - else - regkey->hook = reghook_cache_find( regkey->name ); - - if ( regkey->hook ) { - DEBUG(10,("open_registry_key: Assigned REGISTRY_HOOK to [%s]\n", + if ( !(regkey->hook = reghook_cache_find( regkey->name )) ) { + DEBUG(0,("open_registry_key: Failed to assigned a REGISTRY_HOOK to [%s]\n", regkey->name )); + return NT_STATUS_OBJECT_PATH_NOT_FOUND; } - /* check if the path really exists...num_subkeys should be >= 0 */ - - num_subkeys = fetch_reg_keys( regkey, &subkeys ); - + /* check if the path really exists; failed is indicated by -1 */ /* if the subkey count failed, bail out */ + + ZERO_STRUCTP( &subkeys ); + + regsubkey_ctr_init( &subkeys ); + + if ( fetch_reg_keys( regkey, &subkeys ) == -1 ) { - if ( num_subkeys == -1 ) { - SAFE_FREE( regkey ); - /* don't really know what to return here */ result = NT_STATUS_ACCESS_DENIED; @@ -141,13 +136,18 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY * that doesn't sound quite right to me --jerry */ - if ( !create_policy_hnd( p, hnd, free_reg_info, regkey ) ) + if ( !create_policy_hnd( p, hnd, free_regkey_info, regkey ) ) result = NT_STATUS_OBJECT_NAME_NOT_FOUND; } DEBUG(7,("open_registry_key: exit\n")); - SAFE_FREE( subkeys ); + /* clean up */ + + regsubkey_ctr_destroy( &subkeys ); + + if ( ! NT_STATUS_IS_OK(result) ) + SAFE_FREE( regkey ); return result; } @@ -177,37 +177,35 @@ static BOOL close_registry_key(pipes_struct *p, POLICY_HND *hnd) static BOOL get_subkey_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *maxlen ) { - int num_subkeys, i; - uint32 max_len; - char *subkeys = NULL; - uint32 len; - char *s; + int num_subkeys, i; + uint32 max_len; + REGSUBKEY_CTR subkeys; + uint32 len; if ( !key ) return False; + + ZERO_STRUCTP( &subkeys ); - /* first use any registry hook available. - Fall back to tdb if non available */ + regsubkey_ctr_init( &subkeys ); - num_subkeys = fetch_reg_keys( key, &subkeys ); - - if ( num_subkeys == -1 ) + if ( fetch_reg_keys( key, &subkeys ) == -1 ) return False; /* find the longest string */ max_len = 0; - s = subkeys; + num_subkeys = regsubkey_ctr_numkeys( &subkeys ); + for ( i=0; i Date: Fri, 19 Jul 2002 19:56:27 +0000 Subject: [PATCH 034/262] Never ignore valgrind messages :-). Don't reference before the start of a string.... Jeremy. (This used to be commit 35f0fbd254c222d015bdc582277b90efbaade81e) --- source3/lib/util_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 67d3b2108ed..1a2c2bef1f5 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -299,7 +299,7 @@ BOOL trim_string(char *s,const char *front,const char *back) } if (back_len) { - while (strncmp(s+len-back_len,back,back_len)==0) { + while ((len >= back_len) && strncmp(s+len-back_len,back,back_len)==0) { s[len-back_len]='\0'; len -= back_len; ret=True; From 12e237da6813ca6a40410c73c75152a840f4ea61 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 19 Jul 2002 22:01:23 +0000 Subject: [PATCH 035/262] Fixed a compiler warning. (This used to be commit bc0f1c1ec21e69014426e41fb0a5264da63b857a) --- source3/registry/reg_frontend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 7b7cade6c0e..3e3ec494257 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -234,12 +234,12 @@ int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr ) Retreive a specific key string **********************************************************************/ -char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 index ) +char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index ) { - if ( ! (index < ctr->num_subkeys) ) + if ( ! (key_index < ctr->num_subkeys) ) return NULL; - return ctr->subkeys[index]; + return ctr->subkeys[key_index]; } /*********************************************************************** From 3c0a9c46d8057b9499d7d48a67ba15f9942d558a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 19 Jul 2002 22:16:03 +0000 Subject: [PATCH 036/262] fixed seg fault in registry frontend caused by trying to use a destroyed TALLOC_CTX* (This used to be commit 432b9f8d7c20fbf3b2a0906c8a93272abbe43fb6) --- source3/lib/adt_tree.c | 2 ++ source3/registry/reg_cachehook.c | 11 ++++++++--- source3/registry/reg_db.c | 6 ++++++ source3/registry/reg_frontend.c | 16 +++++++--------- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c index 3a6e722c97d..9c4ad423c17 100644 --- a/source3/lib/adt_tree.c +++ b/source3/lib/adt_tree.c @@ -420,6 +420,8 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) } while ( base && current ); /* result should be the data_p from the lowest match node in the tree */ + if ( result ) + DEBUG(10,("sorted_tree_find: Found data_p!\n")); SAFE_FREE( keystr ); diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index 346ba20eb7d..e2444d8d17e 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -69,15 +69,20 @@ BOOL reghook_cache_add( REGISTRY_HOOK *hook ) REGISTRY_HOOK* reghook_cache_find( char *keyname ) { char *key; + int len; if ( !keyname ) return NULL; - - if ( (key = strdup( keyname )) == NULL ) { - DEBUG(0,("reghook_cache_find: strdup() failed for string [%s] !?!?!\n", + + len = strlen( keyname ); + if ( !(key = malloc( len + 2 )) ) { + DEBUG(0,("reghook_cache_find: malloc failed for string [%s] !?!?!\n", keyname)); return NULL; } + + *key = '\\'; + strncpy( key+1, keyname, len+1); string_sub( key, "\\", "/", 0 ); diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index d44a8d004c0..fb6ebdbf7c1 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -43,12 +43,14 @@ static BOOL init_registry_data( void ) /* HKEY_LOCAL_MACHINE */ + regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); regsubkey_ctr_addkey( &subkeys, "SYSTEM" ); if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; regsubkey_ctr_destroy( &subkeys ); + regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM" ); regsubkey_ctr_addkey( &subkeys, "CurrentControlSet" ); @@ -56,6 +58,7 @@ static BOOL init_registry_data( void ) return False; regsubkey_ctr_destroy( &subkeys ); + regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet" ); regsubkey_ctr_addkey( &subkeys, "Control" ); @@ -64,6 +67,7 @@ static BOOL init_registry_data( void ) return False; regsubkey_ctr_destroy( &subkeys ); + regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/Control" ); regsubkey_ctr_addkey( &subkeys, "Print" ); @@ -77,6 +81,7 @@ static BOOL init_registry_data( void ) if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; + regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/services" ); regsubkey_ctr_addkey( &subkeys, "Netlogon" ); @@ -84,6 +89,7 @@ static BOOL init_registry_data( void ) return False; regsubkey_ctr_destroy( &subkeys ); + regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon" ); regsubkey_ctr_addkey( &subkeys, "parameters" ); diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 3e3ec494257..60902450964 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -248,11 +248,10 @@ char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index ) void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr ) { - if ( ctr ) - talloc_destroy( ctr->ctx ); - - ctr->num_subkeys = 0; - ctr->subkeys = NULL; + if ( ctr ) { + talloc_destroy( ctr->ctx ); + ZERO_STRUCTP( ctr ); + } } @@ -285,10 +284,9 @@ int regval_ctr_numvals( REGVAL_CTR *ctr ) void regval_ctr_destroy( REGVAL_CTR *ctr ) { - if ( ctr ) + if ( ctr ) { talloc_destroy( ctr->ctx ); - - ctr->num_values = 0; - ctr->values = NULL; + ZERO_STRUCTP( ctr ); + } } From 39bbeff5b361ffa6a5ff9273cf7fce5f46543703 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 20 Jul 2002 02:42:04 +0000 Subject: [PATCH 037/262] fixed a logic error in the sorted_tree_find_child() routine that caused a valid search to fail. The printing registry view now works again. (This used to be commit 2050859f03493d5135984ce1e42baf8f1f2566b9) --- source3/lib/adt_tree.c | 95 +++++++++++++++++++++----------- source3/registry/reg_cachehook.c | 4 ++ source3/registry/reg_frontend.c | 3 +- 3 files changed, 69 insertions(+), 33 deletions(-) diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c index 9c4ad423c17..2c18bb1198c 100644 --- a/source3/lib/adt_tree.c +++ b/source3/lib/adt_tree.c @@ -21,6 +21,33 @@ #include "includes.h" +/************************************************************************** + Initialize the tree's root. The cmp_fn is a callback function used + for comparision of two children + *************************************************************************/ + +static BOOL trim_tree_keypath( char *path, char **base, char **new_path ) +{ + char *p; + + *new_path = *base = NULL; + + if ( !path ) + return False; + + *base = path; + + p = strchr( path, '/' ); + + if ( p ) { + *p = '\0'; + *new_path = p+1; + } + + return True; +} + + /************************************************************************** Initialize the tree's root. The cmp_fn is a callback function used for comparision of two children @@ -97,7 +124,7 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) { TREE_NODE *infant = NULL; TREE_NODE **siblings; - int i, result; + int i; if ( !(infant = (TREE_NODE*)malloc( sizeof(TREE_NODE) )) ) return NULL; @@ -117,7 +144,7 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) /* first child */ if ( node->num_children == 1 ) { - DEBUG(10,("sorted_tree_birth_child: First child of node [%s]! [%s]\n", + DEBUG(11,("sorted_tree_birth_child: First child of node [%s]! [%s]\n", node->key ? node->key : "NULL", infant->key )); node->children[0] = infant; } @@ -134,14 +161,15 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) for ( i = node->num_children-1; i>=1; i-- ) { - DEBUG(10,("sorted_tree_birth_child: Looking for crib; infant -> [%s], child -> [%s]\n", + DEBUG(11,("sorted_tree_birth_child: Looking for crib; infant -> [%s], child -> [%s]\n", infant->key, node->children[i-1]->key)); /* the strings should never match assuming that we have called sorted_tree_find_child() first */ - result = StrCaseCmp( infant->key, node->children[i-1]->key ); - if ( result > 0 ) { + if ( StrCaseCmp( infant->key, node->children[i-1]->key ) > 0 ) { + DEBUG(11,("sorted_tree_birth_child: storing infant in i == [%d]\n", + i)); node->children[i] = infant; break; } @@ -150,8 +178,10 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) node->children[i] = node->children[i-1]; } + + DEBUG(11,("sorted_tree_birth_child: Exiting loop (i == [%d])\n", i )); - /* if we haven't found the correct clot yet, the child + /* if we haven't found the correct slot yet, the child will be first in the list */ if ( i == 0 ) @@ -160,6 +190,7 @@ static TREE_NODE* sorted_tree_birth_child( TREE_NODE *node, char* key ) return infant; } + /************************************************************************** Find the next child given a key string *************************************************************************/ @@ -179,9 +210,12 @@ static TREE_NODE* sorted_tree_find_child( TREE_NODE *node, char* key ) return NULL; } - for ( i=0; i<(node->num_children); i++ ) - { - result = StrCaseCmp( key, node->children[i]->key ); + for ( i=0; inum_children; i++ ) + { + DEBUG(11,("sorted_tree_find_child: child key => [%s]\n", + node->children[i]->key)); + + result = StrCaseCmp( node->children[i]->key, key ); if ( result == 0 ) next = node->children[i]; @@ -190,12 +224,12 @@ static TREE_NODE* sorted_tree_find_child( TREE_NODE *node, char* key ) the list of children is sorted by key name If result == 0, then we have a match */ - if ( !(result < 0) ) + if ( result > 0 ) break; } - DEBUG(11,("sorted_tree_find_child: Did %s find [%s]\n", - next ? "" : "not", key )); + DEBUG(11,("sorted_tree_find_child: %s [%s]\n", + next ? "Found" : "Did not find", key )); return next; } @@ -346,7 +380,7 @@ void sorted_tree_print_keys( SORTED_TREE *tree, int debug ) void* sorted_tree_find( SORTED_TREE *tree, char *key ) { - char *keystr, *base, *str; + char *keystr, *base, *str, *p; TREE_NODE *current; void *result = NULL; @@ -370,7 +404,11 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) /* make a copy to play with */ - keystr = strdup( key ); + if ( *key == '/' ) + keystr = strdup( key+1 ); + else + keystr = strdup( key ); + if ( !keystr ) { DEBUG(0,("sorted_tree_find: strdup() failed on string [%s]!?!?!\n", key)); return NULL; @@ -378,8 +416,7 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) /* start breaking the path apart */ - base = keystr; - str = keystr; + p = keystr; current = tree->root; if ( tree->root->data_p ) @@ -388,25 +425,15 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) do { /* break off the remaining part of the path */ - - str = strchr( str, '/' ); - if ( str ) - *str = '\0'; + + trim_tree_keypath( p, &base, &str ); - DEBUG(11,("sorted_tree_find: [loop] key => [%s]\n", base)); + DEBUG(11,("sorted_tree_find: [loop] base => [%s], new_path => [%s]\n", + base, str)); /* iterate to the next child */ current = sorted_tree_find_child( current, base ); - - /* setup the next part of the path */ - - base = str; - if ( base ) { - *base = '/'; - base++; - str = base; - } /* * the idea is that the data_p for a parent should @@ -416,12 +443,16 @@ void* sorted_tree_find( SORTED_TREE *tree, char *key ) if ( current && current->data_p ) result = current->data_p; + + /* reset the path pointer 'p' to the remaining part of the key string */ + + p = str; - } while ( base && current ); + } while ( str && current ); /* result should be the data_p from the lowest match node in the tree */ if ( result ) - DEBUG(10,("sorted_tree_find: Found data_p!\n")); + DEBUG(11,("sorted_tree_find: Found data_p!\n")); SAFE_FREE( keystr ); diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index e2444d8d17e..2139fa70668 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -74,6 +74,8 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) if ( !keyname ) return NULL; + /* prepend the string with a '\' character */ + len = strlen( keyname ); if ( !(key = malloc( len + 2 )) ) { DEBUG(0,("reghook_cache_find: malloc failed for string [%s] !?!?!\n", @@ -84,6 +86,8 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) *key = '\\'; strncpy( key+1, keyname, len+1); + /* swap to a form understood by the SORTED_TREE */ + string_sub( key, "\\", "/", 0 ); DEBUG(10,("reghook_cache_find: Searching for keyname [%s]\n", key)); diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 60902450964..de2b279546a 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -60,7 +60,8 @@ BOOL init_registry( void ) return False; } - reghook_dump_cache(20); + if ( DEBUGLEVEL >= 20 ) + reghook_dump_cache(20); return True; } From b516eb62db51fe8a793b73014777ced3038f9aa7 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 20 Jul 2002 04:27:30 +0000 Subject: [PATCH 038/262] enumeration of printers keys ( no data yet ) via the registry functions now works :-) (This used to be commit c5768538f6cf6ee824bc6e105a3391bbc2ea8e46) --- source3/registry/reg_cachehook.c | 7 +++- source3/registry/reg_db.c | 8 ++--- source3/registry/reg_frontend.c | 10 ++++-- source3/registry/reg_printing.c | 62 +++++++++++++++++++++----------- source3/rpc_server/srv_reg_nt.c | 12 +++---- 5 files changed, 65 insertions(+), 34 deletions(-) diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index 2139fa70668..547eed392d8 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -70,6 +70,7 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) { char *key; int len; + REGISTRY_HOOK *hook; if ( !keyname ) return NULL; @@ -92,7 +93,11 @@ REGISTRY_HOOK* reghook_cache_find( char *keyname ) DEBUG(10,("reghook_cache_find: Searching for keyname [%s]\n", key)); - return sorted_tree_find( cache_tree, key ) ; + hook = sorted_tree_find( cache_tree, key ) ; + + SAFE_FREE( key ); + + return hook; } /********************************************************************** diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index fb6ebdbf7c1..714e14e48ba 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -39,8 +39,6 @@ static BOOL init_registry_data( void ) ZERO_STRUCTP( &subkeys ); - regsubkey_ctr_init( &subkeys ); - /* HKEY_LOCAL_MACHINE */ regsubkey_ctr_init( &subkeys ); @@ -215,6 +213,7 @@ BOOL regdb_store_reg_keys( char *keyname, REGSUBKEY_CTR *ctr ) done: SAFE_FREE( buffer ); + return ret; } @@ -238,7 +237,7 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) pstrcpy( path, key ); /* convert to key format */ - pstring_sub( path, "\\", "/" ); + pstring_sub( path, "\\", "/" ); dbuf = tdb_fetch_by_string( tdb_reg, path ); @@ -257,7 +256,8 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) regsubkey_ctr_addkey( ctr, subkeyname ); } - SAFE_FREE(dbuf.dptr); + SAFE_FREE( dbuf.dptr ); + return num_items; } diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index de2b279546a..4e3f09fe4e9 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -204,15 +204,19 @@ void regsubkey_ctr_init( REGSUBKEY_CTR *ctr ) int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, char *keyname ) { uint32 len; + char **pp; if ( keyname ) { len = strlen( keyname ); if ( ctr->subkeys == 0 ) - ctr->subkeys = talloc( ctr->ctx, 1 ); - else - talloc_realloc( ctr->ctx, ctr->subkeys, ctr->num_subkeys+1 ); + ctr->subkeys = talloc( ctr->ctx, sizeof(char*) ); + else { + pp = talloc_realloc( ctr->ctx, ctr->subkeys, sizeof(char*)*(ctr->num_subkeys+1) ); + if ( pp ) + ctr->subkeys = pp; + } ctr->subkeys[ctr->num_subkeys] = talloc( ctr->ctx, len+1 ); strncpy( ctr->subkeys[ctr->num_subkeys], keyname, len+1 ); diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index b2403a31338..99bdb4771fe 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -66,7 +66,7 @@ static char* trim_reg_path( char *path ) } - p = path + strlen(KEY_PRINTING); + p = path + strlen( KEY_PRINTING ); if ( *p == '\\' ) p++; @@ -81,7 +81,7 @@ static char* trim_reg_path( char *path ) handle enumeration of subkeys below KEY_PRINTING\Environments *********************************************************************/ -static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys, int32 idx ) +static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys ) { DEBUG(10,("print_subpath_environments: key=>[%s]\n", key ? key : "NULL" )); @@ -99,7 +99,7 @@ static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys, int32 handle enumeration of subkeys below KEY_PRINTING\Forms *********************************************************************/ -static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys, int32 idx ) +static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys ) { DEBUG(10,("print_subpath_forms: key=>[%s]\n", key ? key : "NULL" )); @@ -110,7 +110,7 @@ static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys, int32 idx ) handle enumeration of values below KEY_PRINTING\Forms *********************************************************************/ -static int print_values_forms( char *key, REGVAL_CTR *val, int idx ) +static int print_values_forms( char *key, REGVAL_CTR *val ) { int num_values = 0; @@ -148,11 +148,33 @@ static int print_values_forms( char *key, REGVAL_CTR *val, int idx ) handle enumeration of subkeys below KEY_PRINTING\Printers *********************************************************************/ -static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys, int32 idx ) +static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys ) { + int n_services = lp_numservices(); + int snum; + fstring sname; + DEBUG(10,("print_subpath_printers: key=>[%s]\n", key ? key : "NULL" )); - return 0; + if ( !key ) + { + /* enumerate all printers */ + + for (snum=0; snum[%s], key_index == [%d], val_index == [%d]\n", - key, key_index, val_index)); + DEBUG(10,("handle_printing_subpath: key=>[%s]\n", key )); /* * break off the first part of the path @@ -186,27 +206,31 @@ static int handle_printing_subpath( char *key, REGSUBKEY_CTR *subkeys, DEBUG(10,("handle_printing_subpath: base=>[%s], i==[%d]\n", base, i)); - if ( (key_index != -1) && !(i < MAX_TOP_LEVEL_KEYS) ) + if ( !(i < MAX_TOP_LEVEL_KEYS) ) return -1; - + + /* quick hack for now */ + if ( !subkeys ) + return 0; + /* Call routine to handle each top level key */ switch ( i ) { case KEY_INDEX_ENVIR: if ( subkeys ) - print_subpath_environments( p, subkeys, key_index ); + print_subpath_environments( p, subkeys ); #if 0 /* JERRY */ if ( val ) - print_subpath_values_environments( p, val, val_index ); + print_subpath_values_environments( p, val ); #endif break; case KEY_INDEX_FORMS: - result = print_subpath_forms( p, subkeys, key_index ); + result = print_subpath_forms( p, subkeys ); break; case KEY_INDEX_PRINTER: - result = print_subpath_printers( p, subkeys, key_index ); + result = print_subpath_printers( p, subkeys ); break; /* default case for top level key that has no handler */ @@ -245,7 +269,7 @@ int printing_subkey_info( char *key, REGSUBKEY_CTR *subkey_ctr ) regsubkey_ctr_addkey( subkey_ctr, top_level_keys[num_subkeys] ); } else - num_subkeys = handle_printing_subpath( path, subkey_ctr, NULL, -1, -1 ); + num_subkeys = handle_printing_subpath( path, subkey_ctr, NULL ); SAFE_FREE( path ); @@ -274,11 +298,9 @@ int printing_value_info( char *key, REGVAL_CTR *val ) /* fill in values from the getprinterdata_printer_server() */ if ( top_level ) - { num_values = 0; - } else - num_values = handle_printing_subpath( path, NULL, val, -1, -1 ); + num_values = handle_printing_subpath( path, NULL, val ); return num_values; diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index ebed13edfe9..580ab78f742 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -88,7 +88,6 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY } else *parent_keyname = '\0'; - DEBUG(7,("open_registry_key: name = [%s][%s]\n", parent_keyname, subkeyname)); @@ -102,8 +101,6 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY ZERO_STRUCTP( regkey ); - DLIST_ADD( regkeys_list, regkey ); - /* copy the name */ pstrcpy( regkey->name, parent_keyname ); @@ -140,14 +137,17 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY result = NT_STATUS_OBJECT_NAME_NOT_FOUND; } - DEBUG(7,("open_registry_key: exit\n")); - /* clean up */ regsubkey_ctr_destroy( &subkeys ); if ( ! NT_STATUS_IS_OK(result) ) SAFE_FREE( regkey ); + else + DLIST_ADD( regkeys_list, regkey ); + + + DEBUG(7,("open_registry_key: exit\n")); return result; } @@ -380,7 +380,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) out: init_reg_r_info(q_u->ptr_buf, r_u, buf, type, status); - DEBUG(5,("reg_open_entry: Exit\n")); + DEBUG(5,("_reg_info: Exit\n")); return status; } From 5e0cffda3e2de6112f1b3f4046daa948f8d95e91 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 04:55:42 +0000 Subject: [PATCH 039/262] NT_STATUS_UNSUCCESSFUL just gets clients confused - move to NO_LOGON_SERVERS becouse thats what Win2k gives when the PDC is down. Some of these might better go to other errors, but the Win2k text message for 'unsuccessful' is not particularly useful. (A device attached to the system is not functioning...) Andrew Bartlett (This used to be commit 656f1d68e8579f1bd0a7118caf9e0373d5980a69) --- source3/auth/auth_domain.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 3352c5f9c89..bc03528985a 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -57,13 +57,13 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, a password server anyways */ if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) { DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server)); - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; } if (!name_status_find("*", 0x20, 0x20, to_ip, remote_machine)) { DEBUG(0, ("connect_to_domain_password_server: Can't " "resolve name for IP %s\n", server)); - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; } } else { fstrcpy(remote_machine, server); @@ -74,13 +74,13 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, if(!resolve_name( remote_machine, &dest_ip, 0x20)) { DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine)); - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; } if (ismyip(dest_ip)) { DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n", remote_machine)); - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; } /* TODO: Send a SAMLOGON request to determine whether this is a valid @@ -98,7 +98,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, */ if (!grab_server_mutex(server)) - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; /* Attempt connection */ result = cli_full_connection(cli, global_myname, server, @@ -129,7 +129,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli))); cli_ulogoff(*cli); cli_shutdown(*cli); release_server_mutex(); - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; } snprintf((*cli)->mach_acct, sizeof((*cli)->mach_acct) - 1, "%s$", setup_creds_as); @@ -174,10 +174,10 @@ static NTSTATUS attempt_connect_to_dc(struct cli_state **cli, */ if (is_zero_ip(*ip)) - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; if (!lookup_dc_name(global_myname, domain, ip, dc_name)) - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; return connect_to_domain_password_server(cli, dc_name, setup_creds_as, sec_chan, trust_passwd); } @@ -196,7 +196,7 @@ static NTSTATUS find_connect_pdc(struct cli_state **cli, struct in_addr *ip_list = NULL; int count = 0; int i; - NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; + NTSTATUS nt_status = NT_STATUS_NO_LOGON_SERVERS; time_t time_now = time(NULL); BOOL use_pdc_only = False; @@ -212,7 +212,7 @@ static NTSTATUS find_connect_pdc(struct cli_state **cli, use_pdc_only = True; if (!get_dc_list(use_pdc_only, domain, &ip_list, &count)) - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_NO_LOGON_SERVERS; /* * Firstly try and contact a PDC/BDC who has the same @@ -288,7 +288,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, fstring remote_machine; NET_USER_INFO_3 info3; struct cli_state *cli = NULL; - NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; + NTSTATUS nt_status = NT_STATUS_NO_LOGON_SERVERS; /* * At this point, smb_apasswd points to the lanman response to From b96de65b26c55247f4d0f218f0e3a4ceebb4fa26 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 06:50:47 +0000 Subject: [PATCH 040/262] Add a wrapper for dup2() to our system.c Andrew Bartlett (This used to be commit b24b6307f6b40e559aec441e0ebab8f666b87d9f) --- source3/lib/system.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source3/lib/system.c b/source3/lib/system.c index 8b2ba800f53..edda54a78d2 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -1219,6 +1219,16 @@ const char *sys_dlerror(void) #endif } +int sys_dup2(int oldfd, int newfd) +{ +#if defined(HAVE_DUP2) + return dup2(oldfd, newfd); +#else + errno = ENOSYS; + return -1; +#endif +} + /************************************************************************** Wrapper for Admin Logs. ****************************************************************************/ From 60815388180bef868eda9073ea11a3fe494a23a5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 06:52:42 +0000 Subject: [PATCH 041/262] Update the usage for smbgroupedit to document -d for 'description'. I think this one is due to metze. Andrew Bartlett (This used to be commit bce3a2b1d893d83f701205d7969569571f6279b0) --- source3/utils/smbgroupedit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/utils/smbgroupedit.c b/source3/utils/smbgroupedit.c index 3fdc07c2d56..601d1c5b931 100644 --- a/source3/utils/smbgroupedit.c +++ b/source3/utils/smbgroupedit.c @@ -45,11 +45,13 @@ static void usage(void) printf(" -a group create new group\n"); printf(" -n group NT group name\n"); printf(" -p privilege only local\n"); + printf(" -d description group description\n"); printf(" -v list groups\n"); printf(" -l long list (include details)\n"); printf(" -s short list (default)\n"); printf(" -c SID change group\n"); printf(" -u unix group\n"); + printf(" -d description group description\n"); printf(" -x group delete this group\n"); printf("\n"); printf(" -t[b|d|l] type: builtin, domain, local \n"); From 129b3966c04f4f1be33d35ca720e5946fbe76051 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 06:55:05 +0000 Subject: [PATCH 042/262] Add support for a weird behaviour apparently used by Win9X pass-through authentication - we can have an NT hash in the LM hash feild. (I need to double-check this fix with tpot, who discovered it). Also remove silly casts back and forth between uchar and char. Andrew Bartlett (This used to be commit 07e2b36311f91d7a20865a2ccc94716772e53fd7) --- source3/auth/auth_sam.c | 19 +++++++++++++++++-- source3/libsmb/smbencrypt.c | 4 ++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 76579150ce9..155370546a5 100644 --- a/source3/auth/auth_sam.c +++ b/source3/auth/auth_sam.c @@ -107,7 +107,7 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB ntv2_response, memcpy(client_response, ntv2_response.data, sizeof(client_response)); ntv2_owf_gen(part_passwd, user, domain, kr); - SMBOWFencrypt_ntv2(kr, sec_blob, client_key_data, (char *)value_from_encryption); + SMBOWFencrypt_ntv2(kr, sec_blob, client_key_data, value_from_encryption); if (user_sess_key != NULL) { SMBsesskeygen_ntv2(kr, value_from_encryption, user_sess_key); @@ -232,11 +232,26 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context, { return NT_STATUS_OK; } else { + if (lp_ntlm_auth()) { + /* Apparently NT accepts NT responses in the LM feild + - I think this is related to Win9X pass-though authenticaion + */ + DEBUG(4,("sam_password_ok: Checking NT MD4 password in LM feild\n")); + if (smb_pwd_check_ntlmv1(user_info->lm_resp, + nt_pw, auth_context->challenge, + user_sess_key)) + { + return NT_STATUS_OK; + } else { + DEBUG(3,("sam_password_ok: NT MD4 password in LM feild failed for user %s\n",pdb_get_username(sampass))); + return NT_STATUS_WRONG_PASSWORD; + } + } DEBUG(4,("sam_password_ok: LM password check failed for user %s\n",pdb_get_username(sampass))); return NT_STATUS_WRONG_PASSWORD; } } - + /* Should not be reached, but if they send nothing... */ DEBUG(3,("sam_password_ok: NEITHER LanMan nor NT password supplied for user %s\n",pdb_get_username(sampass))); return NT_STATUS_WRONG_PASSWORD; diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index 95434d0ae4e..d15a83a5153 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -226,14 +226,14 @@ BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[ void SMBOWFencrypt_ntv2(const uchar kr[16], const DATA_BLOB srv_chal, const DATA_BLOB cli_chal, - char resp_buf[16]) + uchar resp_buf[16]) { HMACMD5Context ctx; hmac_md5_init_limK_to_64(kr, 16, &ctx); hmac_md5_update(srv_chal.data, srv_chal.length, &ctx); hmac_md5_update(cli_chal.data, cli_chal.length, &ctx); - hmac_md5_final((unsigned char *)resp_buf, &ctx); + hmac_md5_final(resp_buf, &ctx); #ifdef DEBUG_PASSWORD DEBUG(100, ("SMBOWFencrypt_ntv2: srv_chal, cli_chal, resp_buf\n")); From 714abda3e749ae364806633b2ccc17c03a453bf4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 07:02:45 +0000 Subject: [PATCH 043/262] Add support for duplicating stderr into our logfiles. This is for two things: To allow panic actions etc to pump out backtraces to stderr and to allow vangrind to put its stuff in a logfile - making it possible to debug smbd when launched from inetd. I've also cleaned up some of the duplicate names in procedures between smbd and nmbd. Andrew Bartlett (This used to be commit 4bcb32731984b4aef1d4911a168a4e7a10d32fd4) --- source3/lib/debug.c | 6 ++++++ source3/lib/util.c | 38 +++++++++++++++++++++----------------- source3/smbd/server.c | 16 ++++++++-------- 3 files changed, 35 insertions(+), 25 deletions(-) diff --git a/source3/lib/debug.c b/source3/lib/debug.c index f41c3b64976..c43a98f4fad 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -602,6 +602,12 @@ BOOL reopen_logs( void ) force_check_log_size(); (void)umask(oldumask); + /* Take over stderr to catch ouput into logs */ + if (sys_dup2(dbf->fd, 2) == -1) { + close_low_fds(True); /* Close stderr too, if dup2 can't point it + at the logfile */ + } + return ret; } diff --git a/source3/lib/util.c b/source3/lib/util.c index 51c926dd0b8..bcef3013f9d 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -503,30 +503,33 @@ void make_dir_struct(char *buf,char *mask,char *fname,SMB_OFF_T size,int mode,ti /******************************************************************* close the low 3 fd's and open dev/null in their place ********************************************************************/ -void close_low_fds(void) +void close_low_fds(BOOL stderr_too) { -#ifndef VALGRIND int fd; int i; close(0); close(1); -#ifndef __INSURE__ - close(2); -#endif + + if (stderr_too) { + close(2); + } + /* try and use up these file descriptors, so silly library routines writing to stdout etc won't cause havoc */ for (i=0;i<3;i++) { - fd = sys_open("/dev/null",O_RDWR,0); - if (fd < 0) fd = sys_open("/dev/null",O_WRONLY,0); - if (fd < 0) { - DEBUG(0,("Can't open /dev/null\n")); - return; - } - if (fd != i) { - DEBUG(0,("Didn't get file descriptor %d\n",i)); - return; - } + if (i == 2 && !stderr_too) + continue; + + fd = sys_open("/dev/null",O_RDWR,0); + if (fd < 0) fd = sys_open("/dev/null",O_WRONLY,0); + if (fd < 0) { + DEBUG(0,("Can't open /dev/null\n")); + return; + } + if (fd != i) { + DEBUG(0,("Didn't get file descriptor %d\n",i)); + return; + } } -#endif } /**************************************************************************** @@ -680,7 +683,8 @@ void become_daemon(void) #endif /* HAVE_SETSID */ /* Close fd's 0,1,2. Needed if started by rsh */ - close_low_fds(); + close_low_fds(False); /* Don't close stderr, let the debug system + attach it to the logfile */ } diff --git a/source3/smbd/server.c b/source3/smbd/server.c index e1e65136597..a0d448151fa 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -133,7 +133,7 @@ static BOOL open_sockets_inetd(void) smbd_set_server_fd(dup(0)); /* close our standard file descriptors */ - close_low_fds(); + close_low_fds(False); /* Don't close stderr */ set_socket_options(smbd_server_fd(),"SO_KEEPALIVE"); set_socket_options(smbd_server_fd(), user_socket_options); @@ -151,7 +151,7 @@ static void msg_exit_server(int msg_type, pid_t src, void *buf, size_t len) Open the socket communication. ****************************************************************************/ -static BOOL open_sockets(BOOL is_daemon,int port) +static BOOL open_sockets_smbd(BOOL is_daemon,int port) { int num_interfaces = iface_count(); int fd_listenset[FD_SETSIZE]; @@ -187,7 +187,7 @@ static BOOL open_sockets(BOOL is_daemon,int port) */ if(num_interfaces > FD_SETSIZE) { - DEBUG(0,("open_sockets: Too many interfaces specified to bind to. Number was %d \ + DEBUG(0,("open_sockets_smbd: Too many interfaces specified to bind to. Number was %d \ max can be %d\n", num_interfaces, FD_SETSIZE)); return False; @@ -199,7 +199,7 @@ max can be %d\n", struct in_addr *ifip = iface_n_ip(i); if(ifip == NULL) { - DEBUG(0,("open_sockets: interface %d has NULL IP address !\n", i)); + DEBUG(0,("open_sockets_smbd: interface %d has NULL IP address !\n", i)); continue; } s = fd_listenset[i] = open_socket_in(SOCK_STREAM, port, 0, ifip->s_addr, True); @@ -233,7 +233,7 @@ max can be %d\n", set_socket_options(s,user_socket_options); if (listen(s, 5) == -1) { - DEBUG(0,("open_sockets: listen: %s\n", + DEBUG(0,("open_sockets_smbd: listen: %s\n", strerror(errno))); close(s); return False; @@ -309,7 +309,7 @@ max can be %d\n", continue; if (smbd_server_fd() == -1) { - DEBUG(0,("open_sockets: accept: %s\n", + DEBUG(0,("open_sockets_smbd: accept: %s\n", strerror(errno))); continue; } @@ -323,7 +323,7 @@ max can be %d\n", /* close our standard file descriptors */ - close_low_fds(); + close_low_fds(False); am_parent = 0; set_socket_options(smbd_server_fd(),"SO_KEEPALIVE"); @@ -837,7 +837,7 @@ static void usage(char *pname) start_background_queue(); */ - if (!open_sockets(is_daemon,port)) + if (!open_sockets_smbd(is_daemon,port)) exit(1); /* From f65440ff52139ce7710d03cbb6b37360e3391d32 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 08:44:34 +0000 Subject: [PATCH 044/262] Move some startup time initialisation to server.c, so it is all in one place. I'm not sure that we need that "dummy" talloc init, but anyway... Also, add some 'const' to the table of smb reply functions. Andrew Bartlett (This used to be commit 790b7c9ab82f930da66426e7a932d7365bd27725) --- source3/smbd/process.c | 15 ++++----------- source3/smbd/server.c | 7 +++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 0363165914a..6e38f3736e5 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -341,9 +341,9 @@ force write permissions on print services. functions. Any message that has a NULL function is unimplemented - please feel free to contribute implementations! */ -static struct smb_message_struct +const static struct smb_message_struct { - char *name; + const char *name; int (*fn)(connection_struct *conn, char *, char *, int, int); int flags; } @@ -611,7 +611,7 @@ static struct smb_message_struct /******************************************************************* dump a prs to a file ********************************************************************/ -static void smb_dump(char *name, int type, char *data, ssize_t len) +static void smb_dump(const char *name, int type, char *data, ssize_t len) { int fd, i; pstring fname; @@ -896,7 +896,7 @@ void process_smb(char *inbuf, char *outbuf) /**************************************************************************** return a string containing the function name of a SMB command ****************************************************************************/ -char *smb_fn_name(int type) +const char *smb_fn_name(int type) { static char *unknown_name = "SMBunknown"; @@ -1228,13 +1228,6 @@ void smbd_process(void) max_recv = MIN(lp_maxxmit(),BUFFER_SIZE); - /* re-initialise the timezone */ - TimeInit(); - - /* register our message handlers */ - message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis); - talloc_init_named("dummy!"); - while (True) { int deadtime = lp_deadtime()*60; int select_timeout = setup_select_timeout(); diff --git a/source3/smbd/server.c b/source3/smbd/server.c index a0d448151fa..fdc59f12c09 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -887,6 +887,13 @@ static void usage(char *pname) if (!init_change_notify()) exit(1); + /* re-initialise the timezone */ + TimeInit(); + + /* register our message handlers */ + message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis); + talloc_init_named("dummy!"); + smbd_process(); uni_group_cache_shutdown(); From 27ca538a3c2ed78f5c0a6cf02b76a8729e450e2d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 08:59:58 +0000 Subject: [PATCH 045/262] If we can't connect, make sure its a level 0 so we see it, and the reason. (This used to be commit 6129718bea458ceb7669ecabc8cf0c8f908c7074) --- source3/rpcclient/rpcclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index a62c3d83653..15e7c380022 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -768,7 +768,7 @@ static void usage(void) password, 0); if (!NT_STATUS_IS_OK(nt_status)) { - DEBUG(1,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status))); + DEBUG(0,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status))); return 1; } From badbae319a860c5590abeb7a947bacb47647c599 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 09:03:50 +0000 Subject: [PATCH 046/262] Fix up char/uchar casts etc. Fix up comments on some of the password hash wrappers. Andrew Bartlett (This used to be commit 95519d408caa7da00dbb2a8323cc4374a517cd69) --- source3/libsmb/cliconnect.c | 13 +++++-------- source3/libsmb/smbencrypt.c | 8 ++++---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 472db69fd0d..3cec5d743d5 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -54,9 +54,6 @@ static BOOL cli_session_setup_lanman2(struct cli_state *cli, char *user, return False; } - /* Lanman2 cannot use SMB signing. */ - cli->sign_info.use_smb_signing = False; - /* if in share level security then don't send a password now */ if (!(cli->sec_mode & NEGOTIATE_SECURITY_USER_LEVEL)) { passlen = 0; @@ -269,10 +266,10 @@ static BOOL cli_session_setup_nt1(struct cli_state *cli, char *user, /* non encrypted password supplied. Ignore ntpass. */ passlen = 24; ntpasslen = 24; - SMBencrypt((uchar *)pass,cli->secblob.data,(uchar *)pword); - SMBNTencrypt((uchar *)pass,cli->secblob.data,(uchar *)ntpword); + SMBencrypt(pass,cli->secblob.data,(uchar *)pword); + SMBNTencrypt(pass,cli->secblob.data,(uchar *)ntpword); if (!cli->sign_info.use_smb_signing && cli->sign_info.negotiated_smb_signing) { - cli_calculate_mac_key(cli, (uchar *)pass, (uchar *)ntpword); + cli_calculate_mac_key(cli, pass, (uchar *)ntpword); tried_signing = True; } } else { @@ -482,8 +479,8 @@ static BOOL cli_session_setup_ntlmssp(struct cli_state *cli, char *user, /* encrypt the password with the challenge */ memcpy(challenge, chal1.data + 24, 8); - SMBencrypt((unsigned char *)pass, challenge,lmhash); - SMBNTencrypt((unsigned char *)pass, challenge,nthash); + SMBencrypt(pass, challenge,lmhash); + SMBNTencrypt(pass, challenge,nthash); #if 0 file_save("nthash.dat", nthash, 24); diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index d15a83a5153..1ed83042d37 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -66,9 +66,9 @@ void E_md4hash(const char *passwd, uchar p16[16]) } /** - * Creates the MD4 Hash of the users password in NT UNICODE. + * Creates the DES forward-only Hash of the users password in DOS ASCII charset * @param passwd password in 'unix' charset. - * @param p16 return password hashed with md4, caller allocated 16 byte buffer + * @param p16 return password hashed with DES, caller allocated 16 byte buffer */ void E_deshash(const char *passwd, uchar p16[16]) @@ -77,7 +77,7 @@ void E_deshash(const char *passwd, uchar p16[16]) ZERO_STRUCT(dospwd); ZERO_STRUCTP(p16); - /* Password must be converted to DOS charset - null terminated. */ + /* Password must be converted to DOS charset - null terminated, uppercase. */ push_ascii(dospwd, (const char *)passwd, sizeof(dospwd), STR_UPPER|STR_TERMINATE); E_P16(dospwd, p16); @@ -175,7 +175,7 @@ void NTLMSSPOWFencrypt(const uchar passwd[8], const uchar *ntlmchalresp, uchar p /* Does the NT MD4 hash then des encryption. */ -void SMBNTencrypt(const uchar *passwd, uchar *c8, uchar *p24) +void SMBNTencrypt(const char *passwd, uchar *c8, uchar *p24) { uchar p21[21]; From 17fc19fe31c949a3cf6a95460eb6b4be5a147743 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 10:07:47 +0000 Subject: [PATCH 047/262] Update the smbd reply code a little: I don't like the idea of muliple netprots - becouse I see potential problems with people being able to maniplate internal samba variables. This applies in particular to remote names, so don't allow muliple session requests either. Also remove a pstrcpy() from the tcon code, we really don't need it. Andrew Bartlett (This used to be commit 2afa291404cfd8dae11120e5e470c38ba067c4b2) --- source3/smbd/negprot.c | 9 +++++++++ source3/smbd/reply.c | 21 ++++++++++++++++----- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 81c2427a003..abe44aac8c5 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -412,8 +412,17 @@ int reply_negprot(connection_struct *conn, char *p; int bcc = SVAL(smb_buf(inbuf),-2); int arch = ARCH_ALL; + + static BOOL done_negprot = False; + START_PROFILE(SMBnegprot); + if (done_negprot) { + END_PROFILE(SMBnegprot); + exit_server("multiple negprot's are not permitted"); + } + done_negprot = True; + p = smb_buf(inbuf)+1; while (p < (smb_buf(inbuf) + bcc)) { Index++; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 8f666910a51..813b9f39f88 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -57,6 +57,8 @@ int reply_special(char *inbuf,char *outbuf) int len; char name_type = 0; + static BOOL already_got_session = False; + *name1 = *name2 = 0; memset(outbuf,'\0',smb_size); @@ -65,6 +67,11 @@ int reply_special(char *inbuf,char *outbuf) switch (msg_type) { case 0x81: /* session request */ + + if (already_got_session) { + exit_server("multiple session request not permitted"); + } + SCVAL(outbuf,0,0x82); SCVAL(outbuf,3,0); if (name_len(inbuf+4) > 50 || @@ -115,6 +122,7 @@ int reply_special(char *inbuf,char *outbuf) claim_connection(NULL,"",MAXSTATUS,True); + already_got_session = True; break; case 0x89: /* session keepalive request @@ -148,7 +156,8 @@ int reply_special(char *inbuf,char *outbuf) int reply_tcon(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize) { - pstring service; + char *service; + pstring service_buf; pstring password; pstring dev; int outsize = 0; @@ -160,17 +169,19 @@ int reply_tcon(connection_struct *conn, START_PROFILE(SMBtcon); - *service = *password = *dev = 0; + *service_buf = *password = *dev = 0; p = smb_buf(inbuf)+1; - p += srvstr_pull_buf(inbuf, service, p, sizeof(service), STR_TERMINATE) + 1; + p += srvstr_pull_buf(inbuf, service_buf, p, sizeof(service), STR_TERMINATE) + 1; pwlen = srvstr_pull_buf(inbuf, password, p, sizeof(password), STR_TERMINATE) + 1; p += pwlen; p += srvstr_pull_buf(inbuf, dev, p, sizeof(dev), STR_TERMINATE) + 1; - p = strrchr_m(service,'\\'); + p = strrchr_m(service_buf,'\\'); if (p) { - pstrcpy(service, p+1); + service = p+1; + } else { + service = service_buf; } password_blob = data_blob(password, pwlen+1); From 750a1f9e5840054127a759bb64fa731df9152aa6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 10:17:02 +0000 Subject: [PATCH 048/262] Make it clear that the 'service' isn't to be touched. (Make it const). Andrew Bartlett (This used to be commit 6465c6727be15cd2e915710bdc3e2f4244ad2083) --- source3/smbd/reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 813b9f39f88..ba0e15bd4ec 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -156,7 +156,7 @@ int reply_special(char *inbuf,char *outbuf) int reply_tcon(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize) { - char *service; + const char *service; pstring service_buf; pstring password; pstring dev; From aff20d822c267f0b2f348f7dfd3946aaf9c06817 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 11:06:37 +0000 Subject: [PATCH 049/262] Add some const to try and get less warnings. Andrew Bartlett (This used to be commit 2a3d821c77c7648de43b11dd951f6f16d7be5b3c) --- source3/lib/util_str.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 1a2c2bef1f5..7e974269ece 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -826,7 +826,8 @@ return a new allocate unicode string. smb_ucs2_t *all_string_sub_w(const smb_ucs2_t *s, const smb_ucs2_t *pattern, const smb_ucs2_t *insert) { - smb_ucs2_t *r, *rp, *sp; + smb_ucs2_t *r, *rp; + const smb_ucs2_t *sp; size_t lr, lp, li, lt; if (!insert || !pattern || !*pattern || !s) return NULL; @@ -836,7 +837,7 @@ smb_ucs2_t *all_string_sub_w(const smb_ucs2_t *s, const smb_ucs2_t *pattern, li = (size_t)strlen_w(insert); if (li > lp) { - smb_ucs2_t *st = s; + const smb_ucs2_t *st = s; int ld = li - lp; while ((sp = strstr_w(st, pattern))) { st = sp + lp; From ea9d3057e9cbd615176a7b98bcd935b6f9b434cb Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 11:58:06 +0000 Subject: [PATCH 050/262] Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a distinction between uchar and char). Lots of const etc. Andrew Bartlett (This used to be commit 8196ee908e10db2119e480fe1b0a71b31a16febc) --- source3/auth/auth_domain.c | 2 +- source3/libsmb/cli_srvsvc.c | 2 +- source3/libsmb/cliconnect.c | 28 ++++++++++++++++++++-------- source3/libsmb/namequery.c | 2 +- source3/libsmb/smbencrypt.c | 4 ++-- source3/nsswitch/wbinfo.c | 4 ++-- source3/nsswitch/winbindd_pam.c | 4 ++-- source3/nsswitch/winbindd_util.c | 2 +- source3/rpc_parse/parse_srv.c | 3 ++- source3/rpc_server/srv_netlog_nt.c | 4 ++-- source3/utils/net_lookup.c | 7 ++++--- source3/utils/net_rpc.c | 4 ++-- 12 files changed, 40 insertions(+), 26 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index bc03528985a..ee3793a6c1e 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -503,7 +503,7 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte #ifdef DEBUG_PASSWORD DEBUG(100, ("Trust password for domain %s is %s\n", user_info->domain.str, trust_password)); #endif - E_md4hash((uchar *)trust_password, trust_md4_password); + E_md4hash(trust_password, trust_md4_password); SAFE_FREE(trust_password); #if 0 diff --git a/source3/libsmb/cli_srvsvc.c b/source3/libsmb/cli_srvsvc.c index 2dc12d726ca..b92b356241c 100644 --- a/source3/libsmb/cli_srvsvc.c +++ b/source3/libsmb/cli_srvsvc.c @@ -317,7 +317,7 @@ WERROR cli_srvsvc_net_remote_tod(struct cli_state *cli, TALLOC_CTX *mem_ctx, } WERROR cli_srvsvc_net_file_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 file_level, char *user_name, + uint32 file_level, const char *user_name, SRV_FILE_INFO_CTR *ctr, int preferred_len, ENUM_HND *hnd) { diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 3cec5d743d5..1cf85875b6e 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -254,11 +254,12 @@ static BOOL cli_session_setup_nt1(struct cli_state *cli, char *user, char *workgroup) { uint32 capabilities = cli_session_setup_capabilities(cli); - fstring pword, ntpword; + uchar pword[24]; + uchar ntpword[24]; char *p; BOOL tried_signing = False; - if (passlen > sizeof(pword)-1 || ntpasslen > sizeof(ntpword)-1) { + if (passlen > sizeof(pword) || ntpasslen > sizeof(ntpword)) { return False; } @@ -266,15 +267,21 @@ static BOOL cli_session_setup_nt1(struct cli_state *cli, char *user, /* non encrypted password supplied. Ignore ntpass. */ passlen = 24; ntpasslen = 24; - SMBencrypt(pass,cli->secblob.data,(uchar *)pword); - SMBNTencrypt(pass,cli->secblob.data,(uchar *)ntpword); + SMBencrypt(pass,cli->secblob.data,pword); + SMBNTencrypt(pass,cli->secblob.data,ntpword); if (!cli->sign_info.use_smb_signing && cli->sign_info.negotiated_smb_signing) { - cli_calculate_mac_key(cli, pass, (uchar *)ntpword); + cli_calculate_mac_key(cli, pass, ntpword); tried_signing = True; } } else { - memcpy(pword, pass, passlen); - memcpy(ntpword, ntpass, ntpasslen); + /* pre-encrypted password supplied. Only used for security=server, can't do + signing becouse we don't have oringial key */ + memcpy(pword, pass, 24); + if (ntpasslen == 24) { + memcpy(ntpword, ntpass, 24); + } else { + ZERO_STRUCT(ntpword); + } } /* send a session setup command */ @@ -302,8 +309,13 @@ static BOOL cli_session_setup_nt1(struct cli_state *cli, char *user, cli_setup_bcc(cli, p); cli_send_smb(cli); - if (!cli_receive_smb(cli)) + if (!cli_receive_smb(cli)) { + if (tried_signing) { + /* We only use it if we have a successful non-guest connect */ + cli->sign_info.use_smb_signing = False; + } return False; + } show_msg(cli->inbuf); diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 18564bccf43..e2ddfd82809 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -930,7 +930,7 @@ BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type) Find the IP address of the master browser or DMB for a workgroup. *********************************************************/ -BOOL find_master_ip(char *group, struct in_addr *master_ip) +BOOL find_master_ip(const char *group, struct in_addr *master_ip) { struct in_addr *ip_list = NULL; int count = 0; diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c index 1ed83042d37..dfa355a7ec6 100644 --- a/source3/libsmb/smbencrypt.c +++ b/source3/libsmb/smbencrypt.c @@ -28,7 +28,7 @@ This implements the X/Open SMB password encryption It takes a password ('unix' string), a 8 byte "crypt key" and puts 24 bytes of encrypted password into p24 */ -void SMBencrypt(const char *passwd, const uchar *c8, uchar *p24) +void SMBencrypt(const char *passwd, const uchar *c8, uchar p24[24]) { uchar p21[21]; @@ -337,7 +337,7 @@ BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd, SMB signing - setup the MAC key. ************************************************************/ -void cli_calculate_mac_key(struct cli_state *cli, const unsigned char *ntpasswd, const uchar resp[24]) +void cli_calculate_mac_key(struct cli_state *cli, const char *ntpasswd, const uchar resp[24]) { /* Get first 16 bytes. */ E_md4hash(ntpasswd,&cli->sign_info.mac_key[0]); diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index d0af10a0e6f..4a23e3abe23 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -490,9 +490,9 @@ static BOOL wbinfo_auth_crap(char *username) generate_random_buffer(request.data.auth_crap.chal, 8, False); - SMBencrypt((uchar *)pass, request.data.auth_crap.chal, + SMBencrypt(pass, request.data.auth_crap.chal, (uchar *)request.data.auth_crap.lm_resp); - SMBNTencrypt((uchar *)pass, request.data.auth_crap.chal, + SMBNTencrypt(pass, request.data.auth_crap.chal, (uchar *)request.data.auth_crap.nt_resp); request.data.auth_crap.lm_resp_len = 24; diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index e608f826c91..a73b2ccd29e 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -71,9 +71,9 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) unsigned char local_nt_response[24]; generate_random_buffer(chal, 8, False); - SMBencrypt( (const uchar *)state->request.data.auth.pass, chal, local_lm_response); + SMBencrypt(state->request.data.auth.pass, chal, local_lm_response); - SMBNTencrypt((const uchar *)state->request.data.auth.pass, chal, local_nt_response); + SMBNTencrypt(state->request.data.auth.pass, chal, local_nt_response); lm_resp = data_blob_talloc(mem_ctx, local_lm_response, sizeof(local_lm_response)); nt_resp = data_blob_talloc(mem_ctx, local_nt_response, sizeof(local_nt_response)); diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index d5668a2bb68..b927380af87 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -123,7 +123,7 @@ BOOL init_domain_list(void) struct winbindd_domain *domain; DOM_SID *dom_sids; char **names; - int num_domains = 0; + uint32 num_domains = 0; if (!(mem_ctx = talloc_init_named("init_domain_list"))) return False; diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index 3dc054d2b17..7f1915edc76 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -2004,7 +2004,8 @@ static BOOL srv_io_srv_file_ctr(char *desc, SRV_FILE_INFO_CTR *ctr, prs_struct * ********************************************************************/ void init_srv_q_net_file_enum(SRV_Q_NET_FILE_ENUM *q_n, - char *srv_name, char *qual_name, char *user_name, + const char *srv_name, const char *qual_name, + const char *user_name, uint32 file_level, SRV_FILE_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *hnd) diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 4ab9c470d08..1f684bd929a 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -280,7 +280,7 @@ NTSTATUS _net_auth(pipes_struct *p, NET_Q_AUTH *q_u, NET_R_AUTH *r_u) /* from client / server challenges and md4 password, generate sess key */ cred_session_key(&p->dc.clnt_chal, &p->dc.srv_chal, - (char *)p->dc.md4pw, p->dc.sess_key); + p->dc.md4pw, p->dc.sess_key); /* check that the client credentials are valid */ if (cred_assert(&q_u->clnt_chal, p->dc.sess_key, &p->dc.clnt_cred.challenge, srv_time)) { @@ -342,7 +342,7 @@ NTSTATUS _net_auth_2(pipes_struct *p, NET_Q_AUTH_2 *q_u, NET_R_AUTH_2 *r_u) /* from client / server challenges and md4 password, generate sess key */ cred_session_key(&p->dc.clnt_chal, &p->dc.srv_chal, - (char *)p->dc.md4pw, p->dc.sess_key); + p->dc.md4pw, p->dc.sess_key); /* check that the client credentials are valid */ if (cred_assert(&q_u->clnt_chal, p->dc.sess_key, &p->dc.clnt_cred.challenge, srv_time)) { diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index a324f594a1f..a9aa0800549 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -77,7 +77,8 @@ static void print_ldap_srvlist(char *srvlist) static int net_lookup_ldap(int argc, const char **argv) { #ifdef HAVE_LDAP - char *srvlist, *domain; + char *srvlist; + const char *domain; int rc, count; struct in_addr *addr; struct hostent *hostent; @@ -125,7 +126,7 @@ static int net_lookup_dc(int argc, const char **argv) { struct in_addr *ip_list; char *pdc_str = NULL; - char *domain=opt_target_workgroup; + const char *domain=opt_target_workgroup; int count, i; if (argc > 0) @@ -154,7 +155,7 @@ static int net_lookup_dc(int argc, const char **argv) static int net_lookup_master(int argc, const char **argv) { struct in_addr master_ip; - char *domain=opt_target_workgroup; + const char *domain=opt_target_workgroup; if (argc > 0) domain=argv[0]; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index dc50c438d49..dceb5ffd504 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -244,7 +244,7 @@ static NTSTATUS rpc_join_oldstyle_internals(const DOM_SID *domain_sid, struct cl trust_passwd[14] = '\0'; - E_md4hash( (uchar *)trust_passwd, orig_trust_passwd_hash); + E_md4hash(trust_passwd, orig_trust_passwd_hash); return trust_pw_change_and_store_it(cli, mem_ctx, orig_trust_passwd_hash); } @@ -1221,7 +1221,7 @@ rpc_file_list_internals(const DOM_SID *domain_sid, struct cli_state *cli, WERROR result; ENUM_HND hnd; uint32 preferred_len = 0xffffffff, i; - char *username=NULL; + const char *username=NULL; init_enum_hnd(&hnd, 0); From 9175bd2fe79684066a08e09860cf3a0bdb02d5c5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 12:03:11 +0000 Subject: [PATCH 051/262] correctly declare global_myworkgroup to be the right size. Andrew Bartlett (This used to be commit 860f5b1a0c1898f1ce380d249610eeaaeb43b9e0) --- source3/utils/smbgroupedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/smbgroupedit.c b/source3/utils/smbgroupedit.c index 601d1c5b931..4358e6f08c9 100644 --- a/source3/utils/smbgroupedit.c +++ b/source3/utils/smbgroupedit.c @@ -22,7 +22,7 @@ #include "includes.h" extern pstring global_myname; -extern pstring global_myworkgroup; +extern fstring global_myworkgroup; /* * Next two lines needed for SunOS and don't From 29075c97d3b7111e2565ede1cd0f000fd2534375 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 13:02:47 +0000 Subject: [PATCH 052/262] More fixes towards warnings on the IRIX compiler (and yes, some of these are real bugs) In particular, the samr code was doing an &foo of various types, to a function that assumed uint32. If time_t isn't 32 bits long, that broke. They are assignment compatible however, so use that and an intermediate variable. Andrew Bartlett (This used to be commit 30d0998c8c1a1d4de38ef0fbc83c2b763e05a3e6) --- source3/client/smbspool.c | 13 +++++------- source3/libads/ldap.c | 4 ++-- source3/passdb/secrets.c | 2 +- source3/printing/load.c | 8 ++++---- source3/printing/pcap.c | 9 ++------ source3/printing/print_svid.c | 2 +- source3/rpc_server/srv_samr_nt.c | 35 ++++++++++++++++++++++++-------- source3/utils/net_rpc_join.c | 8 +++++--- 8 files changed, 46 insertions(+), 35 deletions(-) diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index b78d9d22a80..7804669cc88 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -284,18 +284,15 @@ smb_connect(char *workgroup, /* I - Workgroup */ nt_status = cli_full_connection(&c, myname, server, NULL, 0, share, "?????", username, lp_workgroup(), password, 0); - if (NT_STATUS_IS_OK(nt_status)) { - return c; - } else { + if (!NT_STATUS_IS_OK(nt_status)) { fprintf(stderr, "ERROR: Connection failed with error %s\n", nt_errstr(nt_status)); return NULL; } - - /* - * Return the new connection... - */ - + /* + * Return the new connection... + */ + return (c); } diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 9d15c4e33cc..f91ef4b8a05 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -230,7 +230,7 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, else { /* This would be the utf8-encoded version...*/ /* if (!(search_attrs = ads_push_strvals(ctx, attrs))) */ - if (!(str_list_copy(&search_attrs, (char **) attrs))) + if (!(str_list_copy(&search_attrs, attrs))) { rc = LDAP_NO_MEMORY; goto done; @@ -453,7 +453,7 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, else { /* This would be the utf8-encoded version...*/ /* if (!(search_attrs = ads_push_strvals(ctx, attrs))) */ - if (!(str_list_copy(&search_attrs, (char **) attrs))) + if (!(str_list_copy(&search_attrs, attrs))) { rc = LDAP_NO_MEMORY; goto done; diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 3ecaf52e586..a737a2d0492 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -178,7 +178,7 @@ BOOL secrets_fetch_trust_account_password(char *domain, uint8 ret_pwd[16], if (plaintext) { /* we have an ADS password - use that */ DEBUG(4,("Using ADS machine password\n")); - E_md4hash((uchar *)plaintext, ret_pwd); + E_md4hash(plaintext, ret_pwd); SAFE_FREE(plaintext); return True; } diff --git a/source3/printing/load.c b/source3/printing/load.c index ed967fb0a7c..cd90cbb6f33 100644 --- a/source3/printing/load.c +++ b/source3/printing/load.c @@ -38,7 +38,7 @@ auto-load some homes and printer services ***************************************************************************/ static void add_auto_printers(void) { - char *p; + const char *p; int printers; char *str = strdup(lp_auto_services()); @@ -47,9 +47,9 @@ static void add_auto_printers(void) printers = lp_servicenumber(PRINTERS_NAME); if (printers < 0) { - SAFE_FREE(str); - return; - } + SAFE_FREE(str); + return; + } for (p=strtok(str,LIST_SEP);p;p=strtok(NULL,LIST_SEP)) { if (lp_servicenumber(p) >= 0) continue; diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index 4bca63fffb1..46d1128b8e1 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -241,12 +241,9 @@ static BOOL ScanQconfig(char *psz,char *pszPrintername) Scan printcap file pszPrintcapname for a printer called pszPrintername. Return True if found, else False. Returns False on error, too, after logging the error at level 0. For generality, the printcap name may be passed - if -passed as NULL, the configuration will be queried for the name. pszPrintername -must be in DOS codepage. -The xxx_printername_ok functions need fixing to understand they are being -given a DOS codepage. FIXME !! JRA. +passed as NULL, the configuration will be queried for the name. ***************************************************************************/ -BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname) +BOOL pcap_printername_ok(const char *pszPrintername, const char *pszPrintcapname) { char *line=NULL; char *psz; @@ -305,8 +302,6 @@ BOOL pcap_printername_ok(char *pszPrintername, char *pszPrintcapname) if (strequal(p,pszPrintername)) { - /* normalise the case */ - pstrcpy(pszPrintername,p); SAFE_FREE(line); x_fclose(pfile); return(True); diff --git a/source3/printing/print_svid.c b/source3/printing/print_svid.c index 44127c3700a..837a2fba483 100644 --- a/source3/printing/print_svid.c +++ b/source3/printing/print_svid.c @@ -126,7 +126,7 @@ void sysv_printer_fn(void (*fn)(char *, char *)) * provide the equivalent of pcap_printername_ok() for SVID/XPG4 conforming * systems. */ -int sysv_printername_ok(char *name) +int sysv_printername_ok(const char *name) { printer_t *tmp; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 88d728d8107..96960611b7f 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2081,6 +2081,8 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA time_t u_logout; NTTIME nt_logout; + uint32 account_policy_temp; + uint32 num_users=0, num_groups=0, num_aliases=0; if ((ctr = (SAM_UNK_CTR *)talloc_zero(p->mem_ctx, sizeof(SAM_UNK_CTR))) == NULL) @@ -2098,12 +2100,22 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA switch (q_u->switch_value) { case 0x01: - account_policy_get(AP_MIN_PASSWORD_LEN, &min_pass_len); - account_policy_get(AP_PASSWORD_HISTORY, &pass_hist); - account_policy_get(AP_USER_MUST_LOGON_TO_CHG_PASS, &flag); - account_policy_get(AP_MAX_PASSWORD_AGE, (int *)&u_expire); - account_policy_get(AP_MIN_PASSWORD_AGE, (int *)&u_min_age); + + account_policy_get(AP_MIN_PASSWORD_LEN, &account_policy_temp); + min_pass_len = account_policy_temp; + account_policy_get(AP_PASSWORD_HISTORY, &account_policy_temp); + pass_hist = account_policy_temp; + + account_policy_get(AP_USER_MUST_LOGON_TO_CHG_PASS, &account_policy_temp); + flag = account_policy_temp; + + account_policy_get(AP_MAX_PASSWORD_AGE, &account_policy_temp); + u_expire = account_policy_temp; + + account_policy_get(AP_MIN_PASSWORD_AGE, &account_policy_temp); + u_min_age = account_policy_temp; + unix_to_nt_time_abs(&nt_expire, u_expire); unix_to_nt_time_abs(&nt_min_age, u_min_age); @@ -2149,10 +2161,15 @@ NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SA init_unk_info7(&ctr->info.inf7); break; case 0x0c: - account_policy_get(AP_LOCK_ACCOUNT_DURATION, (int *)&u_lock_duration); - account_policy_get(AP_RESET_COUNT_TIME, (int *)&u_reset_time); - account_policy_get(AP_BAD_ATTEMPT_LOCKOUT, &lockout); - + account_policy_get(AP_LOCK_ACCOUNT_DURATION, &account_policy_temp); + u_lock_duration = account_policy_temp; + + account_policy_get(AP_RESET_COUNT_TIME, &account_policy_temp); + u_reset_time = account_policy_temp; + + account_policy_get(AP_BAD_ATTEMPT_LOCKOUT, &account_policy_temp); + lockout = account_policy_temp; + unix_to_nt_time_abs(&nt_lock_duration, u_lock_duration); unix_to_nt_time_abs(&nt_reset_time, u_reset_time); diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index cc1a203ca13..61adb2a8ff7 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -80,8 +80,9 @@ int net_rpc_join_newstyle(int argc, const char **argv) fstring domain; uint32 num_rids, *name_types, *user_rids; uint32 flags = 0x3e8; - const char *acct_name; - + char *acct_name; + const char *const_acct_name; + /* Connect to remote machine */ if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC))) @@ -162,7 +163,8 @@ int net_rpc_join_newstyle(int argc, const char **argv) CHECK_RPC_ERR_DEBUG(cli_samr_lookup_names(cli, mem_ctx, &domain_pol, flags, - 1, &acct_name, &num_rids, + 1, &const_acct_name, + &num_rids, &user_rids, &name_types), ("error looking up rid for user %s: %s\n", acct_name, nt_errstr(result))); From 6dd9f24d05e5db92e15dc53399a0f78ccb69f718 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 20 Jul 2002 13:23:57 +0000 Subject: [PATCH 053/262] another intermediate checkin on the way to enumerating forms via the registry. There is a seg fault here which shouldn't bother anyone until I can get it fixed. I just need a check point in case I need to roll back to this version later on. (This used to be commit e62ae94823461e142978a786b2860ea97906cfb3) --- source3/printing/nt_printing.c | 14 +++-- source3/registry/reg_frontend.c | 53 ++++++++++++++++++- source3/registry/reg_printing.c | 90 ++++++++++++++++++++++++--------- source3/rpc_server/srv_reg_nt.c | 19 +++---- source3/script/mkproto.awk | 2 +- 5 files changed, 138 insertions(+), 40 deletions(-) diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index ff08b99eb0f..76325c2990c 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -435,25 +435,29 @@ int get_ntforms(nt_forms_struct **list) for (kbuf = tdb_firstkey(tdb_forms); kbuf.dptr; - newkey = tdb_nextkey(tdb_forms, kbuf), safe_free(kbuf.dptr), kbuf=newkey) { - if (strncmp(kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0) continue; + newkey = tdb_nextkey(tdb_forms, kbuf), safe_free(kbuf.dptr), kbuf=newkey) + { + if (strncmp(kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0) + continue; dbuf = tdb_fetch(tdb_forms, kbuf); - if (!dbuf.dptr) continue; + if (!dbuf.dptr) + continue; fstrcpy(form.name, kbuf.dptr+strlen(FORMS_PREFIX)); ret = tdb_unpack(dbuf.dptr, dbuf.dsize, "dddddddd", &i, &form.flag, &form.width, &form.length, &form.left, &form.top, &form.right, &form.bottom); SAFE_FREE(dbuf.dptr); - if (ret != dbuf.dsize) continue; + if (ret != dbuf.dsize) + continue; tl = Realloc(*list, sizeof(nt_forms_struct)*(n+1)); if (!tl) { DEBUG(0,("get_ntforms: Realloc fail.\n")); return 0; } - *list = tl; + *list = tl; (*list)[n] = form; n++; } diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 4e3f09fe4e9..6e550c1a0de 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -32,7 +32,6 @@ extern REGISTRY_OPS regdb_ops; /* these are the default */ REGISTRY_HOOK reg_hooks[] = { - { KEY_TREE_ROOT, ®db_ops }, { KEY_PRINTING, &printing_ops }, { NULL, NULL } }; @@ -283,6 +282,58 @@ int regval_ctr_numvals( REGVAL_CTR *ctr ) return ctr->num_values; } +REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) +{ + if ( !(idx < ctr->num_values) ) + return NULL; + + return ctr->values[idx]; +} + +/*********************************************************************** + Ad a new regostry value to the array + **********************************************************************/ + +int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, + char *data_p, size_t size ) +{ + REGISTRY_VALUE **ppreg; + uint16 len; + + if ( name ) + { + len = strlen( name ); + + if ( ctr->num_values == 0 ) + ctr->values = talloc( ctr->ctx, sizeof(REGISTRY_VALUE*) ); + else { + ppreg = talloc_realloc( ctr->ctx, ctr->values, sizeof(REGISTRY_VALUE*)*(ctr->num_values+1) ); + if ( ppreg ) + ctr->values = ppreg; + } + + fstrcpy( ctr->values[ctr->num_values]->valuename, name ); + ctr->values[ctr->num_values]->type = type; + switch ( type ) + { + case REG_SZ: + ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p ); + break; + case REG_DWORD: + break; + case REG_BINARY: + ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size ); + break; + + } + ctr->values[ctr->num_values]->size = size; + + ctr->num_values++; + } + + return ctr->num_values; +} + /*********************************************************************** free memory held by a REGVAL_CTR structure **********************************************************************/ diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 99bdb4771fe..993d793c1e0 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -39,6 +39,7 @@ static char *top_level_keys[MAX_TOP_LEVEL_KEYS] = { "Printers" }; + /********************************************************************** It is safe to assume that every registry path passed into on of the exported functions here begins with KEY_PRINTING else @@ -97,12 +98,19 @@ static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys ) /********************************************************************** handle enumeration of subkeys below KEY_PRINTING\Forms + Really just a stub function, but left here in case it needs to + be expanded later on *********************************************************************/ static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys ) { DEBUG(10,("print_subpath_forms: key=>[%s]\n", key ? key : "NULL" )); + /* there are no subkeys */ + + if ( key ) + return -1; + return 0; } @@ -110,36 +118,74 @@ static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys ) handle enumeration of values below KEY_PRINTING\Forms *********************************************************************/ -static int print_values_forms( char *key, REGVAL_CTR *val ) +static int print_subpath_values_forms( char *key, REGVAL_CTR *val ) { - int num_values = 0; + int num_values = 0; + uint32 data[7]; DEBUG(10,("print_values_forms: key=>[%s]\n", key ? key : "NULL" )); /* handle ..\Forms\ */ -#if 0 /* JERRY */ if ( !key ) { - nt_forms_struct *forms = NULL; + nt_forms_struct *forms_list = NULL; + nt_forms_struct *form = NULL; int i; - if ( (num_values = get_ntforms( &forms )) == 0 ) + if ( (num_values = get_ntforms( &forms_list )) == 0 ) return 0; - if ( !(*values = malloc(sizeof(REGISTRY_VALUE) * num_values)) ) { - DEBUG(0,("print_values_forms: Failed to malloc memory for [%d] REGISTRY_VALUE structs!\n", - num_values)); - return -1; - } - + DEBUG(10,("print_subpath_values_forms: [%d] user defined forms returned\n", + num_values)); + + /* handle user defined forms */ + for ( i=0; iflag; + data[1] = form->width; + data[2] = form->length; + data[3] = form->left; + data[4] = form->top; + data[5] = form->right; + data[6] = form->bottom; + + regval_ctr_addvalue( val, form->name, REG_BINARY, (char*)data, sizeof(data) ); } + + SAFE_FREE( forms_list ); + forms_list = NULL; + + /* handle built-on forms */ + + if ( (num_values = get_builtin_ntforms( &forms_list )) == 0 ) + return 0; + + DEBUG(10,("print_subpath_values_forms: [%d] built-in forms returned\n", + num_values)); + + for ( i=0; iflag; + data[1] = form->width; + data[2] = form->length; + data[3] = form->left; + data[4] = form->top; + data[5] = form->right; + data[6] = form->bottom; + + regval_ctr_addvalue( val, form->name, REG_BINARY, (char*)data, sizeof(data) ); + + } + + SAFE_FREE( forms_list ); } -#endif return num_values; } @@ -150,7 +196,7 @@ static int print_values_forms( char *key, REGVAL_CTR *val ) static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys ) { - int n_services = lp_numservices(); + int n_services = lp_numservices(); int snum; fstring sname; @@ -208,29 +254,25 @@ static int handle_printing_subpath( char *key, REGSUBKEY_CTR *subkeys, REGVAL_CT if ( !(i < MAX_TOP_LEVEL_KEYS) ) return -1; - - /* quick hack for now */ - if ( !subkeys ) - return 0; - + /* Call routine to handle each top level key */ switch ( i ) { case KEY_INDEX_ENVIR: if ( subkeys ) print_subpath_environments( p, subkeys ); -#if 0 /* JERRY */ - if ( val ) - print_subpath_values_environments( p, val ); -#endif break; case KEY_INDEX_FORMS: - result = print_subpath_forms( p, subkeys ); + if ( subkeys ) + print_subpath_forms( p, subkeys ); + if ( val ) + print_subpath_values_forms( p, val ); break; case KEY_INDEX_PRINTER: - result = print_subpath_printers( p, subkeys ); + if ( subkeys ) + print_subpath_printers( p, subkeys ); break; /* default case for top level key that has no handler */ diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 580ab78f742..72e0631e8b3 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -219,34 +219,35 @@ static BOOL get_subkey_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *m static BOOL get_value_information( REGISTRY_KEY *key, uint32 *maxnum, uint32 *maxlen, uint32 *maxsize ) { - REGVAL_CTR val; + REGVAL_CTR values; + REGISTRY_VALUE *val; uint32 sizemax, lenmax; - int num_values; + int i, num_values; if ( !key ) return False; ZERO_STRUCTP( &val ); - regval_ctr_init( &val ); + regval_ctr_init( &values ); - if ( fetch_reg_values( key, &val ) == -1 ) + if ( fetch_reg_values( key, &values ) == -1 ) return False; lenmax = sizemax = 0; - num_values = regval_ctr_numvals( &val ); + num_values = regval_ctr_numvals( &values ); -#if 0 /* JERRY */ - for ( i=0; i Date: Sat, 20 Jul 2002 14:01:40 +0000 Subject: [PATCH 054/262] Oops, my bad. I forgot to assign this, so lookupnames wasn't doing much :-) (This used to be commit 508106285380b772850238a8ed6b78a2c3334887) --- source3/utils/net_rpc_join.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 61adb2a8ff7..3106c994f5d 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -134,6 +134,7 @@ int net_rpc_join_newstyle(int argc, const char **argv) /* Create domain user */ acct_name = talloc_asprintf(mem_ctx, "%s$", global_myname); strlower(acct_name); + const_acct_name = acct_name; acb_info = ((lp_server_role() == ROLE_DOMAIN_BDC) || lp_server_role() == ROLE_DOMAIN_PDC) ? ACB_SVRTRUST : ACB_WSTRUST; From 27211c55e2d8e474cef0abe80847a4387aa688e3 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 20 Jul 2002 21:56:26 +0000 Subject: [PATCH 055/262] Don't try and sys_dup2(dbf->fd) if dbf == NULL. (This used to be commit 0fd155a06c24ec5d1310213baf7a4230242498be) --- source3/lib/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/debug.c b/source3/lib/debug.c index c43a98f4fad..be5f66a562a 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -603,7 +603,7 @@ BOOL reopen_logs( void ) (void)umask(oldumask); /* Take over stderr to catch ouput into logs */ - if (sys_dup2(dbf->fd, 2) == -1) { + if (dbf && sys_dup2(dbf->fd, 2) == -1) { close_low_fds(True); /* Close stderr too, if dup2 can't point it at the logfile */ } From c30f930262b2156e15f7dc927f2c71fc20f47f46 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 23:55:17 +0000 Subject: [PATCH 056/262] And a little more 'const'. (This used to be commit 2cbbf0ecd33774041dd831956935ab3cf69ce2a6) --- source3/param/loadparm.c | 4 ++-- source3/printing/pcap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0602e901a41..a5f01c6abf7 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1977,9 +1977,9 @@ static BOOL lp_add_ipc(char *ipc_name, BOOL guest_ok) /*************************************************************************** add a new printer service, with defaults coming from service iFrom. ***************************************************************************/ -BOOL lp_add_printer(char *pszPrintername, int iDefaultService) +BOOL lp_add_printer(const char *pszPrintername, int iDefaultService) { - char *comment = "From Printcap"; + const char *comment = "From Printcap"; int i = add_a_service(ServicePtrs[iDefaultService], pszPrintername); if (i < 0) diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index 46d1128b8e1..86489e9587c 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -246,7 +246,7 @@ passed as NULL, the configuration will be queried for the name. BOOL pcap_printername_ok(const char *pszPrintername, const char *pszPrintcapname) { char *line=NULL; - char *psz; + const char *psz; char *p,*q; XFILE *pfile; From 48159764355e29a834ad0a6df2240642033775c7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 00:00:22 +0000 Subject: [PATCH 057/262] Compilers do find bugs :-) This was a mixup between the enum type NSS_STATUS and a BOOL (extra test for equality). Andrew Bartlett (This used to be commit 63b7820b6585608c0ebb582ec8b28ed3c949a1f4) --- source3/nsswitch/wbinfo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index 4a23e3abe23..4d36acc51b3 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -255,8 +255,7 @@ static BOOL wbinfo_check_secret(void) ZERO_STRUCT(response); - result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response) == - NSS_STATUS_SUCCESS; + result = winbindd_request(WINBINDD_CHECK_MACHACC, NULL, &response); d_printf("checking the trust secret via RPC calls %s\n", (result == NSS_STATUS_SUCCESS) ? "succeeded" : "failed"); From 2582e955e70d166f707fd1374c1f9c120f10c2c2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 00:08:16 +0000 Subject: [PATCH 058/262] More use of intermediate variables to avoid issues with pointer size and casts. Andrew Bartlett (This used to be commit 88b68f79721b5fea7ddcad5a83b9555528c75c20) --- source3/rpc_server/srv_samr_nt.c | 36 ++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 96960611b7f..eb74acf35be 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -4197,6 +4197,8 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW uint32 num_users=0, num_groups=0, num_aliases=0; + uint32 account_policy_temp; + if ((ctr = (SAM_UNK_CTR *)talloc_zero(p->mem_ctx, sizeof(SAM_UNK_CTR))) == NULL) return NT_STATUS_NO_MEMORY; @@ -4212,11 +4214,20 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW switch (q_u->switch_value) { case 0x01: - account_policy_get(AP_MIN_PASSWORD_LEN, &min_pass_len); - account_policy_get(AP_PASSWORD_HISTORY, &pass_hist); - account_policy_get(AP_USER_MUST_LOGON_TO_CHG_PASS, &flag); - account_policy_get(AP_MAX_PASSWORD_AGE, (int *)&u_expire); - account_policy_get(AP_MIN_PASSWORD_AGE, (int *)&u_min_age); + account_policy_get(AP_MIN_PASSWORD_LEN, &account_policy_temp); + min_pass_len = account_policy_temp; + + account_policy_get(AP_PASSWORD_HISTORY, &account_policy_temp); + pass_hist = account_policy_temp; + + account_policy_get(AP_USER_MUST_LOGON_TO_CHG_PASS, &account_policy_temp); + flag = account_policy_temp; + + account_policy_get(AP_MAX_PASSWORD_AGE, &account_policy_temp); + u_expire = account_policy_temp; + + account_policy_get(AP_MIN_PASSWORD_AGE, &account_policy_temp); + u_min_age = account_policy_temp; unix_to_nt_time_abs(&nt_expire, u_expire); unix_to_nt_time_abs(&nt_min_age, u_min_age); @@ -4248,7 +4259,9 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW num_users, num_groups, num_aliases); break; case 0x03: - account_policy_get(AP_TIME_TO_LOGOUT, (int *)&u_logout); + account_policy_get(AP_TIME_TO_LOGOUT, &account_policy_temp); + u_logout = account_policy_temp; + unix_to_nt_time_abs(&nt_logout, u_logout); init_unk_info3(&ctr->info.inf3, nt_logout); @@ -4263,9 +4276,14 @@ NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOW init_unk_info7(&ctr->info.inf7); break; case 0x0c: - account_policy_get(AP_LOCK_ACCOUNT_DURATION, (int *)&u_lock_duration); - account_policy_get(AP_RESET_COUNT_TIME, (int *)&u_reset_time); - account_policy_get(AP_BAD_ATTEMPT_LOCKOUT, &lockout); + account_policy_get(AP_LOCK_ACCOUNT_DURATION, &account_policy_temp); + u_lock_duration = account_policy_temp; + + account_policy_get(AP_RESET_COUNT_TIME, &account_policy_temp); + u_reset_time = account_policy_temp; + + account_policy_get(AP_BAD_ATTEMPT_LOCKOUT, &account_policy_temp); + lockout = account_policy_temp; unix_to_nt_time_abs(&nt_lock_duration, u_lock_duration); unix_to_nt_time_abs(&nt_reset_time, u_reset_time); From 035738863609b0762a18962f1c471bb385254f10 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 21 Jul 2002 00:49:16 +0000 Subject: [PATCH 059/262] Renamed all the new_cli_netlogon_* functions to cli_netlogon_* as they're no longer new! (This used to be commit 277f6bbb9a63541a473a80a7994e9bde5c6f22dc) --- source3/auth/auth_domain.c | 2 +- source3/libsmb/cli_netlogon.c | 30 +++++++++++++++--------------- source3/libsmb/trust_passwd.c | 2 +- source3/nsswitch/winbindd_cm.c | 4 ++-- source3/rpcclient/cmd_netlogon.c | 6 +++--- source3/utils/net_rpc_join.c | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index ee3793a6c1e..0f084dc1de0 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -139,7 +139,7 @@ machine %s. Error was : %s.\n", remote_machine, cli_errstr(*cli))); return NT_STATUS_NO_MEMORY; } - result = new_cli_nt_setup_creds(*cli, sec_chan, trust_passwd); + result = cli_nt_setup_creds(*cli, sec_chan, trust_passwd); if (!NT_STATUS_IS_OK(result)) { DEBUG(0,("connect_to_domain_password_server: unable to setup the PDC credentials to machine \ diff --git a/source3/libsmb/cli_netlogon.c b/source3/libsmb/cli_netlogon.c index d32e0e77e48..acc91355428 100644 --- a/source3/libsmb/cli_netlogon.c +++ b/source3/libsmb/cli_netlogon.c @@ -28,8 +28,8 @@ /* LSA Request Challenge. Sends our challenge to server, then gets server response. These are used to generate the credentials. */ -NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, - DOM_CHAL *srv_chal) +NTSTATUS cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, + DOM_CHAL *srv_chal) { prs_struct qbuf, rbuf; NET_Q_REQ_CHAL q; @@ -42,7 +42,7 @@ NTSTATUS new_cli_net_req_chal(struct cli_state *cli, DOM_CHAL *clnt_chal, /* create and send a MSRPC command with api NET_REQCHAL */ - DEBUG(4,("new_cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n", + DEBUG(4,("cli_net_req_chal: LSA Request Challenge from %s to %s: %s\n", global_myname, cli->desthost, credstr(clnt_chal->data))); /* store the parameters */ @@ -84,9 +84,9 @@ Ensure that the server credential returned matches the session key encrypt of the server challenge originally received. JRA. ****************************************************************************/ -NTSTATUS new_cli_net_auth2(struct cli_state *cli, - uint16 sec_chan, - uint32 neg_flags, DOM_CHAL *srv_chal) +NTSTATUS cli_net_auth2(struct cli_state *cli, + uint16 sec_chan, + uint32 neg_flags, DOM_CHAL *srv_chal) { prs_struct qbuf, rbuf; NET_Q_AUTH_2 q; @@ -99,7 +99,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, /* create and send a MSRPC command with api NET_AUTH2 */ - DEBUG(4,("new_cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n", + DEBUG(4,("cli_net_auth2: srv:%s acct:%s sc:%x mc: %s chal %s neg: %x\n", cli->srv_name_slash, cli->mach_acct, sec_chan, global_myname, credstr(cli->clnt_cred.challenge.data), neg_flags)); @@ -138,7 +138,7 @@ NTSTATUS new_cli_net_auth2(struct cli_state *cli, /* * Server replied with bad credential. Fail. */ - DEBUG(0,("new_cli_net_auth2: server %s replied with bad credential (bad machine \ + DEBUG(0,("cli_net_auth2: server %s replied with bad credential (bad machine \ password ?).\n", cli->desthost )); result = NT_STATUS_ACCESS_DENIED; goto done; @@ -154,9 +154,9 @@ password ?).\n", cli->desthost )); /* Initialize domain session credentials */ -NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, - uint16 sec_chan, - const unsigned char mach_pwd[16]) +NTSTATUS cli_nt_setup_creds(struct cli_state *cli, + uint16 sec_chan, + const unsigned char mach_pwd[16]) { DOM_CHAL clnt_chal; DOM_CHAL srv_chal; @@ -168,10 +168,10 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, generate_random_buffer(clnt_chal.data, 8, False); /* send a client challenge; receive a server challenge */ - result = new_cli_net_req_chal(cli, &clnt_chal, &srv_chal); + result = cli_net_req_chal(cli, &clnt_chal, &srv_chal); if (!NT_STATUS_IS_OK(result)) { - DEBUG(0,("new_cli_nt_setup_creds: request challenge failed\n")); + DEBUG(0,("cli_nt_setup_creds: request challenge failed\n")); return result; } @@ -194,8 +194,8 @@ NTSTATUS new_cli_nt_setup_creds(struct cli_state *cli, * Receive an auth-2 challenge response and check it. */ - result = new_cli_net_auth2(cli, sec_chan, 0x000001ff, - &srv_chal); + result = cli_net_auth2(cli, sec_chan, 0x000001ff, &srv_chal); + if (!NT_STATUS_IS_OK(result)) { DEBUG(1,("cli_nt_setup_creds: auth2 challenge failed %s\n", nt_errstr(result))); diff --git a/source3/libsmb/trust_passwd.c b/source3/libsmb/trust_passwd.c index 3b77f7330eb..fe6b673e39e 100644 --- a/source3/libsmb/trust_passwd.c +++ b/source3/libsmb/trust_passwd.c @@ -35,7 +35,7 @@ static NTSTATUS just_change_the_password(struct cli_state *cli, TALLOC_CTX *mem_ unsigned char new_trust_passwd_hash[16]) { NTSTATUS result; - result = new_cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + result = cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? SEC_CHAN_WKSTA : SEC_CHAN_BDC, orig_trust_passwd_hash); if (!NT_STATUS_IS_OK(result)) { diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 3ab97ed408f..674e71679c1 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -794,7 +794,7 @@ NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd, return result; } - result = new_cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + result = cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); if (!NT_STATUS_IS_OK(result)) { @@ -808,7 +808,7 @@ NTSTATUS cm_get_netlogon_cli(char *domain, unsigned char *trust_passwd, } /* Try again */ - result = new_cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + result = cli_nt_setup_creds(conn->cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); } diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 2e895726606..c3bc9e5e130 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -174,7 +174,7 @@ static NTSTATUS cmd_netlogon_sam_sync(struct cli_state *cli, goto done; } - result = new_cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + result = cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); if (!NT_STATUS_IS_OK(result)) { @@ -238,7 +238,7 @@ static NTSTATUS cmd_netlogon_sam_deltas(struct cli_state *cli, goto done; } - result = new_cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + result = cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); if (!NT_STATUS_IS_OK(result)) { @@ -301,7 +301,7 @@ static NTSTATUS cmd_netlogon_sam_logon(struct cli_state *cli, goto done; } - result = new_cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? + result = cli_nt_setup_creds(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ? SEC_CHAN_WKSTA : SEC_CHAN_BDC, trust_passwd); if (!NT_STATUS_IS_OK(result)) { diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index 3106c994f5d..cfa37d25df5 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -272,7 +272,7 @@ int net_rpc_join_newstyle(int argc, const char **argv) goto done; } - CHECK_RPC_ERR(new_cli_nt_setup_creds(cli, + CHECK_RPC_ERR(cli_nt_setup_creds(cli, (acb_info & ACB_SVRTRUST) ? SEC_CHAN_BDC : SEC_CHAN_WKSTA, stored_md4_trust_password), "error in domain join verification"); From a6a612a8144019937740753e2a14f823d3c92dd4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 01:20:28 +0000 Subject: [PATCH 060/262] Looks like I missed this earlier. We should connect as the specified workgroup - sombody using smbspool won't always have a full smb.conf, and this is how it was written in the first place anyway. Again, found by the IRIX compiler. Andrew Bartlett (This used to be commit 31181158766cd5f0e8409854f3c304f6fb46582b) --- source3/client/smbspool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 7804669cc88..ecb5c311c54 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -282,7 +282,7 @@ smb_connect(char *workgroup, /* I - Workgroup */ get_myname(myname); nt_status = cli_full_connection(&c, myname, server, NULL, 0, share, "?????", - username, lp_workgroup(), password, 0); + username, workgroup, password, 0); if (!NT_STATUS_IS_OK(nt_status)) { fprintf(stderr, "ERROR: Connection failed with error %s\n", nt_errstr(nt_status)); From 0cdc28ab40ed1da48133171450a7ef35afb62e15 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 02:36:33 +0000 Subject: [PATCH 061/262] Tpot missed one... (This used to be commit 28373e5bc2acc09a9e4c9dab3f76c21d04850dde) --- source3/rpcclient/samsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index 5b64cbc47d0..802666841dc 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -278,7 +278,7 @@ static NTSTATUS sam_sync(struct cli_state *cli, unsigned char trust_passwd[16], /* Request a challenge */ - if (!NT_STATUS_IS_OK(new_cli_nt_setup_creds(cli, SEC_CHAN_BDC, trust_passwd))) { + if (!NT_STATUS_IS_OK(cli_nt_setup_creds(cli, SEC_CHAN_BDC, trust_passwd))) { DEBUG(0, ("Error initialising session creds\n")); goto done; } From afb7d1dc48fa3eab69212c3ffbd51d636c897ec0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 03:26:10 +0000 Subject: [PATCH 062/262] Another smattering of static and const (This used to be commit 897cc4a610932e596f8a9807213166e380ef0203) --- source3/lib/util.c | 2 +- source3/nsswitch/pam_winbind.c | 14 +++++++------- source3/nsswitch/winbindd.c | 2 +- source3/torture/locktest.c | 2 +- source3/utils/pdbedit.c | 2 +- source3/utils/smbcacls.c | 2 +- source3/utils/smbtree.c | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source3/lib/util.c b/source3/lib/util.c index bcef3013f9d..ae94b710b2c 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -100,7 +100,7 @@ char *tmpdir(void) Determine whether we are in the specified group. ****************************************************************************/ -BOOL in_group(gid_t group, gid_t current_gid, int ngroups, gid_t *groups) +BOOL in_group(gid_t group, gid_t current_gid, int ngroups, const gid_t *groups) { int i; diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 4739cfbf7ad..a8754d1710d 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -79,7 +79,7 @@ static int converse(pam_handle_t *pamh, int nargs, } -int _make_remark(pam_handle_t * pamh, int type, const char *text) +static int _make_remark(pam_handle_t * pamh, int type, const char *text) { int retval = PAM_SUCCESS; @@ -241,12 +241,12 @@ static char *_pam_delete(register char *xx) * obtain a password from the user */ -int _winbind_read_password(pam_handle_t * pamh - ,unsigned int ctrl - ,const char *comment - ,const char *prompt1 - ,const char *prompt2 - ,const char **pass) +static int _winbind_read_password(pam_handle_t * pamh + ,unsigned int ctrl + ,const char *comment + ,const char *prompt1 + ,const char *prompt2 + ,const char **pass) { int authtok_flag; int retval; diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 358d9add3a3..fbeb6b6347f 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -25,7 +25,7 @@ /* List of all connected clients */ -struct winbindd_cli_state *client_list; +static struct winbindd_cli_state *client_list; static int num_clients; BOOL opt_nocache = False; BOOL opt_dual_daemon = False; diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index c34b4c1ad2d..a62f7af1ad6 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -136,7 +136,7 @@ static void show_locks(void) /***************************************************** return a connection to a server *******************************************************/ -struct cli_state *connect_one(char *share, int snum) +static struct cli_state *connect_one(char *share, int snum) { struct cli_state *c; struct nmb_name called, calling; diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index b30ab6f38e8..5fa7e3be959 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -30,7 +30,7 @@ extern BOOL AllowDebugChange; Add all currently available users to another db ********************************************************/ -int export_database (struct pdb_context *in, char *db){ +static int export_database (struct pdb_context *in, char *db){ struct pdb_context *context; SAM_ACCOUNT *user = NULL; diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index b6a13180a37..4f9df90fa28 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -29,7 +29,7 @@ static pstring owner_username; static fstring server; static int got_pass; static int test_args; -TALLOC_CTX *ctx; +static TALLOC_CTX *ctx; #define CREATE_ACCESS_READ READ_CONTROL_ACCESS #define CREATE_ACCESS_WRITE (WRITE_DAC_ACCESS | WRITE_OWNER_ACCESS) diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index bcb460ee0bf..b733f8112f3 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -32,7 +32,7 @@ struct user_auth_info { /* How low can we go? */ enum tree_level {LEV_WORKGROUP, LEV_SERVER, LEV_SHARE}; -enum tree_level level = LEV_SHARE; +static enum tree_level level = LEV_SHARE; static void usage(void) { From 6e47dc89a336af2ed779c81e8a18948a2aa71b6c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 03:34:02 +0000 Subject: [PATCH 063/262] Add some const & static, remove unused functions. (This used to be commit 993ee671cc11a95d0d0aa6d60883e03bb473290d) --- source3/smbd/lanman.c | 2 +- source3/smbd/password.c | 23 ----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 049dae98e3f..8bfad4ab334 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -3554,7 +3554,7 @@ static BOOL api_Unsupported(connection_struct *conn,uint16 vuid, char *param,cha -struct +const static struct { char *name; int id; diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 82c0cef77d7..9c67edd2551 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -89,29 +89,6 @@ void invalidate_all_vuids(void) } } -/**************************************************************************** -return a validated username -****************************************************************************/ -char *validated_username(uint16 vuid) -{ - user_struct *vuser = get_valid_user_struct(vuid); - if (vuser == NULL) - return 0; - return(vuser->user.unix_name); -} - -/**************************************************************************** -return a validated domain -****************************************************************************/ -char *validated_domain(uint16 vuid) -{ - user_struct *vuser = get_valid_user_struct(vuid); - if (vuser == NULL) - return 0; - return(vuser->user.domain); -} - - /**************************************************************************** Create the SID list for this user. ****************************************************************************/ From ceb73e9b3e6695a8efc4c2815fa1448be3239dbc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 21 Jul 2002 04:01:04 +0000 Subject: [PATCH 064/262] More cleanups, and add a comment/hint not to clean somthing up in future :-) Andrew Bartlett (This used to be commit 21b0e8f560849be77bde463cf006ea0de54211e9) --- source3/passdb/util_sam_sid.c | 3 ++ source3/torture/locktest2.c | 74 +++++------------------------------ source3/utils/status.c | 8 ---- 3 files changed, 12 insertions(+), 73 deletions(-) diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c index 2c574f4a61e..6ec1e48ab3a 100644 --- a/source3/passdb/util_sam_sid.c +++ b/source3/passdb/util_sam_sid.c @@ -95,6 +95,9 @@ static void init_sid_name_map (void) if ((lp_security() == SEC_USER) && lp_domain_logons()) { sid_name_map[i].sid = get_global_sam_sid(); + /* This is not lp_workgroup() for good reason: + it must stay around longer than the lp_*() + strings do */ sid_name_map[i].name = global_myworkgroup; sid_name_map[i].known_users = NULL; i++; diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c index 3c24cfaa4a2..58817bbd360 100644 --- a/source3/torture/locktest2.c +++ b/source3/torture/locktest2.c @@ -149,15 +149,14 @@ static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid, /***************************************************** return a connection to a server *******************************************************/ -struct cli_state *connect_one(char *share) +static struct cli_state *connect_one(char *share) { struct cli_state *c; - struct nmb_name called, calling; char *server_n; fstring server; - struct in_addr ip; fstring myname; static int count; + NTSTATUS nt_status; fstrcpy(server,share+2); share = strchr_m(server,'\\'); @@ -167,40 +166,6 @@ struct cli_state *connect_one(char *share) server_n = server; - zero_ip(&ip); - - slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++); - - make_nmb_name(&calling, myname, 0x0); - make_nmb_name(&called , server, 0x20); - - again: - zero_ip(&ip); - - /* have to open a new connection */ - if (!(c=cli_initialise(NULL)) || !cli_connect(c, server_n, &ip)) { - DEBUG(0,("Connection to %s failed\n", server_n)); - return NULL; - } - - if (!cli_session_request(c, &calling, &called)) { - DEBUG(0,("session request to %s failed\n", called.name)); - cli_shutdown(c); - if (strcmp(called.name, "*SMBSERVER")) { - make_nmb_name(&called , "*SMBSERVER", 0x20); - goto again; - } - return NULL; - } - - DEBUG(4,(" session request ok\n")); - - if (!cli_negprot(c)) { - DEBUG(0,("protocol negotiation failed\n")); - cli_shutdown(c); - return NULL; - } - if (!got_pass) { char *pass = getpass("Password: "); if (pass) { @@ -208,37 +173,16 @@ struct cli_state *connect_one(char *share) } } - if (!cli_session_setup(c, username, - password, strlen(password), - password, strlen(password), - lp_workgroup())) { - DEBUG(0,("session setup failed: %s\n", cli_errstr(c))); + slprintf(myname,sizeof(myname), "lock-%u-%u", getpid(), count++); + + nt_status = cli_full_connection(&c, myname, server_n, NULL, 0, share, "?????", + username, lp_workgroup(), password, 0); + + if (!NT_STATUS_IS_OK(nt_status)) { + DEBUG(0, ("cli_full_connection failed with error %s\n", nt_errstr(nt_status))); return NULL; } - /* - * These next two lines are needed to emulate - * old client behaviour for people who have - * scripts based on client output. - * QUESTION ? Do we want to have a 'client compatibility - * mode to turn these on/off ? JRA. - */ - - if (*c->server_domain || *c->server_os || *c->server_type) - DEBUG(1,("Domain=[%s] OS=[%s] Server=[%s]\n", - c->server_domain,c->server_os,c->server_type)); - - DEBUG(4,(" session setup ok\n")); - - if (!cli_send_tconX(c, share, "?????", - password, strlen(password)+1)) { - DEBUG(0,("tree connect failed: %s\n", cli_errstr(c))); - cli_shutdown(c); - return NULL; - } - - DEBUG(4,(" tconx ok\n")); - c->use_oplocks = use_oplocks; return c; diff --git a/source3/utils/status.c b/source3/utils/status.c index b1e8bb9d8e1..c624fc4c5fe 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -37,14 +37,6 @@ extern BOOL AllowDebugChange; -struct session_record{ - pid_t pid; - uid_t uid; - char machine[31]; - time_t start; - struct session_record *next; -} *srecs; - static pstring Ucrit_username = ""; /* added by OH */ static pid_t Ucrit_pid[100]; /* Ugly !!! */ /* added by OH */ static int Ucrit_MaxPid=0; /* added by OH */ From c0f66c1786cfbbff416a59b38930788cbe86f686 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 21 Jul 2002 04:55:11 +0000 Subject: [PATCH 065/262] Name get and set dir drive functions consistently. (This used to be commit 290a304d2c1b70d20129236e20a0ff664179023e) --- source3/passdb/pdb_get_set.c | 2 +- source3/passdb/pdb_ldap.c | 2 +- source3/passdb/pdb_nisplus.c | 14 +++++++------- source3/passdb/pdb_tdb.c | 3 ++- source3/rpc_parse/parse_samr.c | 2 +- source3/rpc_server/srv_netlog_nt.c | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index dff4b40f4de..ca1d54ebef1 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -250,7 +250,7 @@ const char* pdb_get_unix_homedir (const SAM_ACCOUNT *sampass) return (NULL); } -const char* pdb_get_dirdrive (const SAM_ACCOUNT *sampass) +const char* pdb_get_dir_drive (const SAM_ACCOUNT *sampass) { if (sampass) return (sampass->private.dir_drive); diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 24eb7b9dc1f..4eed632038a 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -880,7 +880,7 @@ static BOOL init_ldap_from_sam (struct ldapsam_privates *ldap_state, make_a_mod(mods, ldap_op, "smbHome", pdb_get_homedir(sampass)); if (IS_SAM_SET(sampass, FLAG_SAM_DRIVE)) - make_a_mod(mods, ldap_op, "homeDrive", pdb_get_dirdrive(sampass)); + make_a_mod(mods, ldap_op, "homeDrive", pdb_get_dir_drive(sampass)); if (IS_SAM_SET(sampass, FLAG_SAM_LOGONSCRIPT)) make_a_mod(mods, ldap_op, "scriptPath", pdb_get_logon_script(sampass)); diff --git a/source3/passdb/pdb_nisplus.c b/source3/passdb/pdb_nisplus.c index 9c5b2e1171b..d6c0bcb6721 100644 --- a/source3/passdb/pdb_nisplus.c +++ b/source3/passdb/pdb_nisplus.c @@ -735,17 +735,17 @@ static BOOL init_nisp_from_sam(nis_object *obj, const SAM_ACCOUNT *sampass, /* dir_drive */ /* must support set, unset and change */ - if( (pdb_get_dirdrive(sampass) && + if( (pdb_get_dir_drive(sampass) && !ENTRY_VAL(old, NPF_DIR_DRIVE)) || (ENTRY_VAL(old, NPF_DIR_DRIVE) && - !pdb_get_dirdrive(sampass)) || + !pdb_get_dir_drive(sampass)) || (ENTRY_VAL(old, NPF_DIR_DRIVE) && - pdb_get_dirdrive(sampass) && + pdb_get_dir_drive(sampass) && strcmp( ENTRY_VAL(old, NPF_DIR_DRIVE), - pdb_get_dirdrive(sampass)))) { + pdb_get_dir_drive(sampass)))) { need_to_modify = True; - set_single_attribute(obj, NPF_DIR_DRIVE, pdb_get_dirdrive(sampass), - strlen(pdb_get_dirdrive(sampass)), EN_MODIFIED); + set_single_attribute(obj, NPF_DIR_DRIVE, pdb_get_dir_drive(sampass), + strlen(pdb_get_dir_drive(sampass)), EN_MODIFIED); } /* logon_script */ @@ -860,7 +860,7 @@ static BOOL init_nisp_from_sam(nis_object *obj, const SAM_ACCOUNT *sampass, set_single_attribute(obj, NPF_HOME_DIR, homedir, strlen(homedir), 0); - if(!(dirdrive = pdb_get_dirdrive(sampass))) + if(!(dirdrive = pdb_get_dir_drive(sampass))) dirdrive = empty; set_single_attribute(obj, NPF_DIR_DRIVE, diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 62793189696..0b3eaea900d 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -354,7 +354,8 @@ static uint32 init_buffer_from_sam (struct tdbsam_privates *tdb_state, * Only updates fields which have been set (not defaults from smb.conf) */ - if (IS_SAM_SET(sampass, FLAG_SAM_DRIVE)) dir_drive = pdb_get_dirdrive(sampass); + if (IS_SAM_SET(sampass, FLAG_SAM_DRIVE)) + dir_drive = pdb_get_dir_drive(sampass); else dir_drive = NULL; if (dir_drive) dir_drive_len = strlen(dir_drive) +1; else dir_drive_len = 0; diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index c16232204cd..36ce59b7f26 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5945,7 +5945,7 @@ NTSTATUS init_sam_user_info21A(SAM_USER_INFO_21 *usr, SAM_ACCOUNT *pw, DOM_SID * const char* user_name = pdb_get_username(pw); const char* full_name = pdb_get_fullname(pw); const char* home_dir = pdb_get_homedir(pw); - const char* dir_drive = pdb_get_dirdrive(pw); + const char* dir_drive = pdb_get_dir_drive(pw); const char* logon_script = pdb_get_logon_script(pw); const char* profile_path = pdb_get_profile_path(pw); const char* description = pdb_get_acct_desc(pw); diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c index 1f684bd929a..8f6011826aa 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -708,7 +708,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON * pdb_get_username(sampw), pdb_get_fullname(sampw), pdb_get_homedir(sampw), - pdb_get_dirdrive(sampw), + pdb_get_dir_drive(sampw), pdb_get_logon_script(sampw), pdb_get_profile_path(sampw), pdb_get_logon_time(sampw), From de4752d6e7d1922c14a51158dbab4497befa7d3c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 21 Jul 2002 06:32:25 +0000 Subject: [PATCH 066/262] Fix up dir drive call. (This used to be commit fe229cc126a4bfdce12882ac7eaa893e00cd506e) --- source3/utils/pdbedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 5fa7e3be959..f48c24fbc02 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -91,7 +91,7 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst sid_string_static(pdb_get_group_sid(sam_pwent))); printf ("Full Name: %s\n", pdb_get_fullname(sam_pwent)); printf ("Home Directory: %s\n", pdb_get_homedir(sam_pwent)); - printf ("HomeDir Drive: %s\n", pdb_get_dirdrive(sam_pwent)); + printf ("HomeDir Drive: %s\n", pdb_get_dir_drive(sam_pwent)); printf ("Logon Script: %s\n", pdb_get_logon_script(sam_pwent)); printf ("Profile Path: %s\n", pdb_get_profile_path(sam_pwent)); printf ("Domain: %s\n", pdb_get_domain(sam_pwent)); From 88bef55a6efceef72a1378d0c7fa93c277fb1940 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Jul 2002 14:00:40 +0000 Subject: [PATCH 067/262] fixed a segv in net time when the host is unavailable (This used to be commit f4f2b613a2a804a6d2e5e78cc7dd7f3482675fcd) --- source3/libsmb/cliconnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 1cf85875b6e..d304da7f518 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1071,7 +1071,7 @@ BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip) } if (cli->fd == -1) { DEBUG(1,("Error connecting to %s (%s)\n", - inet_ntoa(*ip),strerror(errno))); + ip?inet_ntoa(*ip):host,strerror(errno))); return False; } From 36606f727d07cc454f2a3106ef599376fa0635f7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 22 Jul 2002 19:32:13 +0000 Subject: [PATCH 068/262] Ensure we're root before opening a printer backend tdb. Jeremy. (This used to be commit 48ab4ae4221ed0be34c269e01a4e8b6bc93f87d7) --- source3/printing/printing.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 9b0e8cdfb0a..3579ddd7a0d 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -188,7 +188,11 @@ static struct tdb_print_db *get_print_db_byname(const char *printername) pstrcpy(printdb_path, lock_path("printing/")); pstrcat(printdb_path, printername); pstrcat(printdb_path, ".tdb"); + + become_root(); p->tdb = tdb_open_log(printdb_path, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); + unbecome_root(); + if (!p->tdb) { DEBUG(0,("get_print_db: Failed to open printer backend database %s.\n", printdb_path )); From 029fba81c660f8a27f4b61f34ecb118f5018efda Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 22 Jul 2002 21:02:18 +0000 Subject: [PATCH 069/262] fix seg fault due to memory allocation goof. (This used to be commit 8e94f68a80bda0cbc989fb36466dfbc17a07079d) --- source3/registry/reg_frontend.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index 6e550c1a0de..d8a10940fdf 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -304,6 +304,8 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, { len = strlen( name ); + /* allocate a slot in the array of pointers */ + if ( ctr->num_values == 0 ) ctr->values = talloc( ctr->ctx, sizeof(REGISTRY_VALUE*) ); else { @@ -312,6 +314,12 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, ctr->values = ppreg; } + /* allocate a new valuie and store the pointer in the arrya */ + + ctr->values[ctr->num_values] = talloc( ctr->ctx, sizeof(REGISTRY_VALUE) ); + + /* init the value */ + fstrcpy( ctr->values[ctr->num_values]->valuename, name ); ctr->values[ctr->num_values]->type = type; switch ( type ) From fb5153a93be4427d288e8b0bd2f44d53227f3965 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 22 Jul 2002 21:40:45 +0000 Subject: [PATCH 070/262] Merge from APPLIANCE_HEAD. (This used to be commit 825cdc49dbc3e6b9d08b8e722c82cc09e2479fa1) --- source3/printing/printing.c | 2 +- source3/rpc_server/srv_spoolss_nt.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 3579ddd7a0d..cb689c05d66 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1221,7 +1221,7 @@ int print_queue_length(int snum, print_status_struct *pstatus) static int get_total_jobs(void) { - int total_jobs; + int total_jobs = 0; int snum; int services = lp_numservices(); diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index ca5557a0dbb..822800de11c 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -101,7 +101,7 @@ typedef struct _counter_printer_0 { static ubi_dlList counter_list; -static struct cli_state cli; +static struct cli_state notify_cli; /* print notify back-channel */ static uint32 smb_connections=0; @@ -184,7 +184,7 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle) return; } - result = cli_spoolss_reply_close_printer(&cli, cli.mem_ctx, handle); + result = cli_spoolss_reply_close_printer(¬ify_cli, notify_cli.mem_ctx, handle); if (!W_ERROR_IS_OK(result)) DEBUG(0,("srv_spoolss_replycloseprinter: reply_close_printer failed [%s].\n", @@ -192,9 +192,9 @@ static void srv_spoolss_replycloseprinter(POLICY_HND *handle) /* if it's the last connection, deconnect the IPC$ share */ if (smb_connections==1) { - cli_nt_session_close(&cli); - cli_ulogoff(&cli); - cli_shutdown(&cli); + cli_nt_session_close(¬ify_cli); + cli_ulogoff(¬ify_cli); + cli_shutdown(¬ify_cli); message_deregister(MSG_PRINTER_NOTIFY2); } @@ -793,7 +793,7 @@ static void process_notify2_message(struct spoolss_notify_msg *msg, if (!p->notify.flags) cli_spoolss_rrpcn( - &cli, mem_ctx, &p->notify.client_hnd, + ¬ify_cli, mem_ctx, &p->notify.client_hnd, data_len, data, p->notify.change, 0); else { NT_PRINTER_INFO_LEVEL *printer = NULL; @@ -810,7 +810,7 @@ static void process_notify2_message(struct spoolss_notify_msg *msg, PRINTER_CHANGE_SET_PRINTER_DRIVER. */ cli_spoolss_routerreplyprinter( - &cli, mem_ctx, &p->notify.client_hnd, + ¬ify_cli, mem_ctx, &p->notify.client_hnd, 0, printer->info_2->changeid); free_a_printer(&printer, 2); @@ -1970,7 +1970,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */ - if(!spoolss_connect_to_client(&cli, unix_printer)) + if(!spoolss_connect_to_client(¬ify_cli, unix_printer)) return False; message_register(MSG_PRINTER_NOTIFY2, receive_notify2_message); @@ -1978,7 +1978,7 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin smb_connections++; - result = cli_spoolss_reply_open_printer(&cli, cli.mem_ctx, printer, localprinter, + result = cli_spoolss_reply_open_printer(¬ify_cli, notify_cli.mem_ctx, printer, localprinter, type, handle); if (!W_ERROR_IS_OK(result)) From ff667e0983a4ec7009f53ba533490d9f766b75be Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 22 Jul 2002 21:53:36 +0000 Subject: [PATCH 071/262] Sync with APPLIANCE_HEAD branch (whitespace, const only) (This used to be commit 11229aa88b60d820ba714f2c793fe6932ec67a6b) --- source3/rpc_server/srv_spoolss_nt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 822800de11c..bc58655f711 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8363,5 +8363,3 @@ WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROC return result; } - - From ca07fb330f08d7dea17667b2a34b9065c8062a12 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Jul 2002 03:38:35 +0000 Subject: [PATCH 072/262] removed the freebsd getgroups check now that we don't use it (This used to be commit d25dc761374ac832e2c5f6b32b7a468ea5a8591e) --- source3/configure.in | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/source3/configure.in b/source3/configure.in index 915c91e5850..77c14c71917 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2709,30 +2709,6 @@ else fi -# Check for FreeBSD problem with getgroups -# It returns EGID too many times in the list of groups -# and causes a security problem -AC_CACHE_CHECK([whether or not getgroups returns EGID too many times], - samba_cv_have_getgroups_too_many_egids,[AC_TRY_RUN([ -#include -#include - -int main(int argc, char *argv[]) -{ - gid_t groups[10]; - int n = 10; - - n = getgroups(n, &groups); - /* Could actually pass back the number of EGIDs there ... */ - exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0); -}], - samba_cv_have_getgroups_too_many_egids=no,samba_cv_have_getgroups_too_many_egids=yes, samba_cv_have_getgroups_too_many_egids=cross)]) -if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then - AC_DEFINE(HAVE_GETGROUPS_TOO_MANY_EGIDS) -fi - - - # Substitution time! AC_SUBST(WINBIND_TARGETS) From e4021785fff63c39d76b6da26bdf956eca8e43b4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Jul 2002 03:39:55 +0000 Subject: [PATCH 073/262] added LDAP_SET_REBIND_PROC_ARGS in acconfig.h andrew, you seem to have added this test but don't use it. Do you intend to use it later? If not then perhaps it can be removed. also, when a test goes in configure.in you must also add it to acconfig.h, or you end up breaking configure. (This used to be commit 496cd0876cc13e2dd25c6ddbfe04c5787dddb4dd) --- source3/acconfig.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/acconfig.h b/source3/acconfig.h index 3962b185548..274bc4aaadd 100644 --- a/source3/acconfig.h +++ b/source3/acconfig.h @@ -218,3 +218,6 @@ #ifndef _GNU_SOURCE #undef _GNU_SOURCE #endif + +#undef LDAP_SET_REBIND_PROC_ARGS + From 445a52ebb0cdbc5fff47559f70c2000283da9611 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Jul 2002 03:40:40 +0000 Subject: [PATCH 074/262] reran configure (This used to be commit 54c7ad47e13d92efd4c4dae2654e2e62927487e5) --- source3/configure | 1435 +++++++++++++++++------------------ source3/include/config.h.in | 16 +- 2 files changed, 699 insertions(+), 752 deletions(-) diff --git a/source3/configure b/source3/configure index be0e78133a7..a09c2d9b034 100755 --- a/source3/configure +++ b/source3/configure @@ -1115,7 +1115,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2867,15 +2867,16 @@ else #line 2868 "configure" #include "confdefs.h" #include -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF -if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2895,7 +2896,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2899: checking size of long" >&5 +echo "configure:2900: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2903,18 +2904,19 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF -if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2934,7 +2936,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2938: checking size of short" >&5 +echo "configure:2940: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2942,18 +2944,19 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF -if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2974,12 +2977,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2978: checking for working const" >&5 +echo "configure:2981: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3049,21 +3052,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3053: checking for inline" >&5 +echo "configure:3056: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3089,14 +3092,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3093: checking whether byte ordering is bigendian" >&5 +echo "configure:3096: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3107,11 +3110,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3122,7 +3125,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3142,7 +3145,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3179,14 +3182,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3183: checking whether char is unsigned" >&5 +echo "configure:3186: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3243,12 +3246,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3247: checking return type of signal handlers" >&5 +echo "configure:3250: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3265,7 +3268,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3284,12 +3287,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3288: checking for uid_t in sys/types.h" >&5 +echo "configure:3291: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3318,12 +3321,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3322: checking for mode_t" >&5 +echo "configure:3325: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3351,12 +3354,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3355: checking for off_t" >&5 +echo "configure:3358: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3384,12 +3387,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3388: checking for size_t" >&5 +echo "configure:3391: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3417,12 +3420,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3421: checking for pid_t" >&5 +echo "configure:3424: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3450,12 +3453,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3454: checking for st_rdev in struct stat" >&5 +echo "configure:3457: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3463,7 +3466,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3484,12 +3487,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3488: checking for d_off in dirent" >&5 +echo "configure:3491: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3499,7 +3502,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3520,12 +3523,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3524: checking for ino_t" >&5 +echo "configure:3527: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3553,12 +3556,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3557: checking for loff_t" >&5 +echo "configure:3560: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3586,12 +3589,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3590: checking for offset_t" >&5 +echo "configure:3593: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3619,12 +3622,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3623: checking for ssize_t" >&5 +echo "configure:3626: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3652,12 +3655,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3656: checking for wchar_t" >&5 +echo "configure:3659: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3699,7 +3702,7 @@ if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3703: checking for $ac_word" >&5 +echo "configure:3706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3748,12 +3751,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3752: checking for $ac_func" >&5 +echo "configure:3755: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3802,7 +3805,7 @@ done if test x"$ac_cv_func_dlopen" = x"no"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3806: checking for dlopen in -ldl" >&5 +echo "configure:3809: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3810,7 +3813,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3851,13 +3854,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3855: checking for immediate structures" >&5 +echo "configure:3858: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3875,7 +3878,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3898,13 +3901,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3902: checking for unix domain sockets" >&5 +echo "configure:3905: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3919,7 +3922,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3941,13 +3944,13 @@ fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3945: checking for socklen_t type" >&5 +echo "configure:3948: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3960,7 +3963,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3981,13 +3984,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3985: checking for sig_atomic_t type" >&5 +echo "configure:3988: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4000,7 +4003,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -4023,20 +4026,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4027: checking for errno declaration" >&5 +echo "configure:4030: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -4058,20 +4061,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4062: checking for setresuid declaration" >&5 +echo "configure:4065: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -4093,20 +4096,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4097: checking for setresgid declaration" >&5 +echo "configure:4100: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -4128,20 +4131,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4132: checking for asprintf declaration" >&5 +echo "configure:4135: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4163,20 +4166,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4167: checking for vasprintf declaration" >&5 +echo "configure:4170: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4198,20 +4201,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4202: checking for vsnprintf declaration" >&5 +echo "configure:4205: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4233,20 +4236,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4237: checking for snprintf declaration" >&5 +echo "configure:4240: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4270,7 +4273,7 @@ EOF # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4274: checking for real setresuid" >&5 +echo "configure:4277: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4279,12 +4282,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -4309,7 +4312,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4313: checking for real setresgid" >&5 +echo "configure:4316: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4318,13 +4321,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresgid=yes else @@ -4347,7 +4350,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4351: checking for 8-bit clean memcmp" >&5 +echo "configure:4354: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4355,7 +4358,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4388,12 +4391,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4392: checking for $ac_func" >&5 +echo "configure:4395: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4442,7 +4445,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4446: checking for crypt in -lcrypt" >&5 +echo "configure:4449: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4450,7 +4453,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4494,7 +4497,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4498: checking whether to use readline" >&5 +echo "configure:4501: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4506,17 +4509,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4510: checking for $ac_hdr" >&5 +echo "configure:4513: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4546,17 +4549,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4550: checking for $ac_hdr" >&5 +echo "configure:4553: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4587,17 +4590,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4591: checking for $ac_hdr" >&5 +echo "configure:4594: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4620,7 +4623,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4624: checking for tgetent in -l${termlib}" >&5 +echo "configure:4627: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4628,7 +4631,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4661,7 +4664,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4665: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4668: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4669,7 +4672,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4731,17 +4734,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4735: checking for $ac_hdr" >&5 +echo "configure:4738: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4771,17 +4774,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4775: checking for $ac_hdr" >&5 +echo "configure:4778: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4812,17 +4815,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4816: checking for $ac_hdr" >&5 +echo "configure:4819: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4845,7 +4848,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4849: checking for tgetent in -l${termlib}" >&5 +echo "configure:4852: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4853,7 +4856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4886,7 +4889,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4890: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4893: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4894,7 +4897,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4955,7 +4958,7 @@ fi # code will generate warnings on one of them unless we have a few # special cases. echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:4959: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:4962: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4963,7 +4966,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5007,12 +5010,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5011: checking for $ac_func" >&5 +echo "configure:5014: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5063,7 +5066,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5067: checking for printf in -lnsl_s" >&5 +echo "configure:5070: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5071,7 +5074,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5113,7 +5116,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5117: checking for printf in -lnsl" >&5 +echo "configure:5120: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5121,7 +5124,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5163,7 +5166,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5167: checking for connect in -lsocket" >&5 +echo "configure:5170: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5171,7 +5174,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5213,7 +5216,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5217: checking for connect in -linet" >&5 +echo "configure:5220: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5221,7 +5224,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5276,12 +5279,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5280: checking for $ac_func" >&5 +echo "configure:5283: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5330,7 +5333,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5334: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5337: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5338,7 +5341,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5379,12 +5382,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5383: checking for $ac_func" >&5 +echo "configure:5386: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5440,12 +5443,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5444: checking for $ac_func" >&5 +echo "configure:5447: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5495,12 +5498,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5499: checking for $ac_func" >&5 +echo "configure:5502: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5550,12 +5553,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5554: checking for $ac_func" >&5 +echo "configure:5557: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5605,12 +5608,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5609: checking for $ac_func" >&5 +echo "configure:5612: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5660,12 +5663,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5664: checking for $ac_func" >&5 +echo "configure:5667: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5715,12 +5718,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5719: checking for $ac_func" >&5 +echo "configure:5722: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5770,12 +5773,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5774: checking for $ac_func" >&5 +echo "configure:5777: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5825,12 +5828,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5829: checking for $ac_func" >&5 +echo "configure:5832: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5880,12 +5883,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5884: checking for $ac_func" >&5 +echo "configure:5887: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5935,12 +5938,12 @@ done for ac_func in syslog vsyslog do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5939: checking for $ac_func" >&5 +echo "configure:5942: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5991,12 +5994,12 @@ done for ac_func in setbuffer do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5995: checking for $ac_func" >&5 +echo "configure:5998: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6048,12 +6051,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6052: checking for $ac_func" >&5 +echo "configure:6055: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6104,12 +6107,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6108: checking for $ac_func" >&5 +echo "configure:6111: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6159,12 +6162,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6163: checking for $ac_func" >&5 +echo "configure:6166: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6214,12 +6217,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6218: checking for $ac_func" >&5 +echo "configure:6221: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6269,12 +6272,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6273: checking for $ac_func" >&5 +echo "configure:6276: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6324,12 +6327,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6328: checking for $ac_func" >&5 +echo "configure:6331: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6379,12 +6382,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6383: checking for $ac_func" >&5 +echo "configure:6386: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6434,12 +6437,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6438: checking for $ac_func" >&5 +echo "configure:6441: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6489,12 +6492,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6493: checking for $ac_func" >&5 +echo "configure:6496: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6544,12 +6547,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6548: checking for $ac_func" >&5 +echo "configure:6551: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6599,12 +6602,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6603: checking for $ac_func" >&5 +echo "configure:6606: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6654,12 +6657,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6658: checking for $ac_func" >&5 +echo "configure:6661: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6709,12 +6712,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6713: checking for $ac_func" >&5 +echo "configure:6716: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6764,12 +6767,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6768: checking for $ac_func" >&5 +echo "configure:6771: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6819,12 +6822,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6823: checking for $ac_func" >&5 +echo "configure:6826: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6878,9 +6881,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6882: checking for stat64 in " >&5 +echo "configure:6885: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6911,9 +6914,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6915: checking for lstat64 in " >&5 +echo "configure:6918: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6944,9 +6947,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6948: checking for fstat64 in " >&5 +echo "configure:6951: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6978,7 +6981,7 @@ fi ##################################### # we might need the resolv library on some systems echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:6982: checking for dn_expand in -lresolv" >&5 +echo "configure:6985: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6986,7 +6989,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7035,12 +7038,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7039: checking for $ac_func" >&5 +echo "configure:7042: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7088,7 +7091,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7092: checking for putprpwnam in -lsecurity" >&5 +echo "configure:7095: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7096,7 +7099,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7137,12 +7140,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7141: checking for $ac_func" >&5 +echo "configure:7144: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7196,12 +7199,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7200: checking for $ac_func" >&5 +echo "configure:7203: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7249,7 +7252,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7253: checking for putprpwnam in -lsec" >&5 +echo "configure:7256: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7257,7 +7260,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7298,12 +7301,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7302: checking for $ac_func" >&5 +echo "configure:7305: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7358,12 +7361,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7362: checking for $ac_func" >&5 +echo "configure:7365: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7411,7 +7414,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7415: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7418: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7419,7 +7422,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7460,12 +7463,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7464: checking for $ac_func" >&5 +echo "configure:7467: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7519,12 +7522,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7523: checking for $ac_func" >&5 +echo "configure:7526: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7572,7 +7575,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7576: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7579: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7580,7 +7583,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7621,12 +7624,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7625: checking for $ac_func" >&5 +echo "configure:7628: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7682,12 +7685,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7686: checking for $ac_func" >&5 +echo "configure:7689: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7735,7 +7738,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7739: checking for getspnam in -lgen" >&5 +echo "configure:7742: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7743,7 +7746,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7784,12 +7787,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7788: checking for $ac_func" >&5 +echo "configure:7791: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7844,12 +7847,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7848: checking for $ac_func" >&5 +echo "configure:7851: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7897,7 +7900,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7901: checking for getspnam in -lsecurity" >&5 +echo "configure:7904: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7905,7 +7908,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7946,12 +7949,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7950: checking for $ac_func" >&5 +echo "configure:7953: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8005,12 +8008,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8009: checking for $ac_func" >&5 +echo "configure:8012: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8058,7 +8061,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8062: checking for getspnam in -lsec" >&5 +echo "configure:8065: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8066,7 +8069,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8107,12 +8110,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8111: checking for $ac_func" >&5 +echo "configure:8114: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8167,12 +8170,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8171: checking for $ac_func" >&5 +echo "configure:8174: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8220,7 +8223,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8224: checking for bigcrypt in -lsecurity" >&5 +echo "configure:8227: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8228,7 +8231,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8269,12 +8272,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8273: checking for $ac_func" >&5 +echo "configure:8276: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8328,12 +8331,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8332: checking for $ac_func" >&5 +echo "configure:8335: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8381,7 +8384,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8385: checking for bigcrypt in -lsec" >&5 +echo "configure:8388: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8389,7 +8392,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8430,12 +8433,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8434: checking for $ac_func" >&5 +echo "configure:8437: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8490,12 +8493,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8494: checking for $ac_func" >&5 +echo "configure:8497: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8543,7 +8546,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8547: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8550: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8551,7 +8554,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8592,12 +8595,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8596: checking for $ac_func" >&5 +echo "configure:8599: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8651,12 +8654,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8655: checking for $ac_func" >&5 +echo "configure:8658: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8704,7 +8707,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8708: checking for getprpwnam in -lsec" >&5 +echo "configure:8711: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8712,7 +8715,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8753,12 +8756,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8757: checking for $ac_func" >&5 +echo "configure:8760: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8825,7 +8828,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8829: checking ability to build shared libraries" >&5 +echo "configure:8832: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8985,7 +8988,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8989: checking for $ac_word" >&5 +echo "configure:8992: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9042,17 +9045,17 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9046: checking linker flags for shared libraries" >&5 +echo "configure:9049: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9049: checking compiler flags for position-independent code" >&5 +echo "configure:9052: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9056: checking whether building shared libraries actually works" >&5 +echo "configure:9059: checking whether building shared libraries actually works" >&5 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9083,7 +9086,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9087: checking for long long" >&5 +echo "configure:9090: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9092,12 +9095,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -9124,20 +9127,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9128: checking for LL suffix on long long integers" >&5 +echo "configure:9131: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -9159,7 +9162,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9163: checking for 64 bit off_t" >&5 +echo "configure:9166: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9168,13 +9171,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -9197,7 +9200,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9201: checking for off64_t" >&5 +echo "configure:9204: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9206,7 +9209,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -9239,7 +9242,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9243: checking for 64 bit ino_t" >&5 +echo "configure:9246: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9248,13 +9251,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -9277,7 +9280,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9281: checking for ino64_t" >&5 +echo "configure:9284: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9286,7 +9289,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -9319,7 +9322,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9323: checking for dev64_t" >&5 +echo "configure:9326: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9328,7 +9331,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9361,13 +9364,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9365: checking for struct dirent64" >&5 +echo "configure:9368: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9400,7 +9403,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9404: checking for major macro" >&5 +echo "configure:9407: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9409,7 +9412,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9441,7 +9444,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9445: checking for minor macro" >&5 +echo "configure:9448: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9450,7 +9453,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9482,7 +9485,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9486: checking for unsigned char" >&5 +echo "configure:9489: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9491,12 +9494,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -9519,13 +9522,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9523: checking for sin_len in sock" >&5 +echo "configure:9526: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9534,7 +9537,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9555,13 +9558,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9559: checking whether seekdir returns void" >&5 +echo "configure:9562: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9570,7 +9573,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9591,20 +9594,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9595: checking for __FILE__ macro" >&5 +echo "configure:9598: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9625,20 +9628,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9629: checking for __FUNCTION__ macro" >&5 +echo "configure:9632: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9659,7 +9662,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9663: checking if gettimeofday takes tz argument" >&5 +echo "configure:9666: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9668,14 +9671,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -9698,13 +9701,13 @@ EOF fi echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9702: checking for __va_copy" >&5 +echo "configure:9705: checking for __va_copy" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < va_list ap1,ap2; @@ -9712,7 +9715,7 @@ int main() { __va_copy(ap1,ap2); ; return 0; } EOF -if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_VA_COPY=yes else @@ -9733,7 +9736,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9737: checking for C99 vsnprintf" >&5 +echo "configure:9740: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9742,7 +9745,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9769,7 +9772,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9792,7 +9795,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9796: checking for broken readdir" >&5 +echo "configure:9799: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9801,7 +9804,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9809,7 +9812,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -9832,13 +9835,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9836: checking for utimbuf" >&5 +echo "configure:9839: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9846,7 +9849,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9870,12 +9873,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9874: checking for $ac_func" >&5 +echo "configure:9877: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9924,13 +9927,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9928: checking for ut_name in utmp" >&5 +echo "configure:9931: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9938,7 +9941,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9959,13 +9962,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9963: checking for ut_user in utmp" >&5 +echo "configure:9966: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9973,7 +9976,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9994,13 +9997,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9998: checking for ut_id in utmp" >&5 +echo "configure:10001: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10008,7 +10011,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -10029,13 +10032,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10033: checking for ut_host in utmp" >&5 +echo "configure:10036: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10043,7 +10046,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -10064,13 +10067,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10068: checking for ut_time in utmp" >&5 +echo "configure:10071: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10078,7 +10081,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -10099,13 +10102,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10103: checking for ut_tv in utmp" >&5 +echo "configure:10106: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10113,7 +10116,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -10134,13 +10137,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10138: checking for ut_type in utmp" >&5 +echo "configure:10141: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10148,7 +10151,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -10169,13 +10172,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10173: checking for ut_pid in utmp" >&5 +echo "configure:10176: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10183,7 +10186,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -10204,13 +10207,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10208: checking for ut_exit in utmp" >&5 +echo "configure:10211: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10218,7 +10221,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:10222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -10239,13 +10242,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10243: checking for ut_addr in utmp" >&5 +echo "configure:10246: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10253,7 +10256,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -10275,13 +10278,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10279: checking whether pututline returns pointer" >&5 +echo "configure:10282: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10289,7 +10292,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -10311,13 +10314,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10315: checking for ut_syslen in utmpx" >&5 +echo "configure:10318: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10325,7 +10328,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10349,7 +10352,7 @@ fi ################################################# # check for libiconv support echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10353: checking whether to use libiconv" >&5 +echo "configure:10356: checking whether to use libiconv" >&5 # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" @@ -10362,7 +10365,7 @@ if test "${with_libiconv+set}" = set; then CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10366: checking for iconv_open in -liconv" >&5 +echo "configure:10369: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10370,7 +10373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10424,7 +10427,7 @@ fi ############ # check for iconv in libc echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10428: checking for working iconv" >&5 +echo "configure:10431: checking for working iconv" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10433,7 +10436,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else cat > conftest.$ac_ext < @@ -10444,7 +10447,7 @@ main() { } EOF -if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NATIVE_ICONV=yes else @@ -10468,7 +10471,7 @@ fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10472: checking for Linux kernel oplocks" >&5 +echo "configure:10475: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10477,7 +10480,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10491,7 +10494,7 @@ main() { } EOF -if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10514,7 +10517,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10518: checking for kernel change notify support" >&5 +echo "configure:10521: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10523,7 +10526,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10537,7 +10540,7 @@ main() { } EOF -if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10560,7 +10563,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10564: checking for kernel share modes" >&5 +echo "configure:10567: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10569,7 +10572,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10585,7 +10588,7 @@ main() { } EOF -if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10611,13 +10614,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10615: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10618: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10625,7 +10628,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10646,7 +10649,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10650: checking for irix specific capabilities" >&5 +echo "configure:10653: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10655,7 +10658,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10670,7 +10673,7 @@ main() { } EOF -if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10698,13 +10701,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10702: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10705: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10714,7 +10717,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10735,13 +10738,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10739: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10742: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10751,7 +10754,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10772,13 +10775,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10776: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10779: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10788,7 +10791,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10809,13 +10812,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10813: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10816: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10825,7 +10828,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10847,13 +10850,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10851: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10854: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10867,7 +10870,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10888,16 +10891,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10892: checking for test routines" >&5 +echo "configure:10895: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -10911,7 +10914,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10915: checking for ftruncate extend" >&5 +echo "configure:10918: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10920,11 +10923,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -10947,7 +10950,7 @@ EOF fi echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:10951: checking for AF_LOCAL socket support" >&5 +echo "configure:10954: checking for AF_LOCAL socket support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10956,11 +10959,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_WORKING_AF_LOCAL=yes else @@ -10984,7 +10987,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10988: checking for broken getgroups" >&5 +echo "configure:10991: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10993,11 +10996,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -11020,7 +11023,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11024: checking whether getpass should be replaced" >&5 +echo "configure:11027: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11028,7 +11031,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -11064,7 +11067,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11068: checking for broken inet_ntoa" >&5 +echo "configure:11071: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11073,7 +11076,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -11087,7 +11090,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -11110,7 +11113,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11114: checking for secure mkstemp" >&5 +echo "configure:11117: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11119,7 +11122,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -11136,7 +11139,7 @@ main() { exit(0); } EOF -if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -11159,7 +11162,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11163: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:11166: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11168,12 +11171,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -11196,7 +11199,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11200: checking for root" >&5 +echo "configure:11203: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11205,11 +11208,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -11237,7 +11240,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11241: checking for iface AIX" >&5 +echo "configure:11244: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11246,7 +11249,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -11278,7 +11281,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11282: checking for iface ifconf" >&5 +echo "configure:11285: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11287,7 +11290,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -11320,7 +11323,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11324: checking for iface ifreq" >&5 +echo "configure:11327: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11329,7 +11332,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -11366,7 +11369,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11370: checking for setresuid" >&5 +echo "configure:11373: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11375,7 +11378,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -11409,7 +11412,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11413: checking for setreuid" >&5 +echo "configure:11416: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11418,7 +11421,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -11451,7 +11454,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11455: checking for seteuid" >&5 +echo "configure:11458: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11460,7 +11463,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -11493,7 +11496,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11497: checking for setuidx" >&5 +echo "configure:11500: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11502,7 +11505,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -11535,7 +11538,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11539: checking for working mmap" >&5 +echo "configure:11542: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11544,11 +11547,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11571,7 +11574,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11575: checking for ftruncate needs root" >&5 +echo "configure:11578: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11580,11 +11583,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11607,7 +11610,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11611: checking for fcntl locking" >&5 +echo "configure:11614: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11616,11 +11619,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -11643,7 +11646,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11647: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11650: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11652,11 +11655,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11681,7 +11684,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11685: checking for 64 bit fcntl locking" >&5 +echo "configure:11688: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11690,7 +11693,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -11739,13 +11742,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11743: checking for st_blocks in struct stat" >&5 +echo "configure:11746: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11754,7 +11757,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11777,13 +11780,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11781: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11784: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11820,13 +11823,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11824: checking for broken nisplus include files" >&5 +echo "configure:11827: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11836,7 +11839,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11860,7 +11863,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11864: checking whether to use smbwrapper" >&5 +echo "configure:11867: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -11907,7 +11910,7 @@ fi ################################################# # check for AFS clear-text auth support echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11911: checking whether to use AFS clear-text auth" >&5 +echo "configure:11914: checking whether to use AFS clear-text auth" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -11933,7 +11936,7 @@ fi ################################################# # check for the DFS clear-text auth system echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11937: checking whether to use DFS clear-text auth" >&5 +echo "configure:11940: checking whether to use DFS clear-text auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11959,7 +11962,7 @@ fi ################################################# # see if this box has the RedHat location for kerberos echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:11963: checking for /usr/kerberos" >&5 +echo "configure:11966: checking for /usr/kerberos" >&5 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" @@ -11972,7 +11975,7 @@ fi ################################################# # check for location of Kerberos 5 install echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:11976: checking for kerberos 5 install path" >&5 +echo "configure:11979: checking for kerberos 5 install path" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -12001,17 +12004,17 @@ for ac_hdr in krb5.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12005: checking for $ac_hdr" >&5 +echo "configure:12008: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12044,17 +12047,17 @@ for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12048: checking for $ac_hdr" >&5 +echo "configure:12051: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12084,7 +12087,7 @@ done ################################################################## # we might need the k5crypto and com_err libraries on some systems echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12088: checking for _et_list in -lcom_err" >&5 +echo "configure:12091: checking for _et_list in -lcom_err" >&5 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12092,7 +12095,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12124,7 +12127,7 @@ else fi echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12128: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo "configure:12131: checking for krb5_encrypt_data in -lk5crypto" >&5 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12132,7 +12135,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12168,7 +12171,7 @@ fi # now see if we can find the krb5 libs in standard paths # or as specified above echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12172: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo "configure:12175: checking for krb5_mk_req_extended in -lkrb5" >&5 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12176,7 +12179,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12215,7 +12218,7 @@ fi ######################################################## # now see if we can find the gssapi libs in standard paths echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12219: checking for gss_display_status in -lgssapi_krb5" >&5 +echo "configure:12222: checking for gss_display_status in -lgssapi_krb5" >&5 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12223,7 +12226,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi_krb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12263,7 +12266,7 @@ fi # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12267: checking for ber_scanf in -llber" >&5 +echo "configure:12270: checking for ber_scanf in -llber" >&5 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12271,7 +12274,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12307,7 +12310,7 @@ fi # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12311: checking for ldap_domain2hostlist in -lldap" >&5 +echo "configure:12314: checking for ldap_domain2hostlist in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12315,7 +12318,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lldap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12357,12 +12360,12 @@ fi for ac_func in ldap_set_rebind_proc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12361: checking for $ac_func" >&5 +echo "configure:12364: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12410,13 +12413,13 @@ fi done echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12414: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo "configure:12417: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12425,7 +12428,7 @@ int main() { ldap_set_rebind_proc(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pam_ldap_cv_ldap_set_rebind_proc=3 else @@ -12447,7 +12450,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:12451: checking whether to use AUTOMOUNT" >&5 +echo "configure:12454: checking whether to use AUTOMOUNT" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -12472,7 +12475,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:12476: checking whether to use SMBMOUNT" >&5 +echo "configure:12479: checking whether to use SMBMOUNT" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -12509,7 +12512,7 @@ fi # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:12513: checking whether to use PAM" >&5 +echo "configure:12516: checking whether to use PAM" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -12535,7 +12538,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:12539: checking for pam_get_data in -lpam" >&5 +echo "configure:12542: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12543,7 +12546,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12581,7 +12584,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:12585: checking whether to use pam_smbpass" >&5 +echo "configure:12588: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -12619,12 +12622,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12623: checking for $ac_func" >&5 +echo "configure:12626: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12673,7 +12676,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12677: checking for crypt in -lcrypt" >&5 +echo "configure:12680: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12681,7 +12684,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12727,7 +12730,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:12731: checking for a crypt that needs truncated salt" >&5 +echo "configure:12734: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12736,11 +12739,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -12774,7 +12777,7 @@ fi ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:12778: checking whether to use TDB SAM database" >&5 +echo "configure:12781: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -12799,7 +12802,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:12803: checking whether to use NISPLUS SAM database" >&5 +echo "configure:12806: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -12830,7 +12833,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:12834: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12837: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -12855,7 +12858,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12859: checking whether to use syslog logging" >&5 +echo "configure:12862: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -12880,7 +12883,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12884: checking whether to use profiling" >&5 +echo "configure:12887: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12908,7 +12911,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12912: checking whether to support disk-quotas" >&5 +echo "configure:12915: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -12919,13 +12922,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12923: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12926: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12937,7 +12940,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12986,7 +12989,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12990: checking whether to support utmp accounting" >&5 +echo "configure:12993: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -13011,7 +13014,7 @@ fi ################################################# # choose native language(s) of man pages echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13015: checking chosen man pages' language(s)" >&5 +echo "configure:13018: checking chosen man pages' language(s)" >&5 # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" @@ -13042,7 +13045,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13046: checking whether to build the libsmbclient shared library" >&5 +echo "configure:13049: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -13070,14 +13073,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13074: checking how to get filesystem space usage" >&5 +echo "configure:13077: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13081: checking statvfs64 function (SVR4)" >&5 +echo "configure:13084: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13085,7 +13088,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -13132,12 +13135,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:13136: checking statvfs function (SVR4)" >&5 +echo "configure:13139: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13145,7 +13148,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -13170,7 +13173,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:13174: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:13177: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13178,7 +13181,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -13191,7 +13194,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:13195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -13218,7 +13221,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:13222: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:13225: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13226,7 +13229,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -13272,7 +13275,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:13276: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:13279: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13280,7 +13283,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -13290,7 +13293,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -13317,7 +13320,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:13321: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:13324: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13325,7 +13328,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13341,7 +13344,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -13368,7 +13371,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:13372: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:13375: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13376,7 +13379,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13396,7 +13399,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -13429,9 +13432,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:13433: checking if large file support can be enabled" >&5 +echo "configure:13436: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -13509,7 +13512,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:13513: checking whether to support ACLs" >&5 +echo "configure:13516: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -13562,7 +13565,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13566: checking for acl_get_file in -lacl" >&5 +echo "configure:13569: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13570,7 +13573,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13609,13 +13612,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:13613: checking for ACL support" >&5 +echo "configure:13616: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13623,7 +13626,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -13643,13 +13646,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:13647: checking for acl_get_perm_np" >&5 +echo "configure:13650: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13657,7 +13660,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -13704,7 +13707,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:13708: checking whether to build winbind" >&5 +echo "configure:13711: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13777,58 +13780,6 @@ else fi -# Check for FreeBSD problem with getgroups -# It returns EGID too many times in the list of groups -# and causes a security problem -echo $ac_n "checking whether or not getgroups returns EGID too many times""... $ac_c" 1>&6 -echo "configure:13785: checking whether or not getgroups returns EGID too many times" >&5 -if eval "test \"`echo '$''{'samba_cv_have_getgroups_too_many_egids'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - samba_cv_have_getgroups_too_many_egids=cross -else - cat > conftest.$ac_ext < -#include - -int main(int argc, char *argv[]) -{ - gid_t groups[10]; - int n = 10; - - n = getgroups(n, &groups); - /* Could actually pass back the number of EGIDs there ... */ - exit((n > 1 && groups[0] == getegid() && groups[1] == getegid()) ? 1 : 0); -} -EOF -if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - samba_cv_have_getgroups_too_many_egids=no -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - samba_cv_have_getgroups_too_many_egids=yes -fi -rm -fr conftest* -fi - -fi - -echo "$ac_t""$samba_cv_have_getgroups_too_many_egids" 1>&6 -if test x"$samba_cv_have_getgroups_too_many_egids" = x"yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_GETGROUPS_TOO_MANY_EGIDS 1 -EOF - -fi - - - # Substitution time! @@ -13848,20 +13799,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:13852: checking whether struct passwd has pw_comment" >&5 +echo "configure:13803: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:13865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -13886,20 +13837,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:13890: checking whether struct passwd has pw_age" >&5 +echo "configure:13841: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:13903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -13938,7 +13889,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13942: checking for poptGetContext in -lpopt" >&5 +echo "configure:13893: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13946,7 +13897,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13981,7 +13932,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13985: checking whether to use included popt" >&5 +echo "configure:13936: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -14004,16 +13955,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:14008: checking configure summary" >&5 +echo "configure:13959: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else diff --git a/source3/include/config.h.in b/source3/include/config.h.in index ac28c0856cf..e1332a21a71 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader. */ +/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if on AIX 3. System headers sometimes define this. @@ -285,6 +285,8 @@ #undef _GNU_SOURCE #endif +#undef LDAP_SET_REBIND_PROC_ARGS + /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -645,6 +647,9 @@ /* Define if you have the innetgr function. */ #undef HAVE_INNETGR +/* Define if you have the ldap_set_rebind_proc function. */ +#undef HAVE_LDAP_SET_REBIND_PROC + /* Define if you have the link function. */ #undef HAVE_LINK @@ -873,12 +878,6 @@ /* Define if you have the header file. */ #undef HAVE_CTYPE_H -/* Define if you have the header file. */ -#undef HAVE_CUPS_CUPS_H - -/* Define if you have the header file. */ -#undef HAVE_CUPS_LANGUAGE_H - /* Define if you have the header file. */ #undef HAVE_DIRENT_H @@ -1125,9 +1124,6 @@ /* Define if you have the acl library (-lacl). */ #undef HAVE_LIBACL -/* Define if you have the cups library (-lcups). */ -#undef HAVE_LIBCUPS - /* Define if you have the gen library (-lgen). */ #undef HAVE_LIBGEN From e8177d1104c8f7a1035f5c9c340ae5c9b594a729 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 23 Jul 2002 04:55:06 +0000 Subject: [PATCH 075/262] * changed structure of REG_R_ENUM_VALUE structure since the BUFFER2 is not and [in/out] buffer * registry value enumeration is working now for the Print\Forms key. The format of the binary data is not quite right yet but all installed forms are listed (This used to be commit 998eb9c7312c3c9a9ed1e9ec294593503c0304bf) --- source3/include/rpc_reg.h | 6 +- source3/registry/reg_frontend.c | 457 ++++++++++++++++++++------------ source3/rpc_parse/parse_prs.c | 8 +- source3/rpc_parse/parse_reg.c | 35 ++- source3/rpc_server/srv_reg.c | 26 ++ source3/rpc_server/srv_reg_nt.c | 49 +++- 6 files changed, 401 insertions(+), 180 deletions(-) diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 7dbf49cf84f..d025cb2c0d8 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -32,7 +32,6 @@ #define REG_CREATE_KEY 0x06 #define REG_DELETE_KEY 0x07 #define REG_DELETE_VALUE 0x08 -#define REG_ENUM_VALUE 0x0a #define REG_FLUSH_KEY 0x0b #define REG_GET_KEY_SEC 0x0c #define _REG_UNK_0D 0x0d @@ -50,6 +49,7 @@ #define REG_OPEN_HKU 0x04 #define REG_CLOSE 0x05 #define REG_ENUM_KEY 0x09 +#define REG_ENUM_VALUE 0x0a #define REG_OPEN_ENTRY 0x0f #define REG_QUERY_KEY 0x10 #define REG_INFO 0x11 @@ -97,6 +97,7 @@ typedef struct { char *string; uint32 dword; uint8 *binary; + void *void_ptr; /* for casting only */ } data; } REGISTRY_VALUE; @@ -314,6 +315,7 @@ typedef struct q_reg_query_value_info uint32 ptr2; /* pointer */ uint32 len_value2; /* */ + } REG_Q_ENUM_VALUE; /* REG_R_ENUM_VALUE */ @@ -326,7 +328,7 @@ typedef struct r_reg_enum_value_info uint32 type; /* 1 = UNISTR, 3 = BYTES, 4 = DWORD, 7 = MULTI_UNISTR */ uint32 ptr_value; /* pointer */ - BUFFER2 *buf_value; /* value, in byte buffer */ + BUFFER2 buf_value; /* value, in byte buffer */ uint32 ptr1; /* pointer */ uint32 len_value1; /* */ diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index d8a10940fdf..a2822073765 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -37,6 +37,264 @@ REGISTRY_HOOK reg_hooks[] = { }; +/* + * Utility functions for REGSUBKEY_CTR + */ + +/*********************************************************************** + Init the talloc context held by a REGSUBKEY_CTR structure + **********************************************************************/ + +void regsubkey_ctr_init( REGSUBKEY_CTR *ctr ) +{ + if ( !ctr->ctx ) + ctr->ctx = talloc_init(); +} + +/*********************************************************************** + Add a new key to the array + **********************************************************************/ + +int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, char *keyname ) +{ + uint32 len; + char **pp; + + if ( keyname ) + { + len = strlen( keyname ); + + /* allocate a space for the char* in the array */ + + if ( ctr->subkeys == 0 ) + ctr->subkeys = talloc( ctr->ctx, sizeof(char*) ); + else { + pp = talloc_realloc( ctr->ctx, ctr->subkeys, sizeof(char*)*(ctr->num_subkeys+1) ); + if ( pp ) + ctr->subkeys = pp; + } + + /* allocate the string and save it in the array */ + + ctr->subkeys[ctr->num_subkeys] = talloc( ctr->ctx, len+1 ); + strncpy( ctr->subkeys[ctr->num_subkeys], keyname, len+1 ); + ctr->num_subkeys++; + } + + return ctr->num_subkeys; +} + +/*********************************************************************** + How many keys does the container hold ? + **********************************************************************/ + +int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr ) +{ + return ctr->num_subkeys; +} + +/*********************************************************************** + Retreive a specific key string + **********************************************************************/ + +char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index ) +{ + if ( ! (key_index < ctr->num_subkeys) ) + return NULL; + + return ctr->subkeys[key_index]; +} + +/*********************************************************************** + free memory held by a REGSUBKEY_CTR structure + **********************************************************************/ + +void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr ) +{ + if ( ctr ) { + talloc_destroy( ctr->ctx ); + ZERO_STRUCTP( ctr ); + } +} + + +/* + * Utility functions for REGVAL_CTR + */ + +/*********************************************************************** + Init the talloc context held by a REGSUBKEY_CTR structure + **********************************************************************/ + +void regval_ctr_init( REGVAL_CTR *ctr ) +{ + if ( !ctr->ctx ) + ctr->ctx = talloc_init(); +} + +/*********************************************************************** + How many keys does the container hold ? + **********************************************************************/ + +int regval_ctr_numvals( REGVAL_CTR *ctr ) +{ + return ctr->num_values; +} + +/*********************************************************************** + allocate memory for and duplicate a REGISTRY_VALUE. + This is malloc'd memory so the caller should free it when done + **********************************************************************/ + +REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val ) +{ + REGISTRY_VALUE *copy = NULL; + BOOL fail = True; + + if ( !val ) + return NULL; + + if ( !(copy = malloc( sizeof(REGISTRY_VALUE) )) ) { + DEBUG(0,("dup_registry_value: malloc() failed!\n")); + return NULL; + } + + /* copy all the non-pointer initial data */ + + memcpy( copy, val, sizeof(REGISTRY_VALUE) ); + + switch ( val->type ) { + case REG_SZ: + if ( !(copy->data.string = strdup( val->data.string )) ) { + DEBUG(0,("dup_registry_value: strdup() failed for [%s]!\n", + val->data.string)); + goto done; + } + break; + + case REG_DWORD: + /* nothing to be done; already copied by memcpy() */ + break; + + case REG_BINARY: + if ( !(copy->data.string = memdup( val->data.binary, val->size )) ) { + DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n", + val->size)); + goto done; + } + break; + } + + fail = False; + +done: + if ( fail ) + SAFE_FREE( copy ); + + return copy; +} + +/********************************************************************** + free the memory allocated to a REGISTRY_VALUE + *********************************************************************/ + +void free_registry_value( REGISTRY_VALUE *val ) +{ + if ( !val ) + return; + + switch ( val->type ) + { + case REG_SZ: + SAFE_FREE( val->data.string ); + break; + case REG_BINARY: + SAFE_FREE( val->data.binary ); + break; + } + + SAFE_FREE( val ); + + return; +} + +/*********************************************************************** + Retreive a pointer to a specific value. Caller shoud dup the structure + since this memory may go away with a regval_ctr_destroy() + **********************************************************************/ + +REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) +{ + if ( !(idx < ctr->num_values) ) + return NULL; + + return ctr->values[idx]; +} + +/*********************************************************************** + Ad a new regostry value to the array + **********************************************************************/ + +int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, + char *data_p, size_t size ) +{ + REGISTRY_VALUE **ppreg; + uint16 len; + + if ( name ) + { + len = strlen( name ); + + /* allocate a slot in the array of pointers */ + + if ( ctr->num_values == 0 ) + ctr->values = talloc( ctr->ctx, sizeof(REGISTRY_VALUE*) ); + else { + ppreg = talloc_realloc( ctr->ctx, ctr->values, sizeof(REGISTRY_VALUE*)*(ctr->num_values+1) ); + if ( ppreg ) + ctr->values = ppreg; + } + + /* allocate a new valuie and store the pointer in the arrya */ + + ctr->values[ctr->num_values] = talloc( ctr->ctx, sizeof(REGISTRY_VALUE) ); + + /* init the value */ + + fstrcpy( ctr->values[ctr->num_values]->valuename, name ); + ctr->values[ctr->num_values]->type = type; + switch ( type ) + { + case REG_SZ: + ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p ); + break; + case REG_DWORD: + break; + case REG_BINARY: + ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size ); + break; + + } + ctr->values[ctr->num_values]->size = size; + + ctr->num_values++; + } + + return ctr->num_values; +} + +/*********************************************************************** + free memory held by a REGVAL_CTR structure + **********************************************************************/ + +void regval_ctr_destroy( REGVAL_CTR *ctr ) +{ + if ( ctr ) { + talloc_destroy( ctr->ctx ); + ZERO_STRUCTP( ctr ); + } +} + /*********************************************************************** Open the registry database and initialize the REGISTRY_HOOK cache ***********************************************************************/ @@ -152,6 +410,34 @@ int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) return result; } + +/*********************************************************************** + retreive a specific subkey specified by index. Caller is + responsible for freeing memory + ***********************************************************************/ + +BOOL fetch_reg_values_specific( REGISTRY_KEY *key, REGISTRY_VALUE **val, uint32 key_index ) +{ + REGVAL_CTR ctr; + REGISTRY_VALUE *v; + + ZERO_STRUCTP( &ctr ); + + regval_ctr_init( &ctr ); + + if ( fetch_reg_values( key, &ctr) == -1 ) + return False; + + if ( !(v = regval_ctr_specific_value( &ctr, key_index )) ) + return False; + + *val = dup_registry_value( v ); + + regval_ctr_destroy( &ctr ); + + return True; +} + /*********************************************************************** Utility function for splitting the base path of a registry path off by setting base and new_path to the apprapriate offsets withing the @@ -182,175 +468,4 @@ BOOL reg_split_path( char *path, char **base, char **new_path ) } -/* - * Utility functions for REGSUBKEY_CTR - */ - -/*********************************************************************** - Init the talloc context held by a REGSUBKEY_CTR structure - **********************************************************************/ - -void regsubkey_ctr_init( REGSUBKEY_CTR *ctr ) -{ - if ( !ctr->ctx ) - ctr->ctx = talloc_init(); -} - -/*********************************************************************** - Add a new key to the array - **********************************************************************/ - -int regsubkey_ctr_addkey( REGSUBKEY_CTR *ctr, char *keyname ) -{ - uint32 len; - char **pp; - - if ( keyname ) - { - len = strlen( keyname ); - - if ( ctr->subkeys == 0 ) - ctr->subkeys = talloc( ctr->ctx, sizeof(char*) ); - else { - pp = talloc_realloc( ctr->ctx, ctr->subkeys, sizeof(char*)*(ctr->num_subkeys+1) ); - if ( pp ) - ctr->subkeys = pp; - } - - ctr->subkeys[ctr->num_subkeys] = talloc( ctr->ctx, len+1 ); - strncpy( ctr->subkeys[ctr->num_subkeys], keyname, len+1 ); - ctr->num_subkeys++; - } - - return ctr->num_subkeys; -} - -/*********************************************************************** - How many keys does the container hold ? - **********************************************************************/ - -int regsubkey_ctr_numkeys( REGSUBKEY_CTR *ctr ) -{ - return ctr->num_subkeys; -} - -/*********************************************************************** - Retreive a specific key string - **********************************************************************/ - -char* regsubkey_ctr_specific_key( REGSUBKEY_CTR *ctr, uint32 key_index ) -{ - if ( ! (key_index < ctr->num_subkeys) ) - return NULL; - - return ctr->subkeys[key_index]; -} - -/*********************************************************************** - free memory held by a REGSUBKEY_CTR structure - **********************************************************************/ - -void regsubkey_ctr_destroy( REGSUBKEY_CTR *ctr ) -{ - if ( ctr ) { - talloc_destroy( ctr->ctx ); - ZERO_STRUCTP( ctr ); - } -} - - -/* - * Utility functions for REGVAL_CTR - */ - -/*********************************************************************** - Init the talloc context held by a REGSUBKEY_CTR structure - **********************************************************************/ - -void regval_ctr_init( REGVAL_CTR *ctr ) -{ - if ( !ctr->ctx ) - ctr->ctx = talloc_init(); -} - -/*********************************************************************** - How many keys does the container hold ? - **********************************************************************/ - -int regval_ctr_numvals( REGVAL_CTR *ctr ) -{ - return ctr->num_values; -} - -REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) -{ - if ( !(idx < ctr->num_values) ) - return NULL; - - return ctr->values[idx]; -} - -/*********************************************************************** - Ad a new regostry value to the array - **********************************************************************/ - -int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, - char *data_p, size_t size ) -{ - REGISTRY_VALUE **ppreg; - uint16 len; - - if ( name ) - { - len = strlen( name ); - - /* allocate a slot in the array of pointers */ - - if ( ctr->num_values == 0 ) - ctr->values = talloc( ctr->ctx, sizeof(REGISTRY_VALUE*) ); - else { - ppreg = talloc_realloc( ctr->ctx, ctr->values, sizeof(REGISTRY_VALUE*)*(ctr->num_values+1) ); - if ( ppreg ) - ctr->values = ppreg; - } - - /* allocate a new valuie and store the pointer in the arrya */ - - ctr->values[ctr->num_values] = talloc( ctr->ctx, sizeof(REGISTRY_VALUE) ); - - /* init the value */ - - fstrcpy( ctr->values[ctr->num_values]->valuename, name ); - ctr->values[ctr->num_values]->type = type; - switch ( type ) - { - case REG_SZ: - ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p ); - break; - case REG_DWORD: - break; - case REG_BINARY: - ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size ); - break; - - } - ctr->values[ctr->num_values]->size = size; - - ctr->num_values++; - } - - return ctr->num_values; -} - -/*********************************************************************** - free memory held by a REGVAL_CTR structure - **********************************************************************/ - -void regval_ctr_destroy( REGVAL_CTR *ctr ) -{ - if ( ctr ) { - talloc_destroy( ctr->ctx ); - ZERO_STRUCTP( ctr ); - } -} diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 2ab8c7246e1..4de6b88e9cc 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -893,9 +893,11 @@ BOOL prs_buffer2(BOOL charmode, char *name, prs_struct *ps, int depth, BUFFER2 * return False; if (UNMARSHALLING(ps)) { - str->buffer = (uint16 *)prs_alloc_mem(ps,str->buf_len); - if (str->buffer == NULL) - return False; + if ( str->buf_len ) { + str->buffer = (uint16 *)prs_alloc_mem(ps,str->buf_len); + if ( str->buffer == NULL ) + return False; + } } p = (char *)str->buffer; diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 1ebc1532f31..3987f208851 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1138,6 +1138,38 @@ void init_reg_q_enum_val(REG_Q_ENUM_VALUE *q_i, POLICY_HND *pol, q_i->len_value2 = 0; } +/******************************************************************* +makes a structure. +********************************************************************/ + +void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val ) +{ + ZERO_STRUCTP(r_u); + + /* value name */ + + init_uni_hdr( &r_u->hdr_name, strlen(val->valuename)+1 ); + init_unistr2( &r_u->uni_name, val->valuename, strlen(val->valuename)+1 ); + + /* type */ + + r_u->ptr_type = 1; + r_u->type = val->type; + + /* data */ + + r_u->ptr_value = 1; + init_buffer2( &r_u->buf_value, val->data.void_ptr, val->size ); + + /* lengths */ + + r_u->ptr1 = 1; + r_u->len_value1 = val->size; + + r_u->ptr2 = 1; + r_u->len_value2 = val->size; +} + /******************************************************************* reads or writes a structure. ********************************************************************/ @@ -1158,6 +1190,7 @@ BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int d if(!prs_uint32("val_index", ps, depth, &q_q->val_index)) return False; + if(!smb_io_unihdr ("hdr_name", &q_q->hdr_name, ps, depth)) return False; if(!smb_io_unistr2("uni_name", &q_q->uni_name, q_q->hdr_name.buffer, ps, depth)) @@ -1228,7 +1261,7 @@ BOOL reg_io_r_enum_val(char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int d if(!prs_uint32("ptr_value", ps, depth, &r_q->ptr_value)) return False; - if(!smb_io_buffer2("buf_value", r_q->buf_value, r_q->ptr_value, ps, depth)) + if(!smb_io_buffer2("buf_value", &r_q->buf_value, r_q->ptr_value, ps, depth)) return False; if(!prs_align(ps)) return False; diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c index a0963258603..ee873e32e9f 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -290,6 +290,31 @@ static BOOL api_reg_enum_key(pipes_struct *p) return True; } +/******************************************************************* + api_reg_enum_value + ********************************************************************/ + +static BOOL api_reg_enum_value(pipes_struct *p) +{ + REG_Q_ENUM_VALUE q_u; + REG_R_ENUM_VALUE r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if(!reg_io_q_enum_val("", &q_u, data, 0)) + return False; + + r_u.status = _reg_enum_value(p, &q_u, &r_u); + + if(!reg_io_r_enum_val("", &r_u, rdata, 0)) + return False; + + return True; +} + /******************************************************************* @@ -302,6 +327,7 @@ static struct api_struct api_reg_cmds[] = { "REG_OPEN_HKLM" , REG_OPEN_HKLM , api_reg_open_hklm }, { "REG_OPEN_HKU" , REG_OPEN_HKU , api_reg_open_hku }, { "REG_ENUM_KEY" , REG_ENUM_KEY , api_reg_enum_key }, + { "REG_ENUM_VALUE" , REG_ENUM_VALUE , api_reg_enum_value }, { "REG_QUERY_KEY" , REG_QUERY_KEY , api_reg_query_key }, { "REG_INFO" , REG_INFO , api_reg_info }, { "REG_SHUTDOWN" , REG_SHUTDOWN , api_reg_shutdown }, diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 72e0631e8b3..99439bcc388 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -237,10 +237,14 @@ static BOOL get_value_information( REGISTRY_KEY *key, uint32 *maxnum, lenmax = sizemax = 0; num_values = regval_ctr_numvals( &values ); - for ( i=0; ivaluename)+1 ); + sizemax = MAX(sizemax, val->size ); + val = regval_ctr_specific_value( &values, i ); - lenmax = MAX(lenmax, strlen(val[i].valuename)+1 ); - sizemax = MAX(sizemax, val[i].size ); } *maxnum = num_values; @@ -480,6 +484,45 @@ done: return status; } +/***************************************************************************** + Implementation of REG_ENUM_VALUE + ****************************************************************************/ + +NTSTATUS _reg_enum_value(pipes_struct *p, REG_Q_ENUM_VALUE *q_u, REG_R_ENUM_VALUE *r_u) +{ + NTSTATUS status = NT_STATUS_OK; + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + REGISTRY_VALUE *val; + + + DEBUG(5,("_reg_enum_value: Enter\n")); + + if ( !regkey ) + return NT_STATUS_INVALID_HANDLE; + + DEBUG(8,("_reg_enum_key: enumerating values for key [%s]\n", regkey->name)); + + if ( !fetch_reg_values_specific( regkey, &val, q_u->val_index ) ) + { + status = NT_STATUS_NO_MORE_ENTRIES; + goto done; + } + + DEBUG(10,("_reg_enum_value: retrieved value named [%s]\n", val->valuename)); + + /* subkey has the string name now */ + + init_reg_r_enum_val( r_u, val ); + + + DEBUG(5,("_reg_enum_value: Exit\n")); + +done: + SAFE_FREE( val ); + + return status; +} + /******************************************************************* reg_shutdwon From 5b513407c21e6e77d495fafa49a7a5d380087667 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 23 Jul 2002 05:07:40 +0000 Subject: [PATCH 076/262] * fix to display correct form information in REG_BINARY information This should be 8 x uint32 (not 7. I'm guessing the 2nd to the last uint32 is the index number for the form? Not that big a deal I don't think. (This used to be commit 88f0e68bc631f1a0032056bc6c7b9213e8a15be8) --- source3/registry/reg_printing.c | 36 +++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 993d793c1e0..f4c1feb281f 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -121,7 +121,8 @@ static int print_subpath_forms( char *key, REGSUBKEY_CTR *subkeys ) static int print_subpath_values_forms( char *key, REGVAL_CTR *val ) { int num_values = 0; - uint32 data[7]; + uint32 data[8]; + int form_index = 1; DEBUG(10,("print_values_forms: key=>[%s]\n", key ? key : "NULL" )); @@ -145,13 +146,14 @@ static int print_subpath_values_forms( char *key, REGVAL_CTR *val ) { form = &forms_list[i]; - data[0] = form->flag; - data[1] = form->width; - data[2] = form->length; - data[3] = form->left; - data[4] = form->top; - data[5] = form->right; - data[6] = form->bottom; + data[0] = form->width; + data[1] = form->length; + data[2] = form->left; + data[3] = form->top; + data[4] = form->right; + data[5] = form->bottom; + data[6] = form_index++; + data[7] = form->flag; regval_ctr_addvalue( val, form->name, REG_BINARY, (char*)data, sizeof(data) ); @@ -172,16 +174,16 @@ static int print_subpath_values_forms( char *key, REGVAL_CTR *val ) { form = &forms_list[i]; - data[0] = form->flag; - data[1] = form->width; - data[2] = form->length; - data[3] = form->left; - data[4] = form->top; - data[5] = form->right; - data[6] = form->bottom; - + data[0] = form->width; + data[1] = form->length; + data[2] = form->left; + data[3] = form->top; + data[4] = form->right; + data[5] = form->bottom; + data[6] = form_index++; + data[7] = form->flag; + regval_ctr_addvalue( val, form->name, REG_BINARY, (char*)data, sizeof(data) ); - } SAFE_FREE( forms_list ); From fef9d6187ece53ae12670cc56b360e913e08f3bb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Jul 2002 09:22:29 +0000 Subject: [PATCH 077/262] implemented getgrouplist() for systems that don't have it and use it in get_alias_user_groups(). The old method used getgrent() which is extremely slow when the number of groups is large (This used to be commit 44e92b6523ca2c119c2562df22eb71138dca9d9d) --- source3/configure.in | 2 +- source3/lib/replace.c | 66 +++++++++++++++++++++++++++++++++++ source3/lib/util_getent.c | 56 ++++++++++++++++++----------- source3/rpc_server/srv_util.c | 62 +++++++++++++++----------------- 4 files changed, 131 insertions(+), 55 deletions(-) diff --git a/source3/configure.in b/source3/configure.in index 77c14c71917..4397d5846c5 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -746,7 +746,7 @@ AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64) AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf) AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink) -AC_CHECK_FUNCS(syslog vsyslog) +AC_CHECK_FUNCS(syslog vsyslog getgrouplist) # setbuffer is needed for smbtorture AC_CHECK_FUNCS(setbuffer) diff --git a/source3/lib/replace.c b/source3/lib/replace.c index 2cc7d48adb3..e2664accfa7 100644 --- a/source3/lib/replace.c +++ b/source3/lib/replace.c @@ -428,3 +428,69 @@ char *rep_inet_ntoa(struct in_addr ip) } #endif /* HAVE_SYSLOG */ #endif /* HAVE_VSYSLOG */ + + +#ifndef HAVE_GETGROUPLIST +/* + This is a *much* faster way of getting the list of groups for a user + without changing the current supplemenrary group list. The old + method used getgrent() which could take 20 minutes on a really big + network with hundeds of thousands of groups and users. The new method + takes a couple of seconds. + + NOTE!! this function only works if it is called as root! + */ + int getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) +{ + gid_t *gids_saved; + int ret, ngrp_saved; + + /* work out how many groups we need to save */ + ngrp_saved = getgroups(0, NULL); + if (ngrp_saved == -1) { + /* this shouldn't happen */ + return -1; + } + + gids_saved = (gid_t *)malloc(sizeof(gid_t) * (ngrp_saved+1)); + if (!gids_saved) { + errno = ENOMEM; + return -1; + } + + ngrp_saved = getgroups(ngrp_saved, gids_saved); + if (ngrp_saved == -1) { + free(gids_saved); + /* very strange! */ + return -1; + } + + if (initgroups(user, gid) != 0) { + free(gids_saved); + return -1; + } + + /* this must be done to cope with systems that put the current egid in the + return from getgroups() */ + save_re_gid(); + set_effective_gid(gid); + setgid(gid); + + ret = getgroups(*grpcnt, groups); + if (ret >= 0) { + *grpcnt = ret; + } + + restore_re_gid(); + + if (setgroups(ngrp_saved, gids_saved) != 0) { + /* yikes! */ + DEBUG(0,("ERROR: getgrouplist: failed to reset group list!\n")); + free(gids_saved); + return -1; + } + + free(gids_saved); + return ret; +} +#endif diff --git a/source3/lib/util_getent.c b/source3/lib/util_getent.c index 2e76121aae1..5d2fcd76522 100644 --- a/source3/lib/util_getent.c +++ b/source3/lib/util_getent.c @@ -21,27 +21,6 @@ #include "includes.h" -#if 0 -static void print_grent_list(struct sys_grent *glist) -{ - DEBUG(100, ("print_grent_list: %x\n", glist )); - while (glist) { - DEBUG(100,("glist: %x ", glist)); - if (glist->gr_name) - DEBUG(100,(": gr_name = (%x) %s ", glist->gr_name, glist->gr_name)); - if (glist->gr_passwd) - DEBUG(100,(": gr_passwd = (%x) %s ", glist->gr_passwd, glist->gr_passwd)); - if (glist->gr_mem) { - int i; - for (i = 0; glist->gr_mem[i]; i++) - DEBUG(100,(" : gr_mem[%d] = (%x) %s ", i, glist->gr_mem[i], glist->gr_mem[i])); - } - DEBUG(100,(": gr_next = %x\n", glist->next )); - glist = glist->next; - } - DEBUG(100,("FINISHED !\n\n")); -} -#endif /**************************************************************** Returns a single linked list of group entries. @@ -320,3 +299,38 @@ void free_userlist(struct sys_userlist *list_head) SAFE_FREE(old_head); } } + + +/* + return a full list of groups for a user + + returns the number of groups the user is a member of. The return will include the + users primary group. + + remember to free the resulting gid_t array + + NOTE! you must be root to call this function on some systems +*/ +int getgroups_user(const char *user, gid_t **groups) +{ + struct passwd *pwd; + int ngrp, max_grp; + + pwd = getpwnam(user); + if (!pwd) return -1; + + max_grp = groups_max(); + (*groups) = (gid_t *)malloc(sizeof(gid_t) * max_grp); + if (! *groups) { + errno = ENOMEM; + return -1; + } + + ngrp = getgrouplist(user, pwd->pw_gid, *groups, &max_grp); + if (ngrp <= 0) { + free(*groups); + return ngrp; + } + + return ngrp; +} diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c index f896d1d9d8c..50bf5db4fdd 100644 --- a/source3/rpc_server/srv_util.c +++ b/source3/rpc_server/srv_util.c @@ -84,10 +84,10 @@ rid_name domain_group_rids[] = NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, uint32 **prids, DOM_SID *q_sid) { SAM_ACCOUNT *sam_pass=NULL; - struct sys_grent *glist; - struct sys_grent *grp; - int i, num, cur_rid=0; + int i, cur_rid=0; gid_t gid; + gid_t *groups = NULL; + int num_groups; GROUP_MAP map; DOM_SID tmp_sid; fstring user_name; @@ -130,16 +130,21 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui fstrcpy(user_name, pdb_get_username(sam_pass)); grid=pdb_get_group_rid(sam_pass); gid=pdb_get_gid(sam_pass); - - grp = glist = getgrent_list(); - if (grp == NULL) { + + become_root(); + /* on some systems this must run as root */ + num_groups = getgroups_user(user_name, &groups); + unbecome_root(); + if (num_groups == -1) { + /* this should never happen */ + DEBUG(2,("get_alias_user_groups: getgroups_user failed\n")); pdb_free_sam(&sam_pass); - return NT_STATUS_NO_MEMORY; + return NT_STATUS_UNSUCCESSFUL; } - - for (; grp != NULL; grp = grp->next) { - if(!get_group_from_gid(grp->gr_gid, &map, MAPPING_WITHOUT_PRIV)) { - DEBUG(10,("get_alias_user_groups: gid %d. not found\n", (int)grp->gr_gid)); + + for (i=0;igr_gid >= winbind_gid_low) && (grp->gr_gid <= winbind_gid_high)) { + if (winbind_groups_exist && (groups[i] >= winbind_gid_low) && (groups[i] <= winbind_gid_high)) { DEBUG(10,("get_alias_user_groups: not returing %s, not local.\n", map.nt_name)); continue; } @@ -170,30 +175,21 @@ NTSTATUS get_alias_user_groups(TALLOC_CTX *ctx, DOM_SID *sid, int *numgroups, ui continue; } - /* the group is fine, we can check if there is the user we're looking for */ - DEBUG(10,("get_alias_user_groups: checking if the user is a member of %s.\n", map.nt_name)); - - for(num=0; grp->gr_mem[num]!=NULL; num++) { - if(strcmp(grp->gr_mem[num], user_name)==0) { - /* we found the user, add the group to the list */ - - new_rids=(uint32 *)Realloc(rids, sizeof(uint32)*(cur_rid+1)); - if (new_rids==NULL) { - DEBUG(10,("get_alias_user_groups: could not realloc memory\n")); - pdb_free_sam(&sam_pass); - return NT_STATUS_NO_MEMORY; - } - rids=new_rids; - - sid_peek_rid(&map.sid, &(rids[cur_rid])); - DEBUG(10,("get_alias_user_groups: user found in group %s\n", map.nt_name)); - cur_rid++; - break; - } + new_rids=(uint32 *)Realloc(rids, sizeof(uint32)*(cur_rid+1)); + if (new_rids==NULL) { + DEBUG(10,("get_alias_user_groups: could not realloc memory\n")); + pdb_free_sam(&sam_pass); + free(groups); + return NT_STATUS_NO_MEMORY; } + rids=new_rids; + + sid_peek_rid(&map.sid, &(rids[cur_rid])); + cur_rid++; + break; } - grent_free(glist); + free(groups); /* now check for the user's gid (the primary group rid) */ for (i=0; i Date: Wed, 24 Jul 2002 03:00:14 +0000 Subject: [PATCH 078/262] Give an idea what service didn't have the directory. (This used to be commit 0229f610a8cf9e82618cc6850a431ac89ffc7630) --- source3/smbd/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index e048201c4b1..4e6530674be 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -645,7 +645,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, #else /* the alternative is just to check the directory exists */ if (stat(conn->connectpath, &st) != 0 || !S_ISDIR(st.st_mode)) { - DEBUG(0,("%s is not a directory\n", conn->connectpath)); + DEBUG(0,("'%s' is not a directory, when connecting to [%s]\n", conn->connectpath, lp_servicename(SNUM(conn)))); change_to_root_user(); yield_connection(conn, lp_servicename(SNUM(conn))); conn_free(conn); From fc6ae0994d6038f5b292007fe508af0c892a6f7f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 03:13:43 +0000 Subject: [PATCH 079/262] Add another message rather than 'internal module error' Andrew Bartlett (This used to be commit e09c4bd69aaec0dc43b5bf69f651cbfad3c5f4ad) --- source3/nsswitch/pam_winbind.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index a8754d1710d..29ceca4e79e 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -163,6 +163,10 @@ static int winbind_auth_request(const char *user, const char *pass, int ctrl) /* password expired */ _pam_log(LOG_WARNING, "user `%s' password expired", user); return retval; + case PAM_NEW_AUTHTOK_REQD: + /* password expired */ + _pam_log(LOG_WARNING, "user `%s' new password required", user); + return retval; case PAM_USER_UNKNOWN: /* the user does not exist */ if (ctrl & WINBIND_DEBUG_ARG) From 3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 05:01:49 +0000 Subject: [PATCH 080/262] We must be root to access the passdb, so ensure all calls to local_lookup_sid() have become_root()/unbecome_root() wrappers. (this should be the last of them, the rest were done ages ago). Andrew Bartlett (This used to be commit 83360b211a7e834306d3e549c18bc41576534417) --- source3/smbd/uid.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index a18f62c9cc8..2dcef54a5be 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -599,7 +599,11 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype) /* if we know its local then don't try winbindd */ if (sid_compare_domain(get_global_sam_sid(), psid) == 0) { - return local_sid_to_uid(puid, psid, sidtype); + BOOL result; + become_root(); + result = local_sid_to_uid(puid, psid, sidtype); + unbecome_root(); + return result; } /* (tridge) I commented out the slab of code below in order to support foreign SIDs From 3760e52ca852c2818787720c9f33a4ddf5d66145 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 05:04:18 +0000 Subject: [PATCH 081/262] Actually check the return value of the account_policy_get() call. Andrew Bartlett (This used to be commit a7b0a2334cd8e7234c5bcb284e4c6de7a8e45f98) --- source3/passdb/pdb_get_set.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index ca1d54ebef1..2da6de72701 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -1028,15 +1028,14 @@ BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass) if (!pdb_set_pass_last_set_time (sampass, time(NULL))) return False; - account_policy_get(AP_MAX_PASSWORD_AGE, &expire); - - if (expire==(uint32)-1) { + if (!account_policy_get(AP_MAX_PASSWORD_AGE, &expire) + || (expire==(uint32)-1)) { if (!pdb_set_pass_must_change_time (sampass, get_time_t_max(), False)) return False; } else { if (!pdb_set_pass_must_change_time (sampass, - pdb_get_pass_last_set_time(sampass) - + expire, True)) + pdb_get_pass_last_set_time(sampass) + + expire, True)) return False; } From 24675d99e51609de542c70a8e6f39befeed46722 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 05:26:32 +0000 Subject: [PATCH 082/262] Make it possible to query account policy values from pdbedit (set to come soon). Update account_pol.c to use just uint32, rather then uint32 for paramaters, int32 for storage. (The int32 functions didn't have seperate return/status values, uint32 functions use a pointer-paramater). Move the #define -> string from a swtich to a table, so we can look it up both ways. Andrew Bartlett (This used to be commit c5b5e3d653f5c38a283d901a409be6603d5103f7) --- source3/lib/account_pol.c | 88 +++++++++++++++++++++++++++------------ source3/utils/pdbedit.c | 40 +++++++++++++----- 2 files changed, 91 insertions(+), 37 deletions(-) diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c index 07676e22022..f603f0f191f 100644 --- a/source3/lib/account_pol.c +++ b/source3/lib/account_pol.c @@ -2,6 +2,7 @@ * Unix SMB/CIFS implementation. * account policy storage * Copyright (C) Jean François Micouleau 1998-2001. + * Copyright (C) Andrew Bartlett 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +32,7 @@ BOOL init_account_policy(void) { static pid_t local_pid; char *vstring = "INFO/version"; + uint32 version; if (tdb && local_pid == sys_getpid()) return True; @@ -44,9 +46,9 @@ BOOL init_account_policy(void) /* handle a Samba upgrade */ tdb_lock_bystring(tdb, vstring); - if (tdb_fetch_int32(tdb, vstring) != DATABASE_VERSION) { + if (!tdb_fetch_uint32(tdb, vstring, &version) || version != DATABASE_VERSION) { tdb_traverse(tdb, tdb_traverse_delete_fn, NULL); - tdb_store_int32(tdb, vstring, DATABASE_VERSION); + tdb_store_uint32(tdb, vstring, DATABASE_VERSION); account_policy_set(AP_MIN_PASSWORD_LEN, MINPASSWDLENGTH); /* 5 chars minimum */ account_policy_set(AP_PASSWORD_HISTORY, 0); /* don't keep any old password */ @@ -63,33 +65,50 @@ BOOL init_account_policy(void) return True; } +static const struct { + int field; + char *string; +} account_policy_names[] = { + {AP_MIN_PASSWORD_LEN, "min password length"}, + {AP_PASSWORD_HISTORY, "password history"}, + {AP_USER_MUST_LOGON_TO_CHG_PASS, "user must logon to change password"}, + {AP_MAX_PASSWORD_AGE, "maximum password age"}, + {AP_MIN_PASSWORD_AGE,"minimum password age"}, + {AP_LOCK_ACCOUNT_DURATION, "lockout duration"}, + {AP_RESET_COUNT_TIME, "reset count minutes"}, + {AP_BAD_ATTEMPT_LOCKOUT, "bad lockout attempt"}, + {AP_TIME_TO_LOGOUT, "disconnect time"}, + {0, NULL} +}; + /**************************************************************************** +Get the account policy name as a string from its #define'ed number ****************************************************************************/ -static char *decode_account_policy_name(int field) +static const char *decode_account_policy_name(int field) { - switch (field) { - case AP_MIN_PASSWORD_LEN: - return "min password length"; - case AP_PASSWORD_HISTORY: - return "password history"; - case AP_USER_MUST_LOGON_TO_CHG_PASS: - return "user must logon to change password"; - case AP_MAX_PASSWORD_AGE: - return "maximum password age"; - case AP_MIN_PASSWORD_AGE: - return "minimum password age"; - case AP_LOCK_ACCOUNT_DURATION: - return "lockout duration"; - case AP_RESET_COUNT_TIME: - return "reset count minutes"; - case AP_BAD_ATTEMPT_LOCKOUT: - return "bad lockout attempt"; - case AP_TIME_TO_LOGOUT: - return "disconnect time"; - default: - return "undefined value"; + int i; + for (i=0; account_policy_names[i].string; i++) { + if (field == account_policy_names[i].field) + return account_policy_names[i].string; } + return NULL; + +} + +/**************************************************************************** +Get the account policy name as a string from its #define'ed number +****************************************************************************/ + +int account_policy_name_to_feildnum(const char *name) +{ + int i; + for (i=0; account_policy_names[i].string; i++) { + if (strcmp(name, account_policy_names[i].string) == 0) + return account_policy_names[i].field; + } + return 0; + } @@ -101,8 +120,17 @@ BOOL account_policy_get(int field, uint32 *value) init_account_policy(); + *value = 0; + fstrcpy(name, decode_account_policy_name(field)); - *value=tdb_fetch_int32(tdb, name); + if (!*name) { + DEBUG(1, ("account_policy_get: Field %d is not a valid account policy type! Cannot get, returning 0.\n", field)); + return False; + } + if (!tdb_fetch_uint32(tdb, name, value)) { + DEBUG(1, ("account_policy_get: tdb_fetch_uint32 failed for feild %d (%s), returning 0", field, name)); + return False; + } DEBUG(10,("account_policy_get: %s:%d\n", name, *value)); return True; } @@ -117,8 +145,16 @@ BOOL account_policy_set(int field, uint32 value) init_account_policy(); fstrcpy(name, decode_account_policy_name(field)); - if ( tdb_store_int32(tdb, name, value)== -1) + if (!*name) { + DEBUG(1, ("Field %d is not a valid account policy type! Cannot set.\n", field)); return False; + } + + if (!tdb_store_uint32(tdb, name, value)) { + DEBUG(1, ("tdb_store_uint32 failed for feild %d (%s) on value %u", field, name, value)); + return False; + } + DEBUG(10,("account_policy_set: %s:%d\n", name, value)); return True; diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index f48c24fbc02..4f67cf7ab75 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -416,6 +416,7 @@ int main (int argc, char **argv) static char *profile_path = NULL; static char *config_file = dyn_CONFIGFILE; static char *new_debuglevel = NULL; + static char *account_policy = NULL; struct pdb_context *in; poptContext pc; @@ -437,34 +438,51 @@ int main (int argc, char **argv) {"export", 'e',POPT_ARG_STRING,&backend_out,0,"export user accounts to backend", NULL}, {"debuglevel",'D', POPT_ARG_STRING, &new_debuglevel,0,"set debuglevel",NULL}, {"configfile",'c',POPT_ARG_STRING, &config_file,0,"use different configuration file",NULL}, + {"account-policy-get",'P',POPT_ARG_STRING, &account_policy,0,"get the value of an account policy (like maximum password age)",NULL}, + {0,0,0,0} }; - + setup_logging("pdbedit", True); - + pc = poptGetContext(NULL, argc, (const char **) argv, long_options, - POPT_CONTEXT_KEEP_FIRST); - + POPT_CONTEXT_KEEP_FIRST); + while((opt = poptGetNextOpt(pc)) != -1); - + if (new_debuglevel){ debug_parse_levels(new_debuglevel); AllowDebugChange = False; } - + if (!lp_load(config_file,True,False,False)) { fprintf(stderr, "Can't load %s - run testparm to debug it\n", - config_file); + config_file); exit(1); } - - + + setparms = (full_name || home_dir || home_drive || logon_script || profile_path); - - if (((add_user?1:0) + (delete_user?1:0) + (list_users?1:0) + (import?1:0) + (setparms?1:0)) + (backend_out?1:0) > 1) { + + if (((add_user?1:0) + (delete_user?1:0) + (list_users?1:0) + (import?1:0) + (setparms?1:0)) + (backend_out?1:0) + (account_policy?1:0) > 1) { fprintf (stderr, "Incompatible options on command line!\n"); exit(1); } + + if (account_policy) { + uint32 value; + int field = account_policy_name_to_feildnum(account_policy); + if (field == 0) { + fprintf(stderr, "No account policy by that name\n"); + exit(1); + } + if (!account_policy_get(field, &value)){ + fprintf(stderr, "valid account policy, but unable to fetch value!\n"); + exit(1); + } + printf("account policy value for %s is %u\n", account_policy, value); + exit(0); + } if (!backend_in) { if (!NT_STATUS_IS_OK(make_pdb_context_list(&in, lp_passdb_backend()))){ From 84f2875d7bac30e75397bbf89d3d5e79ba790ddc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 05:51:44 +0000 Subject: [PATCH 083/262] If lp_add_home() fails, don't go any further, just return -1. Andrew Bartlett (This used to be commit 2febc7ce1aa6b01ec68bd007ce0286813dff301d) --- source3/smbd/service.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 4e6530674be..7dd61f23257 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -104,7 +104,9 @@ int add_home_service(const char *service, const char *username, const char *home } } - lp_add_home(service, iHomeService, username, homedir); + if (!lp_add_home(service, iHomeService, username, homedir)) { + return -1; + } return lp_servicenumber(service); From c808cc3643f06c72f870d0b14a37c7a46627e2fa Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Jul 2002 06:42:09 +0000 Subject: [PATCH 084/262] several changes in this checkin * added REG_OPEN_HKCR for supporting regedit.exe * All data n a REGISTRY_VALUE is stored to a pointer now * fixed REG_INFO to correctly display data when double clicking on and entry in the registry editor * Will now enumerate installed driver_info_3 data * fixed numerous bugs related to pointer offsets, memory issues, etc.. in the registry routines * added a simple caching mechanism to fetch_reg_[keys|values]_specific() All that is left now is to enumerate PrinterData and I will have finished what I started out to do.... (This used to be commit 419d7208e8384e4ad2c4dd328ad5e630971bc76c) --- source3/include/rpc_reg.h | 13 +- source3/registry/reg_db.c | 9 ++ source3/registry/reg_frontend.c | 138 ++++++++++------- source3/registry/reg_printing.c | 260 +++++++++++++++++++++++++++++++- source3/rpc_parse/parse_reg.c | 174 ++++++++++++++++++--- source3/rpc_server/srv_reg.c | 29 +++- source3/rpc_server/srv_reg_nt.c | 156 +++++++++++-------- 7 files changed, 629 insertions(+), 150 deletions(-) diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index d025cb2c0d8..e2347c328be 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -26,7 +26,6 @@ /* winreg pipe defines NOT IMPLEMENTED !! -#define REG_OPEN_HKCR 0x00 #define _REG_UNK_01 0x01 #define _REG_UNK_03 0x03 #define REG_CREATE_KEY 0x06 @@ -45,6 +44,7 @@ */ /* Implemented */ +#define REG_OPEN_HKCR 0x00 #define REG_OPEN_HKLM 0x02 #define REG_OPEN_HKU 0x04 #define REG_CLOSE 0x05 @@ -65,6 +65,7 @@ #define KEY_HKLM "HKLM" #define KEY_HKU "HKU" +#define KEY_HKCR "HKCR" #define KEY_PRINTING "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print" #define KEY_TREE_ROOT "" @@ -93,12 +94,16 @@ typedef struct { fstring valuename; uint16 type; uint32 size; /* in bytes */ + void *data_p; +#if 0 union { char *string; - uint32 dword; + uint32 *dword; uint8 *binary; void *void_ptr; /* for casting only */ } data; +#endif + } REGISTRY_VALUE; /* container for regostry values */ @@ -145,7 +150,7 @@ typedef struct _RegistryKey { struct _RegistryKey *prev, *next; POLICY_HND hnd; - fstring name; /* full name of registry key */ + pstring name; /* full name of registry key */ REGISTRY_HOOK *hook; } REGISTRY_KEY; @@ -551,7 +556,7 @@ typedef struct r_reg_info_info uint32 type; /* key datatype */ uint32 ptr_uni_val; /* key value pointer */ - BUFFER2 *uni_val; /* key value */ + BUFFER2 uni_val; /* key value */ uint32 ptr_max_len; uint32 buf_max_len; diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 714e14e48ba..773a4f7fb5b 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -106,6 +106,12 @@ static BOOL init_registry_data( void ) if ( !regdb_store_reg_keys( keyname, &subkeys ) ) return False; + /* HKEY_CLASSES_ROOT*/ + + pstrcpy( keyname, KEY_HKCR ); + if ( !regdb_store_reg_keys( keyname, &subkeys ) ) + return False; + return True; } @@ -233,6 +239,7 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) int i; fstring subkeyname; + DEBUG(10,("regdb_fetch_reg_keys: Enter key => [%s]\n", key ? key : "NULL")); pstrcpy( path, key ); @@ -258,6 +265,8 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) SAFE_FREE( dbuf.dptr ); + DEBUG(10,("regdb_fetch_reg_keys: Exit [%d] items\n", num_items)); + return num_items; } diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index a2822073765..db612709d10 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -149,7 +149,6 @@ int regval_ctr_numvals( REGVAL_CTR *ctr ) REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val ) { REGISTRY_VALUE *copy = NULL; - BOOL fail = True; if ( !val ) return NULL; @@ -162,35 +161,15 @@ REGISTRY_VALUE* dup_registry_value( REGISTRY_VALUE *val ) /* copy all the non-pointer initial data */ memcpy( copy, val, sizeof(REGISTRY_VALUE) ); + if ( val->data_p ) + { + if ( !(copy->data_p = memdup( val->data_p, val->size )) ) { + DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n", + val->size)); + SAFE_FREE( copy ); + } + } - switch ( val->type ) { - case REG_SZ: - if ( !(copy->data.string = strdup( val->data.string )) ) { - DEBUG(0,("dup_registry_value: strdup() failed for [%s]!\n", - val->data.string)); - goto done; - } - break; - - case REG_DWORD: - /* nothing to be done; already copied by memcpy() */ - break; - - case REG_BINARY: - if ( !(copy->data.string = memdup( val->data.binary, val->size )) ) { - DEBUG(0,("dup_registry_value: memdup() failed for [%d] bytes!\n", - val->size)); - goto done; - } - break; - } - - fail = False; - -done: - if ( fail ) - SAFE_FREE( copy ); - return copy; } @@ -203,16 +182,7 @@ void free_registry_value( REGISTRY_VALUE *val ) if ( !val ) return; - switch ( val->type ) - { - case REG_SZ: - SAFE_FREE( val->data.string ); - break; - case REG_BINARY: - SAFE_FREE( val->data.binary ); - break; - } - + SAFE_FREE( val->data_p ); SAFE_FREE( val ); return; @@ -263,19 +233,26 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, fstrcpy( ctr->values[ctr->num_values]->valuename, name ); ctr->values[ctr->num_values]->type = type; + ctr->values[ctr->num_values]->data_p = talloc_memdup( ctr->ctx, data_p, size ); + ctr->values[ctr->num_values]->size = size; +#if 0 switch ( type ) { case REG_SZ: ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p ); break; + case REG_MULTI_SZ: + ctr->values[ctr->num_values]->data.string = talloc_memdup( ctr->ctx, data_p, size ); + break; case REG_DWORD: + ctr->values[ctr->num_values]->data.dword = *(uint32*)data_p; break; case REG_BINARY: ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size ); break; } - ctr->values[ctr->num_values]->size = size; +#endif ctr->num_values++; } @@ -374,23 +351,46 @@ int fetch_reg_keys( REGISTRY_KEY *key, REGSUBKEY_CTR *subkey_ctr ) BOOL fetch_reg_keys_specific( REGISTRY_KEY *key, char** subkey, uint32 key_index ) { + static REGSUBKEY_CTR ctr; + static pstring save_path; + static BOOL ctr_init = False; char *s; - REGSUBKEY_CTR ctr; - ZERO_STRUCTP( &ctr ); + *subkey = NULL; - regsubkey_ctr_init( &ctr ); + /* simple caching for performance; very basic heuristic */ - if ( fetch_reg_keys( key, &ctr) == -1 ) - return False; + if ( !ctr_init ) { + DEBUG(8,("fetch_reg_keys_specific: Initializing cache of subkeys for [%s]\n", key->name)); + ZERO_STRUCTP( &ctr ); + regsubkey_ctr_init( &ctr ); + + pstrcpy( save_path, key->name ); + + if ( fetch_reg_keys( key, &ctr) == -1 ) + return False; + + ctr_init = True; + } + /* clear the cache when key_index == 0 or the path has changed */ + else if ( !key_index || StrCaseCmp( save_path, key->name) ) { + DEBUG(8,("fetch_reg_keys_specific: Updating cache of subkeys for [%s]\n", key->name)); + + regsubkey_ctr_destroy( &ctr ); + regsubkey_ctr_init( &ctr ); + + pstrcpy( save_path, key->name ); + + if ( fetch_reg_keys( key, &ctr) == -1 ) + return False; + } + if ( !(s = regsubkey_ctr_specific_key( &ctr, key_index )) ) return False; *subkey = strdup( s ); - regsubkey_ctr_destroy( &ctr ); - return True; } @@ -416,25 +416,49 @@ int fetch_reg_values( REGISTRY_KEY *key, REGVAL_CTR *val ) responsible for freeing memory ***********************************************************************/ -BOOL fetch_reg_values_specific( REGISTRY_KEY *key, REGISTRY_VALUE **val, uint32 key_index ) +BOOL fetch_reg_values_specific( REGISTRY_KEY *key, REGISTRY_VALUE **val, uint32 val_index ) { - REGVAL_CTR ctr; - REGISTRY_VALUE *v; + static REGVAL_CTR ctr; + static pstring save_path; + static BOOL ctr_init = False; + REGISTRY_VALUE *v; - ZERO_STRUCTP( &ctr ); + *val = NULL; - regval_ctr_init( &ctr ); + /* simple caching for performance; very basic heuristic */ - if ( fetch_reg_values( key, &ctr) == -1 ) - return False; + if ( !ctr_init ) { + DEBUG(8,("fetch_reg_values_specific: Initializing cache of values for [%s]\n", key->name)); - if ( !(v = regval_ctr_specific_value( &ctr, key_index )) ) + ZERO_STRUCTP( &ctr ); + regval_ctr_init( &ctr ); + + pstrcpy( save_path, key->name ); + + if ( fetch_reg_values( key, &ctr) == -1 ) + return False; + + ctr_init = True; + } + /* clear the cache when val_index == 0 or the path has changed */ + else if ( !val_index || StrCaseCmp(save_path, key->name) ) { + + DEBUG(8,("fetch_reg_values_specific: Updating cache of values for [%s]\n", key->name)); + + regval_ctr_destroy( &ctr ); + regval_ctr_init( &ctr ); + + pstrcpy( save_path, key->name ); + + if ( fetch_reg_values( key, &ctr) == -1 ) + return False; + } + + if ( !(v = regval_ctr_specific_value( &ctr, val_index )) ) return False; *val = dup_registry_value( v ); - regval_ctr_destroy( &ctr ); - return True; } diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index f4c1feb281f..d8e0f18953c 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -84,18 +84,270 @@ static char* trim_reg_path( char *path ) static int print_subpath_environments( char *key, REGSUBKEY_CTR *subkeys ) { + char *environments[] = { + "Windows 4.0", + "Windows NT x86", + "Windows NT R4000", + "Windows NT Alpha_AXP", + "Windows NT PowerPC", + NULL }; + fstring *drivers = NULL; + int i, env_index, num_drivers; + BOOL valid_env = False; + char *base, *new_path; + char *keystr; + char *key2 = NULL; + int num_subkeys = -1; + DEBUG(10,("print_subpath_environments: key=>[%s]\n", key ? key : "NULL" )); - if ( !key ) + /* listed architectures of installed drivers */ + + if ( !key ) { - /* listed architectures of installed drivers */ + /* Windows 9x drivers */ + if ( get_ntdrivers( &drivers, environments[0], 0 ) ) + regsubkey_ctr_addkey( subkeys, environments[0] ); + SAFE_FREE( drivers ); + + /* Windows NT/2k intel drivers */ + + if ( get_ntdrivers( &drivers, environments[1], 2 ) + || get_ntdrivers( &drivers, environments[1], 3 ) ) + { + regsubkey_ctr_addkey( subkeys, environments[1] ); + } + SAFE_FREE( drivers ); + + /* Windows NT 4.0; non-intel drivers */ + for ( i=2; environments[i]; i++ ) { + if ( get_ntdrivers( &drivers, environments[i], 2 ) ) + regsubkey_ctr_addkey( subkeys, environments[i] ); + + } + SAFE_FREE( drivers ); + + num_subkeys = regsubkey_ctr_numkeys( subkeys ); + goto done; } + /* we are dealing with a subkey of "Environments */ - return 0; + key2 = strdup( key ); + keystr = key2; + reg_split_path( keystr, &base, &new_path ); + + /* sanity check */ + + for ( env_index=0; environments[env_index]; env_index++ ) { + if ( StrCaseCmp( environments[env_index], base ) == 0 ) { + valid_env = True; + break; + } + } + + if ( !valid_env ) + return -1; + + /* enumerate driver versions; environment is environments[env_index] */ + + if ( !new_path ) { + switch ( env_index ) { + case 0: /* Win9x */ + if ( get_ntdrivers( &drivers, environments[0], 0 ) ) { + regsubkey_ctr_addkey( subkeys, "0" ); + SAFE_FREE( drivers ); + } + break; + case 1: /* Windows NT/2k - intel */ + if ( get_ntdrivers( &drivers, environments[1], 2 ) ) { + regsubkey_ctr_addkey( subkeys, "2" ); + SAFE_FREE( drivers ); + } + if ( get_ntdrivers( &drivers, environments[1], 3 ) ) { + regsubkey_ctr_addkey( subkeys, "3" ); + SAFE_FREE( drivers ); + } + break; + default: /* Windows NT - nonintel */ + if ( get_ntdrivers( &drivers, environments[env_index], 2 ) ) { + regsubkey_ctr_addkey( subkeys, "2" ); + SAFE_FREE( drivers ); + } + + } + + num_subkeys = regsubkey_ctr_numkeys( subkeys ); + goto done; + } + + /* we finally get to enumerate the drivers */ + + keystr = new_path; + reg_split_path( keystr, &base, &new_path ); + + if ( !new_path ) { + num_drivers = get_ntdrivers( &drivers, environments[env_index], atoi(base) ); + for ( i=0; i\\ + *********************************************************************/ + +static int print_subpath_values_environments( char *key, REGVAL_CTR *val ) +{ + char *keystr; + char *key2 = NULL; + char *base, *new_path; + fstring env; + fstring driver; + int version; + NT_PRINTER_DRIVER_INFO_LEVEL driver_ctr; + NT_PRINTER_DRIVER_INFO_LEVEL_3 *info3; + WERROR w_result; + char *buffer = NULL; + char *buffer2 = NULL; + int buffer_size = 0; + int i, length; + char *filename; + + DEBUG(8,("print_subpath_values_environments: Enter key => [%s]\n", key ? key : "NULL")); + + if ( !key ) + return 0; + + /* + * The only key below KEY_PRINTING\Environments that + * posseses values is each specific printer driver + * First get the arch, version, & driver name + */ + + /* env */ + + key2 = strdup( key ); + keystr = key2; + reg_split_path( keystr, &base, &new_path ); + if ( !base || !new_path ) + return 0; + fstrcpy( env, base ); + + /* version */ + + keystr = new_path; + reg_split_path( keystr, &base, &new_path ); + if ( !base || !new_path ) + return 0; + version = atoi( base ); + + /* printer driver name */ + + keystr = new_path; + reg_split_path( keystr, &base, &new_path ); + /* new_path should be NULL here since this must be the last key */ + if ( !base || new_path ) + return 0; + fstrcpy( driver, base ); + + w_result = get_a_printer_driver( &driver_ctr, 3, driver, env, version ); + + if ( !W_ERROR_IS_OK(w_result) ) + return -1; + + /* build the values out of the driver information */ + info3 = driver_ctr.info_3; + + filename = dos_basename( info3->driverpath ); + regval_ctr_addvalue( val, "Driver", REG_SZ, filename, strlen(filename)+1 ); + filename = dos_basename( info3->configfile ); + regval_ctr_addvalue( val, "Configuration File", REG_SZ, filename, strlen(filename)+1 ); + filename = dos_basename( info3->datafile ); + regval_ctr_addvalue( val, "Data File", REG_SZ, filename, strlen(filename)+1 ); + filename = dos_basename( info3->helpfile ); + regval_ctr_addvalue( val, "Help File", REG_SZ, filename, strlen(filename)+1 ); + + regval_ctr_addvalue( val, "Data Type", REG_SZ, info3->defaultdatatype, strlen(info3->defaultdatatype)+1 ); + + regval_ctr_addvalue( val, "Version", REG_DWORD, (char*)&info3->cversion, sizeof(info3->cversion) ); + + if ( info3->dependentfiles ) + { + /* place the list of dependent files in a single + character buffer, separating each file name by + a NULL */ + + for ( i=0; strcmp(info3->dependentfiles[i], ""); i++ ) + { + /* strip the path to only the file's base name */ + + filename = dos_basename( info3->dependentfiles[i] ); + + length = strlen(filename); + + buffer2 = Realloc( buffer, buffer_size + length + 1 ); + if ( !buffer2 ) + break; + buffer = buffer2; + + memcpy( buffer+buffer_size, filename, length+1 ); + + buffer_size += length + 1; + } + + /* terminated by double NULL. Add the final one here */ + + buffer2 = Realloc( buffer, buffer_size + 1 ); + if ( !buffer2 ) { + SAFE_FREE( buffer ); + buffer_size = 0; + } + else { + buffer = buffer2; + buffer[buffer_size++] = '\0'; + } + } + + regval_ctr_addvalue( val, "Dependent Files", REG_MULTI_SZ, buffer, buffer_size ); + + free_a_printer_driver( driver_ctr, 3 ); + SAFE_FREE( key2 ); + SAFE_FREE( buffer ); + + DEBUG(8,("print_subpath_values_environments: Exit\n")); + + return regval_ctr_numvals( val ); +} + + /********************************************************************** handle enumeration of subkeys below KEY_PRINTING\Forms Really just a stub function, but left here in case it needs to @@ -263,6 +515,8 @@ static int handle_printing_subpath( char *key, REGSUBKEY_CTR *subkeys, REGVAL_CT case KEY_INDEX_ENVIR: if ( subkeys ) print_subpath_environments( p, subkeys ); + if ( val ) + print_subpath_values_environments( p, val ); break; case KEY_INDEX_FORMS: diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 3987f208851..83b55863eb1 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -6,6 +6,7 @@ * Copyright (C) Paul Ashton 1997. * Copyright (C) Marc Jacobsen 1999. * Copyright (C) Simo Sorce 2000. + * Copyright (C) Gerald Carter 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,89 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_PARSE +/******************************************************************* + Fill in a BUFFER2 for the data given a REGISTRY_VALUE + *******************************************************************/ + +static uint32 reg_init_buffer2( BUFFER2 *buf2, REGISTRY_VALUE *val ) +{ + UNISTR2 unistr; + uint32 real_size = 0; + char *string; + char *list = NULL; + char *list2 = NULL; + + if ( !buf2 || !val ) + return 0; + + real_size = val->size; + + switch (val->type ) + { + case REG_SZ: + string = (char*)val->data_p; + DEBUG(10,("reg_init_buffer2: REG_SZ string => [%s]\n", string)); + + init_unistr2( &unistr, (char*)val->data_p, strlen((char*)val->data_p)+1 ); + init_buffer2( buf2, (char*)unistr.buffer, unistr.uni_str_len*2 ); + real_size = unistr.uni_str_len*2; + break; + + case REG_MULTI_SZ: + string = (char*)val->data_p; + real_size = 0; + while ( string && *string ) + { + DEBUG(10,("reg_init_buffer2: REG_MULTI_SZ string => [%s], size => [%d]\n", string, real_size )); + + init_unistr2( &unistr, string, strlen(string)+1 ); + + list2 = Realloc( list, real_size + unistr.uni_str_len*2 ); + if ( !list2 ) + break; + list = list2; + + memcpy( list+real_size, unistr.buffer, unistr.uni_str_len*2 ); + + real_size += unistr.uni_str_len*2; + + string += strlen(string)+1; + } + + list2 = Realloc( list, real_size + 2 ); + if ( !list2 ) + break; + list = list2; + list[real_size++] = 0x0; + list[real_size++] = 0x0; + + init_buffer2( buf2, (char*)list, real_size ); + + DEBUG(10,("reg_init_buffer2: REG_MULTI_SZ size => [%d]\n", real_size )); + + break; + + case REG_BINARY: + DEBUG(10,("reg_init_buffer2: REG_BINARY size => [%d]\n", val->size )); + + init_buffer2( buf2, val->data_p, val->size ); + break; + + case REG_DWORD: + DEBUG(10,("reg_init_buffer2: REG_DWORD value => [%d]\n", *(uint32*)val->data_p)); + init_buffer2( buf2, val->data_p, val->size ); + break; + + default: + DEBUG(0,("reg_init_buffer2: Unsupported registry data type [%d]\n", val->type)); + break; + } + + SAFE_FREE( list ); + + return real_size; +} + /******************************************************************* Inits a structure. ********************************************************************/ @@ -165,6 +249,8 @@ BOOL reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, } + + /******************************************************************* Inits a structure. ********************************************************************/ @@ -1023,6 +1109,45 @@ BOOL reg_io_q_info(char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth) return True; } +/******************************************************************* + Inits a structure. + New version to replace older init_reg_r_info() +********************************************************************/ + +BOOL new_init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, + REGISTRY_VALUE *val, NTSTATUS status) +{ + uint32 buf_len = 0; + + if(r_r == NULL) + return False; + + if ( !val ) + return False; + + r_r->ptr_type = 1; + r_r->type = val->type; + + /* if include_keyval is not set, don't send the key value, just + the buflen data. probably used by NT5 to allocate buffer space - SK */ + + if ( include_keyval ) { + r_r->ptr_uni_val = 1; + buf_len = reg_init_buffer2( &r_r->uni_val, val ); + + } + + r_r->ptr_max_len = 1; + r_r->buf_max_len = buf_len; + + r_r->ptr_len = 1; + r_r->buf_len = buf_len; + + r_r->status = status; + + return True; +} + /******************************************************************* Inits a structure. ********************************************************************/ @@ -1030,28 +1155,27 @@ BOOL reg_io_q_info(char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth) BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, BUFFER2* buf, uint32 type, NTSTATUS status) { - if(r_r == NULL) - return False; - + if(r_r == NULL) + return False; - r_r->ptr_type = 1; - r_r->type = type; + r_r->ptr_type = 1; + r_r->type = type; - /* if include_keyval is not set, don't send the key value, just - the buflen data. probably used by NT5 to allocate buffer space - SK */ - r_r->ptr_uni_val = include_keyval ? 1:0; - r_r->uni_val = buf; + /* if include_keyval is not set, don't send the key value, just + the buflen data. probably used by NT5 to allocate buffer space - SK */ - r_r->ptr_max_len = 1; - r_r->buf_max_len = r_r->uni_val->buf_max_len; + r_r->ptr_uni_val = include_keyval ? 1:0; + r_r->uni_val = *buf; - r_r->ptr_len = 1; - r_r->buf_len = r_r->uni_val->buf_len; + r_r->ptr_max_len = 1; + r_r->buf_max_len = r_r->uni_val.buf_max_len; - r_r->status = status; + r_r->ptr_len = 1; + r_r->buf_len = r_r->uni_val.buf_len; - return True; - + r_r->status = status; + + return True; } /******************************************************************* @@ -1081,7 +1205,7 @@ BOOL reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) return False; if(r_r->ptr_uni_val != 0) { - if(!smb_io_buffer2("uni_val", r_r->uni_val, r_r->ptr_uni_val, ps, depth)) + if(!smb_io_buffer2("uni_val", &r_r->uni_val, r_r->ptr_uni_val, ps, depth)) return False; } @@ -1144,10 +1268,16 @@ makes a structure. void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val ) { + uint32 real_size; + + DEBUG(8,("init_reg_r_enum_val: Enter\n")); + ZERO_STRUCTP(r_u); /* value name */ + DEBUG(10,("init_reg_r_enum_val: Valuename => [%s]\n", val->valuename)); + init_uni_hdr( &r_u->hdr_name, strlen(val->valuename)+1 ); init_unistr2( &r_u->uni_name, val->valuename, strlen(val->valuename)+1 ); @@ -1156,18 +1286,20 @@ void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val ) r_u->ptr_type = 1; r_u->type = val->type; - /* data */ + /* REG_SZ & REG_MULTI_SZ must be converted to UNICODE */ r_u->ptr_value = 1; - init_buffer2( &r_u->buf_value, val->data.void_ptr, val->size ); + real_size = reg_init_buffer2( &r_u->buf_value, val ); /* lengths */ r_u->ptr1 = 1; - r_u->len_value1 = val->size; + r_u->len_value1 = real_size; r_u->ptr2 = 1; - r_u->len_value2 = val->size; + r_u->len_value2 = real_size; + + DEBUG(8,("init_reg_r_enum_val: Exit\n")); } /******************************************************************* diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c index ee873e32e9f..cb96005db10 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -83,7 +83,7 @@ static BOOL api_reg_open_hklm(pipes_struct *p) } /******************************************************************* - api_reg_open_khlm + api_reg_open_khu ********************************************************************/ static BOOL api_reg_open_hku(pipes_struct *p) @@ -108,6 +108,32 @@ static BOOL api_reg_open_hku(pipes_struct *p) return True; } +/******************************************************************* + api_reg_open_khcr + ********************************************************************/ + +static BOOL api_reg_open_hkcr(pipes_struct *p) +{ + REG_Q_OPEN_HKCR q_u; + REG_R_OPEN_HKCR r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + /* grab the reg open */ + if(!reg_io_q_open_hkcr("", &q_u, data, 0)) + return False; + + r_u.status = _reg_open_hkcr(p, &q_u, &r_u); + + if(!reg_io_r_open_hkcr("", &r_u, rdata, 0)) + return False; + + return True; +} + /******************************************************************* api_reg_open_entry @@ -324,6 +350,7 @@ static struct api_struct api_reg_cmds[] = { { "REG_CLOSE" , REG_CLOSE , api_reg_close }, { "REG_OPEN_ENTRY" , REG_OPEN_ENTRY , api_reg_open_entry }, + { "REG_OPEN_HKCR" , REG_OPEN_HKCR , api_reg_open_hkcr }, { "REG_OPEN_HKLM" , REG_OPEN_HKLM , api_reg_open_hklm }, { "REG_OPEN_HKU" , REG_OPEN_HKU , api_reg_open_hku }, { "REG_ENUM_KEY" , REG_ENUM_KEY , api_reg_enum_key }, diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 99439bcc388..3afb2a2c812 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -78,33 +78,35 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY char *subkeyname, uint32 access_granted ) { REGISTRY_KEY *regkey = NULL; - pstring parent_keyname; NTSTATUS result = NT_STATUS_OK; REGSUBKEY_CTR subkeys; - if ( parent ) { - pstrcpy( parent_keyname, parent->name ); - pstrcat( parent_keyname, "\\" ); - } - else - *parent_keyname = '\0'; + DEBUG(7,("open_registry_key: name = [%s][%s]\n", + parent ? parent->name : "NULL", subkeyname)); - DEBUG(7,("open_registry_key: name = [%s][%s]\n", parent_keyname, subkeyname)); - - /* All registry keys **must** have a name of non-zero length */ - - if (!subkeyname || !*subkeyname ) - return NT_STATUS_OBJECT_NAME_NOT_FOUND; - if ((regkey=(REGISTRY_KEY*)malloc(sizeof(REGISTRY_KEY))) == NULL) return NT_STATUS_NO_MEMORY; ZERO_STRUCTP( regkey ); - /* copy the name */ + /* + * very crazy, but regedit.exe on Win2k will attempt to call + * REG_OPEN_ENTRY with a keyname of "". We should return a new + * (second) handle here on the key->name. regedt32.exe does + * not do this stupidity. --jerry + */ - pstrcpy( regkey->name, parent_keyname ); - pstrcat( regkey->name, subkeyname ); + if (!subkeyname || !*subkeyname ) { + pstrcpy( regkey->name, parent->name ); + } + else { + pstrcpy( regkey->name, "" ); + if ( parent ) { + pstrcat( regkey->name, parent->name ); + pstrcat( regkey->name, "\\" ); + } + pstrcat( regkey->name, subkeyname ); + } /* Look up the table of registry I/O operations */ @@ -227,7 +229,8 @@ static BOOL get_value_information( REGISTRY_KEY *key, uint32 *maxnum, if ( !key ) return False; - ZERO_STRUCTP( &val ); + + ZERO_STRUCTP( &values ); regval_ctr_init( &values ); @@ -274,7 +277,6 @@ NTSTATUS _reg_close(pipes_struct *p, REG_Q_CLOSE *q_u, REG_R_CLOSE *r_u) } /******************************************************************* - reg_reply_open ********************************************************************/ NTSTATUS _reg_open_hklm(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM *r_u) @@ -283,7 +285,14 @@ NTSTATUS _reg_open_hklm(pipes_struct *p, REG_Q_OPEN_HKLM *q_u, REG_R_OPEN_HKLM * } /******************************************************************* - reg_reply_open + ********************************************************************/ + +NTSTATUS _reg_open_hkcr(pipes_struct *p, REG_Q_OPEN_HKCR *q_u, REG_R_OPEN_HKCR *r_u) +{ + return open_registry_key( p, &r_u->pol, NULL, KEY_HKCR, 0x0 ); +} + +/******************************************************************* ********************************************************************/ NTSTATUS _reg_open_hku(pipes_struct *p, REG_Q_OPEN_HKU *q_u, REG_R_OPEN_HKU *r_u) @@ -310,7 +319,7 @@ NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTR rpcstr_pull(name,q_u->uni_name.buffer,sizeof(name),q_u->uni_name.uni_str_len*2,0); DEBUG(5,("reg_open_entry: Enter\n")); - + result = open_registry_key( p, &pol, key, name, 0x0 ); init_reg_r_open_entry( r_u, &pol, result ); @@ -326,64 +335,83 @@ NTSTATUS _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTR NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) { - NTSTATUS status = NT_STATUS_OK; - char *value = NULL; - uint32 type = 0x1; /* key type: REG_SZ */ - UNISTR2 *uni_key = NULL; - BUFFER2 *buf = NULL; - fstring name; - REGISTRY_KEY *key = find_regkey_index_by_hnd( p, &q_u->pol ); + NTSTATUS status = NT_STATUS_NO_SUCH_FILE; + fstring name; + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + REGISTRY_VALUE *val = NULL; + REGISTRY_VALUE emptyval; + REGVAL_CTR regvals; + int i; DEBUG(5,("_reg_info: Enter\n")); - if ( !key ) + if ( !regkey ) return NT_STATUS_INVALID_HANDLE; - DEBUG(7,("_reg_info: policy key name = [%s]\n", key->name)); - + DEBUG(7,("_reg_info: policy key name = [%s]\n", regkey->name)); + rpcstr_pull(name, q_u->uni_type.buffer, sizeof(name), q_u->uni_type.uni_str_len*2, 0); - DEBUG(5,("reg_info: checking subkey: %s\n", name)); + DEBUG(5,("reg_info: looking up value: [%s]\n", name)); - uni_key = (UNISTR2 *)talloc_zero(p->mem_ctx, sizeof(UNISTR2)); - buf = (BUFFER2 *)talloc_zero(p->mem_ctx, sizeof(BUFFER2)); - - if (!uni_key || !buf) - return NT_STATUS_NO_MEMORY; + ZERO_STRUCTP( ®vals ); + + regval_ctr_init( ®vals ); + /* couple of hard coded registry values */ + if ( strequal(name, "RefusePasswordChange") ) { - type=0xF770; - status = NT_STATUS_NO_SUCH_FILE; - init_unistr2(uni_key, "", 0); - init_buffer2(buf, (uint8*) uni_key->buffer, uni_key->uni_str_len*2); - - buf->buf_max_len=4; - + ZERO_STRUCTP( &emptyval ); + val = &emptyval; + goto out; } - switch (lp_server_role()) { - case ROLE_DOMAIN_PDC: - case ROLE_DOMAIN_BDC: - value = "LanmanNT"; - break; - case ROLE_STANDALONE: - value = "ServerNT"; - break; - case ROLE_DOMAIN_MEMBER: - value = "WinNT"; - break; + if ( strequal(name, "ProductType") ) { + /* This makes the server look like a member server to clients */ + /* which tells clients that we have our own local user and */ + /* group databases and helps with ACL support. */ + + switch (lp_server_role()) { + case ROLE_DOMAIN_PDC: + case ROLE_DOMAIN_BDC: + regval_ctr_addvalue( ®vals, "ProductType", REG_SZ, "LanmanNT", strlen("LanmanNT")+1 ); + break; + case ROLE_STANDALONE: + regval_ctr_addvalue( ®vals, "ProductType", REG_SZ, "ServerNT", strlen("ServerNT")+1 ); + break; + case ROLE_DOMAIN_MEMBER: + regval_ctr_addvalue( ®vals, "ProductType", REG_SZ, "WinNT", strlen("WinNT")+1 ); + break; + } + + val = regval_ctr_specific_value( ®vals, 0 ); + + status = NT_STATUS_OK; + + goto out; } - /* This makes the server look like a member server to clients */ - /* which tells clients that we have our own local user and */ - /* group databases and helps with ACL support. */ + /* else fall back to actually looking up the value */ + + for ( i=0; fetch_reg_values_specific(regkey, &val, i); i++ ) + { + DEBUG(10,("_reg_info: Testing value [%s]\n", val->valuename)); + if ( StrCaseCmp( val->valuename, name ) == 0 ) { + DEBUG(10,("_reg_info: Found match for value [%s]\n", name)); + status = NT_STATUS_OK; + break; + } + + free_registry_value( val ); + } - init_unistr2(uni_key, value, strlen(value)+1); - init_buffer2(buf, (uint8*)uni_key->buffer, uni_key->uni_str_len*2); - out: - init_reg_r_info(q_u->ptr_buf, r_u, buf, type, status); +out: + new_init_reg_r_info(q_u->ptr_buf, r_u, val, status); + + regval_ctr_destroy( ®vals ); + free_registry_value( val ); DEBUG(5,("_reg_info: Exit\n")); @@ -455,7 +483,7 @@ NTSTATUS _reg_enum_key(pipes_struct *p, REG_Q_ENUM_KEY *q_u, REG_R_ENUM_KEY *r_u { NTSTATUS status = NT_STATUS_OK; REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); - char *subkey; + char *subkey = NULL; DEBUG(5,("_reg_enum_key: Enter\n")); @@ -518,7 +546,7 @@ NTSTATUS _reg_enum_value(pipes_struct *p, REG_Q_ENUM_VALUE *q_u, REG_R_ENUM_VALU DEBUG(5,("_reg_enum_value: Exit\n")); done: - SAFE_FREE( val ); + free_registry_value( val ); return status; } From 0cfdb7bbe82cfbce95ea4d8956c9de6f3ab56b94 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Jul 2002 08:39:17 +0000 Subject: [PATCH 085/262] reran configure (This used to be commit d76e0838cf94ef3fd32d79d03b8e89971587bc2c) --- source3/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/configure b/source3/configure index a09c2d9b034..a9f18b9ac6c 100755 --- a/source3/configure +++ b/source3/configure @@ -5935,7 +5935,7 @@ else fi done -for ac_func in syslog vsyslog +for ac_func in syslog vsyslog getgrouplist do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:5942: checking for $ac_func" >&5 From a12ed7f506263c6ec34c7df6bbcb3e8434841403 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Jul 2002 08:58:03 +0000 Subject: [PATCH 086/262] done! printer_info_2, devicemode, sec_desc, & printer data all enumerate and display correctly in regedit.exe. Not sure about REG_SZ values in PrinterDriverData. If we store these in UNICODE, I'll have to fix up a few things. REG_BINARY & REG_DWORD are fine. (This used to be commit 2a30c243ec28734bbc721dfc01b743faa6f73788) --- source3/include/rpc_reg.h | 18 +-- source3/registry/reg_frontend.c | 33 ++--- source3/registry/reg_printing.c | 180 +++++++++++++++++++++++++++- source3/rpc_server/srv_spoolss_nt.c | 2 +- source3/script/mkproto.awk | 2 +- 5 files changed, 196 insertions(+), 39 deletions(-) diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index e2347c328be..41d33250158 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -1,9 +1,10 @@ /* Unix SMB/CIFS implementation. SMB parameters and setup - Copyright (C) Andrew Tridgell 1992-1997 - Copyright (C) Luke Kenneth Casson Leighton 1996-1997 - Copyright (C) Paul Ashton 1997 + Copyright (C) Andrew Tridgell 1992-1997. + Copyright (C) Luke Kenneth Casson Leighton 1996-1997. + Copyright (C) Paul Ashton 1997. + Copyright (C) Gerald Carter 2002. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -94,16 +95,7 @@ typedef struct { fstring valuename; uint16 type; uint32 size; /* in bytes */ - void *data_p; -#if 0 - union { - char *string; - uint32 *dword; - uint8 *binary; - void *void_ptr; /* for casting only */ - } data; -#endif - + uint8 *data_p; } REGISTRY_VALUE; /* container for regostry values */ diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index db612709d10..c0788c1b753 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -202,7 +202,19 @@ REGISTRY_VALUE* regval_ctr_specific_value( REGVAL_CTR *ctr, uint32 idx ) } /*********************************************************************** - Ad a new regostry value to the array + Retrive the TALLOC_CTX associated with a REGISTRY_VALUE + **********************************************************************/ + +TALLOC_CTX* regval_ctr_getctx( REGVAL_CTR *val ) +{ + if ( !val ) + return NULL; + + return val->ctx; +} + +/*********************************************************************** + Add a new regostry value to the array **********************************************************************/ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, @@ -235,25 +247,6 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, ctr->values[ctr->num_values]->type = type; ctr->values[ctr->num_values]->data_p = talloc_memdup( ctr->ctx, data_p, size ); ctr->values[ctr->num_values]->size = size; -#if 0 - switch ( type ) - { - case REG_SZ: - ctr->values[ctr->num_values]->data.string = talloc_strdup( ctr->ctx, data_p ); - break; - case REG_MULTI_SZ: - ctr->values[ctr->num_values]->data.string = talloc_memdup( ctr->ctx, data_p, size ); - break; - case REG_DWORD: - ctr->values[ctr->num_values]->data.dword = *(uint32*)data_p; - break; - case REG_BINARY: - ctr->values[ctr->num_values]->data.binary = talloc_memdup( ctr->ctx, data_p, size ); - break; - - } -#endif - ctr->num_values++; } diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index d8e0f18953c..145b8230c98 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -453,6 +453,11 @@ static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys ) int n_services = lp_numservices(); int snum; fstring sname; + int num_subkeys = 0; + char *keystr, *key2 = NULL; + char *base, *new_path; + NT_PRINTER_INFO_LEVEL *printer = NULL; + DEBUG(10,("print_subpath_printers: key=>[%s]\n", key ? key : "NULL" )); @@ -468,13 +473,178 @@ static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys ) regsubkey_ctr_addkey( subkeys, sname ); } + + num_subkeys = regsubkey_ctr_numkeys( subkeys ); + goto done; } - else - { - /* get information for a specific printer */ + + /* get information for a specific printer */ + + key2 = strdup( key ); + keystr = key2; + reg_split_path( keystr, &base, &new_path ); + + + if ( !new_path ) { + /* sanity check on the printer name */ + if ( !W_ERROR_IS_OK( get_a_printer(&printer, 2, base) ) ) + goto done; + + free_a_printer( &printer, 2 ); + + regsubkey_ctr_addkey( subkeys, "PrinterDriverData" ); } - return regsubkey_ctr_numkeys( subkeys ); + /* no other subkeys below here */ + +done: + SAFE_FREE( key2 ); + return num_subkeys; +} + +/********************************************************************** + handle enumeration of values below KEY_PRINTING\Printers + *********************************************************************/ + +static int print_subpath_values_printers( char *key, REGVAL_CTR *val ) +{ + int num_values = 0; + char *keystr, *key2 = NULL; + char *base, *new_path; + NT_PRINTER_INFO_LEVEL *printer = NULL; + NT_PRINTER_INFO_LEVEL_2 *info2; + DEVICEMODE *devmode; + prs_struct prs; + uint32 offset; + int snum; + int i; + fstring valuename; + uint8 *data; + uint32 type, data_len; + fstring printername; + + /* + * There are tw cases to deal with here + * (1) enumeration of printer_info_2 values + * (2) enumeration of the PrinterDriverData subney + */ + + if ( !key ) { + /* top level key has no values */ + goto done; + } + + key2 = strdup( key ); + keystr = key2; + reg_split_path( keystr, &base, &new_path ); + + fstrcpy( printername, base ); + + if ( !new_path ) + { + /* we are dealing with the printer itself */ + + if ( !W_ERROR_IS_OK( get_a_printer(&printer, 2, printername) ) ) + goto done; + + info2 = printer->info_2; + + + regval_ctr_addvalue( val, "Attributes", REG_DWORD, (char*)&info2->attributes, sizeof(info2->attributes) ); + regval_ctr_addvalue( val, "Priority", REG_DWORD, (char*)&info2->priority, sizeof(info2->attributes) ); + regval_ctr_addvalue( val, "ChangeID", REG_DWORD, (char*)&info2->changeid, sizeof(info2->changeid) ); + regval_ctr_addvalue( val, "Default Priority", REG_DWORD, (char*)&info2->default_priority, sizeof(info2->default_priority) ); + regval_ctr_addvalue( val, "Status", REG_DWORD, (char*)&info2->status, sizeof(info2->status) ); + regval_ctr_addvalue( val, "StartTime", REG_DWORD, (char*)&info2->starttime, sizeof(info2->starttime) ); + regval_ctr_addvalue( val, "UntilTime", REG_DWORD, (char*)&info2->untiltime, sizeof(info2->untiltime) ); + regval_ctr_addvalue( val, "cjobs", REG_DWORD, (char*)&info2->cjobs, sizeof(info2->cjobs) ); + regval_ctr_addvalue( val, "AveragePPM", REG_DWORD, (char*)&info2->averageppm, sizeof(info2->averageppm) ); + + regval_ctr_addvalue( val, "Name", REG_SZ, info2->printername, sizeof(info2->printername)+1 ); + regval_ctr_addvalue( val, "Location", REG_SZ, info2->location, sizeof(info2->location)+1 ); + regval_ctr_addvalue( val, "Comment", REG_SZ, info2->comment, sizeof(info2->comment)+1 ); + regval_ctr_addvalue( val, "Parameters", REG_SZ, info2->parameters, sizeof(info2->parameters)+1 ); + regval_ctr_addvalue( val, "Port", REG_SZ, info2->portname, sizeof(info2->portname)+1 ); + regval_ctr_addvalue( val, "Server", REG_SZ, info2->servername, sizeof(info2->servername)+1 ); + regval_ctr_addvalue( val, "Share", REG_SZ, info2->sharename, sizeof(info2->sharename)+1 ); + regval_ctr_addvalue( val, "Driver", REG_SZ, info2->drivername, sizeof(info2->drivername)+1 ); + regval_ctr_addvalue( val, "Separator File", REG_SZ, info2->sepfile, sizeof(info2->sepfile)+1 ); + regval_ctr_addvalue( val, "Print Processor", REG_SZ, info2->printprocessor, sizeof(info2->printprocessor)+1 ); + + + /* use a prs_struct for converting the devmode and security + descriptor to REG_BIARY */ + + prs_init( &prs, MAX_PDU_FRAG_LEN, regval_ctr_getctx(val), MARSHALL); + + /* stream the device mode */ + + snum = lp_servicenumber(info2->sharename); + if ( (devmode = construct_dev_mode( snum )) != NULL ) + { + if ( spoolss_io_devmode( "devmode", &prs, 0, devmode ) ) { + + offset = prs_offset( &prs ); + + regval_ctr_addvalue( val, "Default Devmode", REG_BINARY, prs_data_p(&prs), offset ); + } + + + } + + prs_mem_clear( &prs ); + prs_set_offset( &prs, 0 ); + + if ( info2->secdesc_buf && info2->secdesc_buf->len ) + { + if ( sec_io_desc("sec_desc", &info2->secdesc_buf->sec, &prs, 0 ) ) { + + offset = prs_offset( &prs ); + + regval_ctr_addvalue( val, "Security", REG_BINARY, prs_data_p(&prs), offset ); + } + } + + + prs_mem_free( &prs ); + free_a_printer( &printer, 2 ); + + num_values = regval_ctr_numvals( val ); + goto done; + + } + + + keystr = new_path; + reg_split_path( keystr, &base, &new_path ); + + /* here should be no more path components here */ + + if ( new_path || strcmp(base, "PrinterDriverData") ) + goto done; + + /* now enumerate the PrinterDriverData key */ + if ( !W_ERROR_IS_OK( get_a_printer(&printer, 2, printername) ) ) + goto done; + + info2 = printer->info_2; + + + /* iterate over all printer data and fill the regval container */ + + for ( i=0; get_specific_param_by_index(*printer, 2, i, valuename, &data, &type, &data_len); i++ ) + { + regval_ctr_addvalue( val, valuename, type, data, data_len ); + } + + free_a_printer( &printer, 2 ); + + num_values = regval_ctr_numvals( val ); + +done: + SAFE_FREE( key2 ); + + return num_values; } /********************************************************************** @@ -529,6 +699,8 @@ static int handle_printing_subpath( char *key, REGSUBKEY_CTR *subkeys, REGVAL_CT case KEY_INDEX_PRINTER: if ( subkeys ) print_subpath_printers( p, subkeys ); + if ( val ) + print_subpath_values_printers( p, val ); break; /* default case for top level key that has no handler */ diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index bc58655f711..46aebbe3a33 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3374,7 +3374,7 @@ static void free_dev_mode(DEVICEMODE *dev) Create a DEVMODE struct. Returns malloced memory. ****************************************************************************/ -static DEVICEMODE *construct_dev_mode(int snum) +DEVICEMODE *construct_dev_mode(int snum) { char adevice[32]; char aform[32]; diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b71d50e95af..196715d6b19 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE/ ) { gotstart = 1; } From f1ed55d9032200eae68fc88bfb464e653497f315 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Jul 2002 19:53:49 +0000 Subject: [PATCH 087/262] * fix return code so we don't let a client just open any key it wants (even nonexistent ones). This gets rid of the Scheduling Agent icon. * fix NT_STATUS return code for bad registry path (NT_STATUS_NO_SUCH_FILE) (This used to be commit 915ee5c0ec0467fea23be8f309bcaa085c6ed9dd) --- source3/registry/reg_db.c | 4 ++-- source3/rpc_server/srv_reg_nt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 773a4f7fb5b..74012263e5c 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -252,8 +252,8 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) buflen = dbuf.dsize; if ( !buf ) { - DEBUG(5,("regdb_fetch_reg_keys: Failed to fetch any subkeys for [%s]\n", key)); - return 0; + DEBUG(5,("regdb_fetch_reg_keys: tdb lookup failed to locate key [%s]\n", key)); + return -1; } len = tdb_unpack( buf, buflen, "d", &num_items); diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 3afb2a2c812..2154b5a38a3 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -127,7 +127,7 @@ static NTSTATUS open_registry_key(pipes_struct *p, POLICY_HND *hnd, REGISTRY_KEY /* don't really know what to return here */ - result = NT_STATUS_ACCESS_DENIED; + result = NT_STATUS_NO_SUCH_FILE; } else { /* From 45e71ce21bcebe67f8464ce7d8531f0ebaa4b457 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 25 Jul 2002 15:43:06 +0000 Subject: [PATCH 088/262] I had forgotten to commit this after running configure (This used to be commit e3c2ef0a04afe0a21432940fceae2db07da730d8) --- source3/include/config.h.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/include/config.h.in b/source3/include/config.h.in index e1332a21a71..3900ef187e7 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -617,6 +617,9 @@ /* Define if you have the getgrnam function. */ #undef HAVE_GETGRNAM +/* Define if you have the getgrouplist function. */ +#undef HAVE_GETGROUPLIST + /* Define if you have the getnetgrent function. */ #undef HAVE_GETNETGRENT From 0c8e0571b77d6bee1a0d78f5f100ce03e8f04697 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 26 Jul 2002 01:01:27 +0000 Subject: [PATCH 089/262] Print out a friendly message on error instead of a python exception when calling tdb.open() Override Python's SIGINT handler so we can quit from the command line by hitting Ctrl-C. (This used to be commit 2adcd0eb4362a20824d1f34b63c0f405a7803872) --- source3/python/gtdbtool | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source3/python/gtdbtool b/source3/python/gtdbtool index 65133667909..792cdeecc0b 100755 --- a/source3/python/gtdbtool +++ b/source3/python/gtdbtool @@ -244,7 +244,11 @@ if len(sys.argv) != 2: print "Usage: gdbtool " sys.exit(1) -t = tdb.open(sys.argv[1]) +try: + t = tdb.open(sys.argv[1]) +except tdb.error, t: + print "gtdbtool: error opening %s: %s" % (sys.argv[1], t) + sys.exit(1) # Create user interface @@ -269,4 +273,10 @@ w.register_display_value_fn("PRINTERS/", convert_to_hex) w.build_ui("gtdbtool: %s" % sys.argv[1]) +# Override Python's handling of ctrl-c so we can break out of the gui +# from the command line. + +import signal +signal.signal(signal.SIGINT, signal.SIG_DFL) + mainloop() From ef5bd4c066ed0e8ade64d5b308e53c54f0e8edaa Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Jul 2002 07:18:15 +0000 Subject: [PATCH 090/262] Clarify this comment. (This used to be commit d2b4e669aeada9c3498c3a9e49360270def5ad99) --- source3/passdb/passdb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 4e3d558e987..3f1425e240f 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -528,6 +528,9 @@ BOOL pdb_rid_is_user(uint32 rid) * such that it can be identified as either a user, group etc * type. there are 5 such categories, and they are documented. */ + /* However, they are not in the RID, just somthing you can query + seperatly. Sorry luke :-) */ + if(pdb_rid_is_well_known(rid)) { /* * The only well known user RIDs are DOMAIN_USER_RID_ADMIN From f9558e5819f80734910f5830145cc263628eb779 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Jul 2002 10:25:08 +0000 Subject: [PATCH 091/262] I think this makes the debug statement clearer. (but assumes that 'myip' is indeed our local IP...) Andrew Bartlett (This used to be commit bea31062a261a49b65800a15d47f8b011af632f6) --- source3/nmbd/nmbd_become_dmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/nmbd/nmbd_become_dmb.c b/source3/nmbd/nmbd_become_dmb.c index 7f4a7a21447..ccc1f7e8ada 100644 --- a/source3/nmbd/nmbd_become_dmb.c +++ b/source3/nmbd/nmbd_become_dmb.c @@ -347,7 +347,7 @@ static void become_domain_master_browser_wins(char *workgroup_name) we can become a domain master browser. */ - DEBUG(0,("become_domain_master_browser_wins: querying WINS server at IP %s \ + DEBUG(0,("become_domain_master_browser_wins: querying WINS server from IP %s \ for domain master browser name %s on workgroup %s\n", inet_ntoa(unicast_subnet->myip), nmb_namestr(&nmbname), workgroup_name)); From a56490007479b3f23f5159bfb7545136c40dd1fd Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Jul 2002 13:05:29 +0000 Subject: [PATCH 092/262] Mimir has been busy with patches again, and sent in the following patches: Andrew Bartlett From his e-mail: Below I attach the following patches as a result of my work on trusted domains support: 1) srv_samr_nt.c.diff This fixes a bug which caused to return null string as the first entry of enumerated accounts list (no matter what entry, it was always null string and rid) and possibly spoiled further names, depeding on their length. I found that while testing my 'net rpc trustdom list' against nt servers and samba server. 2) libsmb.diff Now, fallback to anonymous connection works correctly. 3) smbpasswd.c.diff Just a little fix which actually allows one to create a trusting domain account using smbpasswd 4) typos.diff As the name suggests, it's just a few typos fix :) (This used to be commit 888d595fab4f6b28318b743f47378cb7ca35d479) --- source3/libsmb/cliconnect.c | 5 ++--- source3/passdb/pdb_tdb.c | 2 +- source3/rpc_server/srv_samr_nt.c | 4 +--- source3/smbd/process.c | 2 +- source3/utils/smbpasswd.c | 6 ++++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index d304da7f518..d29a6115fb1 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1191,9 +1191,8 @@ again: if (!cli_session_setup(cli, user, password, strlen(password)+1, password, strlen(password)+1, domain)) { - if (!(flags & CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK) - || cli_session_setup(cli, "", "", 0, - "", 0, domain)) { + if ((flags & CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK) + && cli_session_setup(cli, "", "", 0, "", 0, domain)) { } else { nt_status = cli_nt_error(cli); DEBUG(1,("failed session setup with %s\n", nt_errstr(nt_status))); diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 0b3eaea900d..17b44026446 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -542,7 +542,7 @@ static BOOL tdbsam_getsampwent(struct pdb_methods *my_methods, SAM_ACCOUNT *user /* increment to next in line */ tdb_state->key = tdb_nextkey(tdb_state->passwd_tdb, tdb_state->key); - /* do we have an valid interation pointer? */ + /* do we have an valid iteration pointer? */ if(tdb_state->passwd_tdb == NULL) { DEBUG(0,("pdb_get_sampwent: Bad TDB Context pointer.\n")); return False; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index eb74acf35be..2a7a5518cdd 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -727,8 +727,6 @@ static NTSTATUS make_user_sam_entry_list(TALLOC_CTX *ctx, SAM_ENTRY **sam_pp, UN } for (i = 0; i < num_entries; i++) { - int len = uni_temp_name.uni_str_len; - pwd = disp_user_info[i+start_idx].sam; temp_name = pdb_get_username(pwd); init_unistr2(&uni_temp_name, temp_name, strlen(temp_name)+1); @@ -743,7 +741,7 @@ static NTSTATUS make_user_sam_entry_list(TALLOC_CTX *ctx, SAM_ENTRY **sam_pp, UN return NT_STATUS_UNSUCCESSFUL; } - init_sam_entry(&sam[i], len, user_rid); + init_sam_entry(&sam[i], uni_temp_name.uni_str_len, user_rid); copy_unistr2(&uni_name[i], &uni_temp_name); } diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 6e38f3736e5..55234ec896e 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -152,7 +152,7 @@ static void async_processing(char *buffer, int buffer_len) Returns False on timeout or error. Else returns True. -The timeout is in milli seconds +The timeout is in milliseconds ****************************************************************************/ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 70bf551edbf..98993676c98 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -92,7 +92,7 @@ static int process_options(int argc, char **argv, int local_flags) user_name[0] = '\0'; - while ((ch = getopt(argc, argv, "c:axdehmnjr:sw:R:D:U:L")) != EOF) { + while ((ch = getopt(argc, argv, "c:axdehminjr:sw:R:D:U:L")) != EOF) { switch(ch) { case 'L': local_flags |= LOCAL_AM_ROOT; @@ -416,9 +416,11 @@ static int process_root(int local_flags) exit(1); } } + + /* prepare uppercased and '$' terminated username */ slprintf(buf, sizeof(buf) - 1, "%s$", user_name); fstrcpy(user_name, buf); - + } else { if (remote_machine != NULL) { From a7261163be4fef530e60b0311f40125d6f0337fc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Jul 2002 15:24:12 +0000 Subject: [PATCH 093/262] (another patch from mimir) Add some debugging info to the secrets code. We might review what debug level that should be at, but it's fine for now. Andrew Bartlett (This used to be commit 2b6a318d686ac0b08a30844bf2960703b06d5c90) --- source3/passdb/secrets.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index a737a2d0492..f9676825740 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -388,7 +388,9 @@ BOOL secrets_store_ldap_pw(const char* dn, char* pw) /** - * The linked list is allocated on the supplied talloc context, caller gets to destory + * Get trusted domains info from secrets.tdb. + * + * The linked list is allocated on the supplied talloc context, caller gets to destroy * when done. * * @param ctx Allocation context @@ -409,10 +411,11 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num int start_idx; uint32 idx = 0; size_t size; + fstring dom_name; struct trusted_dom_pass *pass; NTSTATUS status; - secrets_init(); + if (!secrets_init()) return NT_STATUS_ACCESS_DENIED; *num_domains = 0; start_idx = *enum_ctx; @@ -455,6 +458,10 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num SAFE_FREE(pass); continue; } + + pull_ucs2_fstring(dom_name, pass->uni_name); + DEBUG(18, ("Fetched secret record num %d.\nDomain name: %s, SID: %s\n", + idx, dom_name, sid_string_static(&pass->domain_sid))); SAFE_FREE(secrets_key); @@ -475,6 +482,10 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num dom->name = talloc_strdup_w(ctx, pass->uni_name); (*domains)[idx - start_idx] = dom; + + DEBUG(18, ("Secret record is in required range.\n + start_idx = %d, max_num_domains = %d. Added to returned array.\n", + start_idx, max_num_domains)); *enum_ctx = idx + 1; (*num_domains)++; @@ -487,6 +498,10 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num /* this is the last entry in the whole enumeration */ status = NT_STATUS_OK; } + } else { + DEBUG(18, ("Secret is outside the required range.\n + start_idx = %d, max_num_domains = %d. Not added to returned array\n", + start_idx, max_num_domains)); } idx++; From dbedccc75a0b651c803cb3e4ced375e02377112c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 26 Jul 2002 21:49:56 +0000 Subject: [PATCH 094/262] fix parameters for ldap_set_rebind_proc() from OpenLDAP 2.1 (This used to be commit a6725d4ce95ca8807ccefe4ce033b45d0635da6d) --- source3/passdb/pdb_ldap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 4eed632038a..45e71b7a149 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -309,8 +309,13 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l DEBUG(10,("ldap_connect_system: Binding to ldap server as \"%s\"\n", ldap_dn)); - - ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc)); + +#if LDAP_SET_REBIND_PROC_ARGS == 3 + ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc), NULL); +#elif LDAP_SET_REBIND_PROC_ARGS == 2 + ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc)); +#endif + rc = ldap_simple_bind_s(ldap_struct, ldap_dn, ldap_secret); From a23e96316ebf5086a27365d4a9fb63b0e4533f6f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 26 Jul 2002 22:40:06 +0000 Subject: [PATCH 095/262] 3 things: * normalize all registry key strings before storing or looking up paths in the registry tdb * return the current buffer size for REG_INFO even when not returning actual data * fix a segfault report by metze on #samba-technical so that the user/group object picker works again (was the "ProductType" key lookup that was failing). (This used to be commit 5640e6cdb213502d95fff33e06eaeed5ce3aeb76) --- source3/registry/reg_db.c | 6 +++++- source3/rpc_parse/parse_reg.c | 8 +++++++- source3/rpc_server/srv_reg_nt.c | 15 ++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index 74012263e5c..b4c8f60ccf5 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -163,7 +163,8 @@ BOOL init_registry_db( void ) fstrings The full path to the registry key is used as database after the - \'s are converted to /'s. + \'s are converted to /'s. Key string is also normalized to UPPER + case. ***********************************************************************/ BOOL regdb_store_reg_keys( char *keyname, REGSUBKEY_CTR *ctr ) @@ -178,6 +179,8 @@ BOOL regdb_store_reg_keys( char *keyname, REGSUBKEY_CTR *ctr ) if ( !keyname ) return False; + strupper_m( keyname ); + /* allocate some initial memory */ buffer = malloc(sizeof(pstring)); @@ -245,6 +248,7 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) /* convert to key format */ pstring_sub( path, "\\", "/" ); + strupper_m( path ); dbuf = tdb_fetch_by_string( tdb_reg, path ); diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 83b55863eb1..925d8b856e8 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1118,7 +1118,8 @@ BOOL new_init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, REGISTRY_VALUE *val, NTSTATUS status) { uint32 buf_len = 0; - + BUFFER2 buf2; + if(r_r == NULL) return False; @@ -1136,6 +1137,11 @@ BOOL new_init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, buf_len = reg_init_buffer2( &r_r->uni_val, val ); } + else { + /* dummy buffer used so we can get the size */ + r_r->ptr_uni_val = 0; + buf_len = reg_init_buffer2( &buf2, val ); + } r_r->ptr_max_len = 1; r_r->buf_max_len = buf_len; diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 2154b5a38a3..7ebf940588c 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -29,6 +29,11 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV +#define REGSTR_PRODUCTTYPE "ProductType" +#define REG_PT_WINNT "WinNT" +#define REG_PT_LANMANNT "LanmanNT" +#define REG_PT_SERVERNT "ServerNT" + #define OUR_HANDLE(hnd) (((hnd)==NULL)?"NULL":(IVAL((hnd)->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER")), \ ((unsigned int)IVAL((hnd)->data5,4)),((unsigned int)sys_getpid()) @@ -367,7 +372,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) goto out; } - if ( strequal(name, "ProductType") ) { + if ( strequal(name, REGSTR_PRODUCTTYPE) ) { /* This makes the server look like a member server to clients */ /* which tells clients that we have our own local user and */ /* group databases and helps with ACL support. */ @@ -375,17 +380,17 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) switch (lp_server_role()) { case ROLE_DOMAIN_PDC: case ROLE_DOMAIN_BDC: - regval_ctr_addvalue( ®vals, "ProductType", REG_SZ, "LanmanNT", strlen("LanmanNT")+1 ); + regval_ctr_addvalue( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_LANMANNT, strlen(REG_PT_LANMANNT)+1 ); break; case ROLE_STANDALONE: - regval_ctr_addvalue( ®vals, "ProductType", REG_SZ, "ServerNT", strlen("ServerNT")+1 ); + regval_ctr_addvalue( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_SERVERNT, strlen(REG_PT_SERVERNT)+1 ); break; case ROLE_DOMAIN_MEMBER: - regval_ctr_addvalue( ®vals, "ProductType", REG_SZ, "WinNT", strlen("WinNT")+1 ); + regval_ctr_addvalue( ®vals, REGSTR_PRODUCTTYPE, REG_SZ, REG_PT_WINNT, strlen(REG_PT_WINNT)+1 ); break; } - val = regval_ctr_specific_value( ®vals, 0 ); + val = dup_registry_value( regval_ctr_specific_value( ®vals, 0 ) ); status = NT_STATUS_OK; From 2a03547b6142ab934840332cda37013982cbe723 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 27 Jul 2002 00:15:02 +0000 Subject: [PATCH 096/262] Rafal 'Mimir' Szczesniak has been busy again, and has added 'net rpc trustdom list' support. This lists the trusted and trusting domains of a remote PDC. I've applied these almost directly, just fixing some special case code for when there are *no* trusting domains. We still have some parse errors in this case however. Andrew Bartlett. From mimir's e-mail: Here are another patches adding trust relationship features. More details: Better error reporting in cli_lsa_enum_trust_dom(). Implementation of cli_samr_enum_dom_users() which cli_samr.c lacked. More "consts" -- one of arguments in net_find_dc(). Modified implementation of run_rpc_command() -- now it allows to reuse already opened connection (if it is passed) to remote server's IPC$ (e.g. as part of longer exchange of rpc calls). I'm sure Andrew will argue ;-) More neat version of rpc_trustdom_list() function. (This used to be commit f0890026820ee3e432147130b46de4610e583381) --- source3/libsmb/cli_lsarpc.c | 7 +- source3/libsmb/cli_samr.c | 112 ++++++++++- source3/utils/net.c | 2 +- source3/utils/net_rpc.c | 359 ++++++++++++++++++++++++++++++------ 4 files changed, 422 insertions(+), 58 deletions(-) diff --git a/source3/libsmb/cli_lsarpc.c b/source3/libsmb/cli_lsarpc.c index 7dfee46faef..542fad311c0 100644 --- a/source3/libsmb/cli_lsarpc.c +++ b/source3/libsmb/cli_lsarpc.c @@ -543,7 +543,7 @@ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 *enum_ctx, uint32 *pref_num_domains, uint32 *num_domains, - char ***domain_names, DOM_SID **domain_sids) + char ***domain_names, DOM_SID **domain_sids) { prs_struct qbuf, rbuf; LSA_Q_ENUM_TRUST_DOM q; @@ -598,7 +598,7 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, if (!*domain_names) { DEBUG(0, ("cli_lsa_enum_trust_dom(): out of memory\n")); - result = NT_STATUS_UNSUCCESSFUL; + result = NT_STATUS_NO_MEMORY; goto done; } @@ -606,7 +606,7 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, r.num_domains); if (!domain_sids) { DEBUG(0, ("cli_lsa_enum_trust_dom(): out of memory\n")); - result = NT_STATUS_UNSUCCESSFUL; + result = NT_STATUS_NO_MEMORY; goto done; } @@ -632,6 +632,7 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } + /** Enumerate privileges*/ NTSTATUS cli_lsa_enum_privilege(struct cli_state *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/libsmb/cli_samr.c b/source3/libsmb/cli_samr.c index 91577b33256..6581bdbeaf3 100644 --- a/source3/libsmb/cli_samr.c +++ b/source3/libsmb/cli_samr.c @@ -5,7 +5,8 @@ Copyright (C) Andrew Tridgell 1992-1997,2000, Copyright (C) Luke Kenneth Casson Leighton 1996-1997,2000, Copyright (C) Paul Ashton 1997,2000, - Copyright (C) Elrond 2000. + Copyright (C) Elrond 2000, + Copyright (C) Rafal Szczesniak 2002. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -491,6 +492,115 @@ NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/** + * Enumerate domain users + * + * @param cli client state structure + * @param mem_ctx talloc context + * @param pol opened domain policy handle + * @param start_idx starting index of enumeration, returns context for + next enumeration + * @param acb_mask account control bit mask (to enumerate some particular + * kind of accounts) + * @param size max acceptable size of response + * @param dom_users returned array of domain user names + * @param rids returned array of domain user RIDs + * @param num_dom_users numer returned entries + * + * @return NTSTATUS returned in rpc response + **/ +NTSTATUS cli_samr_enum_dom_users(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, uint16 acb_mask, + uint32 size, char ***dom_users, uint32 **rids, + uint32 *num_dom_users) +{ + prs_struct qdata; + prs_struct rdata; + SAMR_Q_ENUM_DOM_USERS q; + SAMR_R_ENUM_DOM_USERS r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + int i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + if (cli == NULL || pol == NULL) + return result; + + /* initialise parse structures */ + prs_init(&qdata, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rdata, 0, mem_ctx, UNMARSHALL); + + DEBUG(4, ("SAMR Enum Domain Users. start_idx: %d, acb: %d, size: %d\n", + *start_idx, acb_mask, size)); + + /* fill query structure with parameters */ + init_samr_q_enum_dom_users(&q, pol, *start_idx, acb_mask, 0, size); + + /* prepare query stream */ + if (!samr_io_q_enum_dom_users("", &q, &qdata, 0)) { + prs_mem_free(&qdata); + prs_mem_free(&rdata); + return result; + } + + /* send rpc call over the pipe */ + if (!rpc_api_pipe_req(cli, SAMR_ENUM_DOM_USERS, &qdata, &rdata)) { + prs_mem_free(&qdata); + prs_mem_free(&rdata); + return result; + } + + /* unpack received stream */ + if(!samr_io_r_enum_dom_users("", &r, &rdata, 0)) { + prs_mem_free(&qdata); + prs_mem_free(&rdata); + result = r.status; + return result; + } + + /* return the data obtained in response */ + if (!NT_STATUS_IS_OK(r.status) && + (NT_STATUS_EQUAL(r.status, STATUS_MORE_ENTRIES) || + NT_STATUS_EQUAL(r.status, NT_STATUS_NO_MORE_ENTRIES))) { + return r.status; + } + + *start_idx = r.next_idx; + *num_dom_users = r.num_entries2; + result = r.status; + + if (r.num_entries2) { + /* allocate memory needed to return received data */ + *rids = (uint32*)talloc(mem_ctx, sizeof(uint32) * r.num_entries2); + if (!*rids) { + DEBUG(0, ("Error in cli_samr_enum_dom_users(): out of memory\n")); + return NT_STATUS_NO_MEMORY; + } + + *dom_users = (char**)talloc(mem_ctx, sizeof(char*) * r.num_entries2); + if (!*dom_users) { + DEBUG(0, ("Error in cli_samr_enum_dom_users(): out of memory\n")); + return NT_STATUS_NO_MEMORY; + } + + /* fill output buffers with rpc response */ + for (i = 0; i < r.num_entries2; i++) { + fstring conv_buf; + + (*rids)[i] = r.sam[i].rid; + unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf) - 1); + (*dom_users)[i] = talloc_strdup(mem_ctx, conv_buf); + } + } + + prs_mem_free(&qdata); + prs_mem_free(&rdata); + + return result; +}; + + /* Enumerate domain groups */ NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/utils/net.c b/source3/utils/net.c index d34ac21f392..084edb62840 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -234,7 +234,7 @@ BOOL net_find_server(unsigned flags, struct in_addr *server_ip, char **server_na } -BOOL net_find_dc(struct in_addr *server_ip, fstring server_name, char *domain_name) +BOOL net_find_dc(struct in_addr *server_ip, fstring server_name, const char *domain_name) { struct in_addr *ip_list; int addr_count; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index dceb5ffd504..120916d7b43 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -117,18 +117,20 @@ static DOM_SID *net_get_remote_domain_sid(struct cli_state *cli) * @return A shell status integer (0 for success) */ -static int run_rpc_command(const char *pipe_name, int conn_flags, - rpc_command_fn fn, - int argc, const char **argv) +static int run_rpc_command(struct cli_state *cli_arg, const char *pipe_name, int conn_flags, + rpc_command_fn fn, + int argc, const char **argv) { - struct cli_state *cli = net_make_ipc_connection(conn_flags); + struct cli_state *cli = NULL; TALLOC_CTX *mem_ctx; NTSTATUS nt_status; DOM_SID *domain_sid; - if (!cli) { - return -1; - } + /* make use of cli_state handed over as an argument, if possible */ + if (!cli_arg) + cli = net_make_ipc_connection(conn_flags); + else + cli = cli_arg; domain_sid = net_get_remote_domain_sid(cli); @@ -141,7 +143,7 @@ static int run_rpc_command(const char *pipe_name, int conn_flags, } if (!cli_nt_session_open(cli, pipe_name)) { - DEBUG(0, ("Could not initialise samr pipe\n")); + DEBUG(0, ("Could not initialise %s pipe\n", pipe_name)); } nt_status = fn(domain_sid, cli, mem_ctx, argc, argv); @@ -156,6 +158,10 @@ static int run_rpc_command(const char *pipe_name, int conn_flags, if (cli->nt_pipe_fnum) cli_nt_session_close(cli); + /* close the connection only if it was opened here */ + if (!cli_arg) + cli_shutdown(cli); + talloc_destroy(mem_ctx); return (!NT_STATUS_IS_OK(nt_status)); @@ -199,7 +205,7 @@ static NTSTATUS rpc_changetrustpw_internals(const DOM_SID *domain_sid, struct cl static int rpc_changetrustpw(int argc, const char **argv) { - return run_rpc_command(PIPE_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_changetrustpw_internals, + return run_rpc_command(NULL, PIPE_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_changetrustpw_internals, argc, argv); } @@ -261,7 +267,7 @@ static NTSTATUS rpc_join_oldstyle_internals(const DOM_SID *domain_sid, struct cl static int net_rpc_join_oldstyle(int argc, const char **argv) { - return run_rpc_command(PIPE_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_join_oldstyle_internals, + return run_rpc_command(NULL, PIPE_NETLOGON, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_join_oldstyle_internals, argc, argv); } @@ -371,7 +377,7 @@ rpc_info_internals(const DOM_SID *domain_sid, struct cli_state *cli, **/ int net_rpc_info(int argc, const char **argv) { - return run_rpc_command(PIPE_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, + return run_rpc_command(NULL, PIPE_SAMR, NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC, rpc_info_internals, argc, argv); } @@ -477,7 +483,7 @@ static NTSTATUS rpc_user_add_internals(const DOM_SID *domain_sid, struct cli_sta static int rpc_user_add(int argc, const char **argv) { - return run_rpc_command(PIPE_SAMR, 0, rpc_user_add_internals, + return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_user_add_internals, argc, argv); } @@ -578,7 +584,7 @@ static NTSTATUS rpc_user_del_internals(const DOM_SID *domain_sid, static int rpc_user_delete(int argc, const char **argv) { - return run_rpc_command(PIPE_SAMR, 0, rpc_user_del_internals, + return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_user_del_internals, argc, argv); } @@ -680,7 +686,7 @@ rpc_user_info_internals(const DOM_SID *domain_sid, struct cli_state *cli, static int rpc_user_info(int argc, const char **argv) { - return run_rpc_command(PIPE_SAMR, 0, rpc_user_info_internals, + return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_user_info_internals, argc, argv); } @@ -775,7 +781,7 @@ int net_rpc_user(int argc, const char **argv) if (opt_long_list_entries) { } else { } - return run_rpc_command(PIPE_SAMR, 0, + return run_rpc_command(NULL,PIPE_SAMR, 0, rpc_user_list_internals, argc, argv); } @@ -926,7 +932,7 @@ int net_rpc_group(int argc, const char **argv) if (opt_long_list_entries) { } else { } - return run_rpc_command(PIPE_SAMR, 0, + return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_group_list_internals, argc, argv); } @@ -984,7 +990,7 @@ static int rpc_share_add(int argc, const char **argv) DEBUG(1,("Sharename or path not specified on add\n")); return rpc_share_usage(argc, argv); } - return run_rpc_command(PIPE_SRVSVC, 0, + return run_rpc_command(NULL, PIPE_SRVSVC, 0, rpc_share_add_internals, argc, argv); } @@ -1030,7 +1036,7 @@ static int rpc_share_delete(int argc, const char **argv) DEBUG(1,("Sharename not specified on delete\n")); return rpc_share_usage(argc, argv); } - return run_rpc_command(PIPE_SRVSVC, 0, + return run_rpc_command(NULL, PIPE_SRVSVC, 0, rpc_share_del_internals, argc, argv); } @@ -1120,7 +1126,7 @@ int net_rpc_share(int argc, const char **argv) }; if (argc == 0) - return run_rpc_command(PIPE_SRVSVC, 0, + return run_rpc_command(NULL, PIPE_SRVSVC, 0, rpc_share_list_internals, argc, argv); @@ -1174,7 +1180,7 @@ static int rpc_file_close(int argc, const char **argv) return(rpc_file_usage(argc, argv)); } - return run_rpc_command(PIPE_SRVSVC, 0, + return run_rpc_command(NULL, PIPE_SRVSVC, 0, rpc_file_close_internals, argc, argv); } @@ -1227,7 +1233,7 @@ rpc_file_list_internals(const DOM_SID *domain_sid, struct cli_state *cli, /* if argc > 0, must be user command */ if (argc > 0) - username = argv[0]; + username = smb_xstrdup(argv[0]); result = cli_srvsvc_net_file_enum( cli, mem_ctx, 3, username, &ctr, preferred_len, &hnd); @@ -1265,7 +1271,7 @@ static int rpc_file_user(int argc, const char **argv) return(rpc_file_usage(argc, argv)); } - return run_rpc_command(PIPE_SRVSVC, 0, + return run_rpc_command(NULL, PIPE_SRVSVC, 0, rpc_file_list_internals, argc, argv); } @@ -1290,7 +1296,7 @@ int net_rpc_file(int argc, const char **argv) }; if (argc == 0) - return run_rpc_command(PIPE_SRVSVC, 0, + return run_rpc_command(NULL, PIPE_SRVSVC, 0, rpc_file_list_internals, argc, argv); @@ -1345,7 +1351,7 @@ static NTSTATUS rpc_shutdown_abort_internals(const DOM_SID *domain_sid, struct c static int rpc_shutdown_abort(int argc, const char **argv) { - return run_rpc_command(PIPE_WINREG, 0, rpc_shutdown_abort_internals, + return run_rpc_command(NULL, PIPE_WINREG, 0, rpc_shutdown_abort_internals, argc, argv); } @@ -1435,7 +1441,7 @@ static NTSTATUS rpc_shutdown_internals(const DOM_SID *domain_sid, struct cli_sta static int rpc_shutdown(int argc, const char **argv) { - return run_rpc_command(PIPE_WINREG, 0, rpc_shutdown_internals, + return run_rpc_command(NULL, PIPE_WINREG, 0, rpc_shutdown_internals, argc, argv); } @@ -1460,7 +1466,7 @@ static int rpc_shutdown(int argc, const char **argv) */ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli_state *cli, TALLOC_CTX *mem_ctx, - int argc, const char **argv) { + int argc, const char **argv) { POLICY_HND connect_pol, domain_pol, user_pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; @@ -1483,16 +1489,14 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli strupper(acct_name); - /* Get sam policy handle */ - - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + /* Get samr policy handle */ + result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, &connect_pol); if (!NT_STATUS_IS_OK(result)) { goto done; } /* Get domain policy handle */ - result = cli_samr_open_domain(cli, mem_ctx, &connect_pol, MAXIMUM_ALLOWED_ACCESS, domain_sid, &domain_pol); @@ -1501,10 +1505,9 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli } /* Create trusting domain's account */ - acb_info = ACB_DOMTRUST; - unknown = 0xe005000b; /* No idea what this is - a permission mask? - Is it needed for interdomain account also ? */ + unknown = 0xe005000b; /* No idea what this is - a permission mask? + mimir: yes, most probably it is */ result = cli_samr_create_dom_user(cli, mem_ctx, &domain_pol, acct_name, acb_info, unknown, @@ -1529,7 +1532,7 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli static int rpc_trustdom_add(int argc, const char **argv) { - return run_rpc_command(PIPE_SAMR, 0, rpc_trustdom_add_internals, + return run_rpc_command(NULL, PIPE_SAMR, 0, rpc_trustdom_add_internals, argc, argv); } @@ -1562,9 +1565,10 @@ static int rpc_trustdom_del(int argc, const char **argv) extern char *opt_user_name; extern char *opt_password; +extern char *opt_workgroup; -static int rpc_trustdom_establish(int argc, const char **argv) { - +static int rpc_trustdom_establish(int argc, const char **argv) +{ struct cli_state *cli; struct in_addr server_ip; POLICY_HND connect_hnd; @@ -1582,14 +1586,22 @@ static int rpc_trustdom_establish(int argc, const char **argv) { */ if (argc != 1) { - d_printf("Usage: net rpc trustdom add \n"); + d_printf("Usage: net rpc trustdom establish \n"); return -1; } - domain_name = smb_xstrdup(argv[0]); strupper(domain_name); + /* + * opt_workgroup will be used by connection functions further, + * hence it should be set to remote domain name instead of ours + */ + if (opt_workgroup) { + SAFE_FREE(opt_workgroup); + opt_workgroup = smb_xstrdup(domain_name); + }; + asprintf(&acct_name, "%s$", lp_workgroup()); strupper(acct_name); @@ -1634,10 +1646,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) { /* * Call WksQueryInfo to check remote server's capabilities - * FIXME:Is really necessary ? nt serv does this, but from samba's - * point of view it doesn't seem to make the difference - * IDEA: It may be used to get info about type of pdc we're talking to - * (e.g. WinNT or Win2k) + * note: It is now used only to get unicode domain name */ if (!cli_nt_session_open(cli, PIPE_WKSSVC)) { @@ -1645,12 +1654,8 @@ static int rpc_trustdom_establish(int argc, const char **argv) { return -1; } - /* TODO: convert this call from rpc_client/cli_wkssvc.c - to cli_wks_query_info() in libsmb/cli_wkssvc.c - UPDATE: already done :) - */ - - if (!(mem_ctx = talloc_init())) { + if (!(mem_ctx = talloc_init_named("establishing trust relationship to domain %s", + domain_name))) { DEBUG(0, ("talloc_init() failed\n")); cli_shutdown(cli); return -1; @@ -1679,10 +1684,12 @@ static int rpc_trustdom_establish(int argc, const char **argv) { if (!cli_nt_session_open(cli, PIPE_LSARPC)) { DEBUG(0, ("Could not initialise lsa pipe\n")); + cli_shutdown(cli); + return -1; } nt_status = cli_lsa_open_policy2(cli, mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, - &connect_hnd); + &connect_hnd); if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("Couldn't open policy handle. Error was %s\n", nt_errstr(nt_status))); @@ -1692,7 +1699,8 @@ static int rpc_trustdom_establish(int argc, const char **argv) { /* Querying info level 5 */ nt_status = cli_lsa_query_info_policy(cli, mem_ctx, &connect_hnd, - 5 /* info level */, domain_name, &domain_sid); + 5 /* info level */, domain_name, + &domain_sid); if (NT_STATUS_IS_ERR(nt_status)) { DEBUG(0, ("LSA Query Info failed. Returned error was %s\n", nt_errstr(nt_status))); @@ -1743,8 +1751,8 @@ static int rpc_trustdom_establish(int argc, const char **argv) { * @return Integer status (0 means success) **/ -static int rpc_trustdom_revoke(int argc, const char **argv) { - +static int rpc_trustdom_revoke(int argc, const char **argv) +{ char* domain_name; if (argc < 1) return -1; @@ -1772,7 +1780,8 @@ static int rpc_trustdom_revoke(int argc, const char **argv) { * @return Integer status returned to shell **/ -static int rpc_trustdom_usage(int argc, const char **argv) { +static int rpc_trustdom_usage(int argc, const char **argv) +{ d_printf(" net rpc trustdom add \t\t add trusting domain's account\n"); d_printf(" net rpc trustdom del \t\t delete trusting domain's account\n"); d_printf(" net rpc trustdom establish \t establish relationship to trusted domain\n"); @@ -1782,6 +1791,249 @@ static int rpc_trustdom_usage(int argc, const char **argv) { } +static NTSTATUS rpc_query_domain_sid(const DOM_SID *domain_sid, struct cli_state *cli, TALLOC_CTX *mem_ctx, + int argc, const char **argv) +{ + fstring str_sid; + sid_to_string(str_sid, domain_sid); + d_printf("%s\n", str_sid); + return NT_STATUS_OK; +}; + + +extern char* opt_workgroup; +extern char* opt_target_worgroup; +extern char* opt_host; +extern char* opt_password; + +static int rpc_trustdom_list(int argc, const char **argv) +{ + /* common variables */ + TALLOC_CTX* mem_ctx; + struct cli_state *cli, *remote_cli; + NTSTATUS nt_status; + char *domain_name = NULL; + DOM_SID queried_dom_sid; + fstring ascii_sid, padding; + int ascii_dom_name_len; + POLICY_HND connect_hnd; + + /* trusted domains listing variables */ + int enum_ctx = 0, pref_num_domains = 5; + int num_domains, i, pad_len, col_len = 20; + DOM_SID *domain_sids; + char **trusted_dom_names; + fstring pdc_name; + + /* trusting domains listing variables */ + POLICY_HND domain_hnd; + char **trusting_dom_names; + uint32 *trusting_dom_rids; + + /* + * Listing trusted domains (stored in secrets.tdb, if local) + */ + + mem_ctx = talloc_init_named("trust relationships listing"); + + /* + * set domain and pdc name to local samba server (default) + * or to remote one given in command line + */ + strupper(opt_workgroup); + if (strcmp(opt_workgroup, lp_workgroup())) { + domain_name = opt_workgroup; + if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup); + opt_target_workgroup = opt_workgroup; + } else { + safe_strcpy(pdc_name, global_myname, FSTRING_LEN); + domain_name = talloc_strdup(mem_ctx, lp_workgroup()); + if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup); + opt_target_workgroup = domain_name; + }; + + /* open \PIPE\lsarpc and open policy handle */ + if (!(cli = net_make_ipc_connection(NET_FLAGS_PDC))) { + DEBUG(0, ("Couldn't connect to domain controller\n")); + return -1; + }; + + if (!cli_nt_session_open(cli, PIPE_LSARPC)) { + DEBUG(0, ("Could not initialise lsa pipe\n")); + return -1; + }; + + nt_status = cli_lsa_open_policy2(cli, mem_ctx, True, SEC_RIGHTS_QUERY_VALUE, + &connect_hnd); + if (NT_STATUS_IS_ERR(nt_status)) { + DEBUG(0, ("Couldn't open policy handle. Error was %s\n", + nt_errstr(nt_status))); + return -1; + }; + + /* query info level 5 to obtain sid of a domain being queried */ + nt_status = cli_lsa_query_info_policy(cli, mem_ctx, &connect_hnd, + 5 /* info level */, domain_name, &queried_dom_sid); + if (NT_STATUS_IS_ERR(nt_status)) { + DEBUG(0, ("LSA Query Info failed. Returned error was %s\n", + nt_errstr(nt_status))); + return -1; + } + + /* + * Keep calling LsaEnumTrustdom over opened pipe until + * the end of enumeration is reached + */ + + d_printf("Trusted domains list:\n\n"); + + do { + nt_status = cli_lsa_enum_trust_dom(cli, mem_ctx, &connect_hnd, &enum_ctx, + &pref_num_domains, &num_domains, + &trusted_dom_names, &domain_sids); + + if (NT_STATUS_IS_ERR(nt_status)) { + DEBUG(0, ("Couldn't enumerate trusted domains. Error was %s\n", + nt_errstr(nt_status))); + return -1; + }; + + for (i = 0; i < num_domains; i++) { + /* convert sid into ascii string */ + sid_to_string(ascii_sid, &(domain_sids[i])); + + /* calculate padding space for d_printf to look nicer */ + pad_len = col_len - strlen(trusted_dom_names[i]); + padding[pad_len] = 0; + do padding[--pad_len] = ' '; while (pad_len); + + d_printf("%s%s%s\n", trusted_dom_names[i], padding, ascii_sid); + }; + + } while (NT_STATUS_EQUAL(nt_status, STATUS_MORE_ENTRIES)); + + /* close this connection before doing next one */ + nt_status = cli_lsa_close(cli, mem_ctx, &connect_hnd); + if (NT_STATUS_IS_ERR(nt_status)) { + DEBUG(0, ("Couldn't properly close lsa policy handle. Error was %s\n", + nt_errstr(nt_status))); + return -1; + }; + + cli_nt_session_close(cli); + + /* + * Listing trusting domains (stored in passdb backend, if local) + */ + + d_printf("\nTrusting domains list:\n\n"); + + /* + * Open \PIPE\samr and get needed policy handles + */ + if (!cli_nt_session_open(cli, PIPE_SAMR)) { + DEBUG(0, ("Could not initialise samr pipe\n")); + return -1; + }; + + /* SamrConnect */ + nt_status = cli_samr_connect(cli, mem_ctx, SAMR_ACCESS_OPEN_DOMAIN, + &connect_hnd); + if (!NT_STATUS_IS_OK(nt_status)) { + DEBUG(0, ("Couldn't open SAMR policy handle. Error was %s\n", + nt_errstr(nt_status))); + return -1; + }; + + /* SamrOpenDomain - we have to open domain policy handle in order to be + able to enumerate accounts*/ + nt_status = cli_samr_open_domain(cli, mem_ctx, &connect_hnd, + DOMAIN_ACCESS_ENUM_ACCOUNTS, + &queried_dom_sid, &domain_hnd); + if (!NT_STATUS_IS_OK(nt_status)) { + DEBUG(0, ("Couldn't open domain object. Error was %s\n", + nt_errstr(nt_status))); + return -1; + }; + + /* + * perform actual enumeration + */ + + enum_ctx = 0; /* reset enumeration context from last enumeration */ + do { + + nt_status = cli_samr_enum_dom_users(cli, mem_ctx, &domain_hnd, + &enum_ctx, ACB_DOMTRUST, 0xffff, + &trusting_dom_names, &trusting_dom_rids, + &num_domains); + if (NT_STATUS_IS_ERR(nt_status)) { + DEBUG(0, ("Couldn't enumerate accounts. Error was: %s\n", + nt_errstr(nt_status))); + return -1; + }; + + for (i = 0; i < num_domains; i++) { + + /* + * get each single domain's sid (do we _really_ need this ?): + * 1) connect to domain's pdc + * 2) query the pdc for domain's sid + */ + + /* get rid of '$' tail */ + ascii_dom_name_len = strlen(trusting_dom_names[i]); + if (ascii_dom_name_len && ascii_dom_name_len < FSTRING_LEN) + trusting_dom_names[i][ascii_dom_name_len - 1] = '\0'; + + /* calculate padding space for d_printf to look nicer */ + pad_len = col_len - strlen(trusting_dom_names[i]); + padding[pad_len] = 0; + do padding[--pad_len] = ' '; while (pad_len); + + /* set opt_* variables to remote domain */ + strupper(trusting_dom_names[i]); + opt_workgroup = talloc_strdup(mem_ctx, trusting_dom_names[i]); + if (opt_target_workgroup) SAFE_FREE(opt_target_workgroup); + opt_target_workgroup = opt_workgroup; + + d_printf("%s%s", trusting_dom_names[i], padding); + + /* connect to remote domain controller */ + remote_cli = net_make_ipc_connection(NET_FLAGS_PDC | NET_FLAGS_ANONYMOUS); + if (remote_cli) { + /* query for domain's sid */ + if (run_rpc_command(remote_cli, PIPE_LSARPC, 0, rpc_query_domain_sid, argc, argv)) + d_printf("couldn't get domain's sid\n"); + + cli_shutdown(remote_cli); + + } else { + d_printf("domain controller is not responding\n"); + }; + }; + + } while (NT_STATUS_EQUAL(nt_status, STATUS_MORE_ENTRIES)); + + /* close opened samr and domain policy handles */ + nt_status = cli_samr_close(cli, mem_ctx, &domain_hnd); + if (!NT_STATUS_IS_OK(nt_status)) { + DEBUG(0, ("Couldn't properly close domain policy handle for domain %s\n", domain_name)); + }; + + nt_status = cli_samr_close(cli, mem_ctx, &connect_hnd); + if (!NT_STATUS_IS_OK(nt_status)) { + DEBUG(0, ("Couldn't properly close samr policy handle for domain %s\n", domain_name)); + }; + + /* close samr pipe and connection to IPC$ */ + cli_nt_session_close(cli); + cli_shutdown(cli); + + talloc_destroy(mem_ctx); + return 0; +} + /** * Entrypoint for 'net rpc trustdom' code * @@ -1799,6 +2051,7 @@ static int rpc_trustdom(int argc, const char **argv) {"establish", rpc_trustdom_establish}, {"revoke", rpc_trustdom_revoke}, {"help", rpc_trustdom_usage}, + {"list", rpc_trustdom_list}, {NULL, NULL} }; From 2ff0939301d738a3f8177ddb6e01781b638ce811 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 27 Jul 2002 01:37:33 +0000 Subject: [PATCH 097/262] as per user request added windbind start/stop/restart in swat almost working, seem it does not yet properly detect if windbind is running or not in all situations testing is welcome. (This used to be commit e0988e918667e3bc7b7cfb19ae81bf8c05fe582a) --- source3/configure | 1387 ++++++++++++++++++----------------- source3/configure.in | 1 + source3/include/config.h.in | 2 +- source3/web/diagnose.c | 17 + source3/web/startstop.c | 33 + source3/web/statuspage.c | 28 + 6 files changed, 774 insertions(+), 694 deletions(-) diff --git a/source3/configure b/source3/configure index a9f18b9ac6c..cf98d12a11c 100755 --- a/source3/configure +++ b/source3/configure @@ -1115,7 +1115,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2867,16 +2867,15 @@ else #line 2868 "configure" #include "confdefs.h" #include -#include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF -if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2896,7 +2895,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2900: checking size of long" >&5 +echo "configure:2899: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2904,19 +2903,18 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -#include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF -if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2936,7 +2934,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2940: checking size of short" >&5 +echo "configure:2938: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2944,19 +2942,18 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -#include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF -if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2977,12 +2974,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2981: checking for working const" >&5 +echo "configure:2978: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3052,21 +3049,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3056: checking for inline" >&5 +echo "configure:3053: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3092,14 +3089,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3096: checking whether byte ordering is bigendian" >&5 +echo "configure:3093: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3110,11 +3107,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3125,7 +3122,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3145,7 +3142,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3182,14 +3179,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3186: checking whether char is unsigned" >&5 +echo "configure:3183: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3246,12 +3243,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3250: checking return type of signal handlers" >&5 +echo "configure:3247: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3268,7 +3265,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3287,12 +3284,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3291: checking for uid_t in sys/types.h" >&5 +echo "configure:3288: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3321,12 +3318,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3325: checking for mode_t" >&5 +echo "configure:3322: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3354,12 +3351,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3358: checking for off_t" >&5 +echo "configure:3355: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3387,12 +3384,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3391: checking for size_t" >&5 +echo "configure:3388: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3420,12 +3417,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3424: checking for pid_t" >&5 +echo "configure:3421: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3453,12 +3450,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3457: checking for st_rdev in struct stat" >&5 +echo "configure:3454: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3466,7 +3463,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3487,12 +3484,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3491: checking for d_off in dirent" >&5 +echo "configure:3488: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3502,7 +3499,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3523,12 +3520,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3527: checking for ino_t" >&5 +echo "configure:3524: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3556,12 +3553,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3560: checking for loff_t" >&5 +echo "configure:3557: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3589,12 +3586,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3593: checking for offset_t" >&5 +echo "configure:3590: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3622,12 +3619,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3626: checking for ssize_t" >&5 +echo "configure:3623: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3655,12 +3652,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3659: checking for wchar_t" >&5 +echo "configure:3656: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3702,7 +3699,7 @@ if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3706: checking for $ac_word" >&5 +echo "configure:3703: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3751,12 +3748,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3755: checking for $ac_func" >&5 +echo "configure:3752: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3805,7 +3802,7 @@ done if test x"$ac_cv_func_dlopen" = x"no"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3809: checking for dlopen in -ldl" >&5 +echo "configure:3806: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3813,7 +3810,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3854,13 +3851,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3858: checking for immediate structures" >&5 +echo "configure:3855: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3878,7 +3875,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3901,13 +3898,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3905: checking for unix domain sockets" >&5 +echo "configure:3902: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3922,7 +3919,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3944,13 +3941,13 @@ fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3948: checking for socklen_t type" >&5 +echo "configure:3945: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3963,7 +3960,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3984,13 +3981,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3988: checking for sig_atomic_t type" >&5 +echo "configure:3985: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4003,7 +4000,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -4026,20 +4023,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4030: checking for errno declaration" >&5 +echo "configure:4027: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -4061,20 +4058,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4065: checking for setresuid declaration" >&5 +echo "configure:4062: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -4096,20 +4093,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4100: checking for setresgid declaration" >&5 +echo "configure:4097: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -4131,20 +4128,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4135: checking for asprintf declaration" >&5 +echo "configure:4132: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4166,20 +4163,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4170: checking for vasprintf declaration" >&5 +echo "configure:4167: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4201,20 +4198,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4205: checking for vsnprintf declaration" >&5 +echo "configure:4202: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4236,20 +4233,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4240: checking for snprintf declaration" >&5 +echo "configure:4237: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4273,7 +4270,7 @@ EOF # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4277: checking for real setresuid" >&5 +echo "configure:4274: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4282,12 +4279,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -4312,7 +4309,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4316: checking for real setresgid" >&5 +echo "configure:4313: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4321,13 +4318,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresgid=yes else @@ -4350,7 +4347,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4354: checking for 8-bit clean memcmp" >&5 +echo "configure:4351: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4358,7 +4355,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4391,12 +4388,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4395: checking for $ac_func" >&5 +echo "configure:4392: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4445,7 +4442,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4449: checking for crypt in -lcrypt" >&5 +echo "configure:4446: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4453,7 +4450,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4497,7 +4494,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4501: checking whether to use readline" >&5 +echo "configure:4498: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4509,17 +4506,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4513: checking for $ac_hdr" >&5 +echo "configure:4510: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4549,17 +4546,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4553: checking for $ac_hdr" >&5 +echo "configure:4550: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4590,17 +4587,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4594: checking for $ac_hdr" >&5 +echo "configure:4591: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4623,7 +4620,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4627: checking for tgetent in -l${termlib}" >&5 +echo "configure:4624: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4631,7 +4628,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4664,7 +4661,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4668: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4665: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4672,7 +4669,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4734,17 +4731,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4738: checking for $ac_hdr" >&5 +echo "configure:4735: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4774,17 +4771,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4778: checking for $ac_hdr" >&5 +echo "configure:4775: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4815,17 +4812,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4819: checking for $ac_hdr" >&5 +echo "configure:4816: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4848,7 +4845,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4852: checking for tgetent in -l${termlib}" >&5 +echo "configure:4849: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4856,7 +4853,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4889,7 +4886,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4893: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4890: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4897,7 +4894,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4958,7 +4955,7 @@ fi # code will generate warnings on one of them unless we have a few # special cases. echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:4962: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:4959: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4966,7 +4963,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5010,12 +5007,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5014: checking for $ac_func" >&5 +echo "configure:5011: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5066,7 +5063,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5070: checking for printf in -lnsl_s" >&5 +echo "configure:5067: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5074,7 +5071,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5116,7 +5113,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5120: checking for printf in -lnsl" >&5 +echo "configure:5117: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5124,7 +5121,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5166,7 +5163,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5170: checking for connect in -lsocket" >&5 +echo "configure:5167: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5174,7 +5171,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5216,7 +5213,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5220: checking for connect in -linet" >&5 +echo "configure:5217: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5224,7 +5221,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5279,12 +5276,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5283: checking for $ac_func" >&5 +echo "configure:5280: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5333,7 +5330,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5337: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5334: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5341,7 +5338,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5382,12 +5379,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5386: checking for $ac_func" >&5 +echo "configure:5383: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5443,12 +5440,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5447: checking for $ac_func" >&5 +echo "configure:5444: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5498,12 +5495,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5502: checking for $ac_func" >&5 +echo "configure:5499: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5553,12 +5550,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5557: checking for $ac_func" >&5 +echo "configure:5554: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5608,12 +5605,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5612: checking for $ac_func" >&5 +echo "configure:5609: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5663,12 +5660,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5667: checking for $ac_func" >&5 +echo "configure:5664: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5718,12 +5715,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5722: checking for $ac_func" >&5 +echo "configure:5719: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5773,12 +5770,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5777: checking for $ac_func" >&5 +echo "configure:5774: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5828,12 +5825,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5832: checking for $ac_func" >&5 +echo "configure:5829: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5883,12 +5880,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5887: checking for $ac_func" >&5 +echo "configure:5884: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5938,12 +5935,12 @@ done for ac_func in syslog vsyslog getgrouplist do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5942: checking for $ac_func" >&5 +echo "configure:5939: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5994,12 +5991,12 @@ done for ac_func in setbuffer do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5998: checking for $ac_func" >&5 +echo "configure:5995: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6051,12 +6048,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6055: checking for $ac_func" >&5 +echo "configure:6052: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6107,12 +6104,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6111: checking for $ac_func" >&5 +echo "configure:6108: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6162,12 +6159,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6166: checking for $ac_func" >&5 +echo "configure:6163: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6217,12 +6214,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6221: checking for $ac_func" >&5 +echo "configure:6218: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6272,12 +6269,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6276: checking for $ac_func" >&5 +echo "configure:6273: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6327,12 +6324,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6331: checking for $ac_func" >&5 +echo "configure:6328: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6382,12 +6379,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6386: checking for $ac_func" >&5 +echo "configure:6383: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6437,12 +6434,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6441: checking for $ac_func" >&5 +echo "configure:6438: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6492,12 +6489,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6496: checking for $ac_func" >&5 +echo "configure:6493: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6547,12 +6544,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6551: checking for $ac_func" >&5 +echo "configure:6548: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6602,12 +6599,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6606: checking for $ac_func" >&5 +echo "configure:6603: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6657,12 +6654,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6661: checking for $ac_func" >&5 +echo "configure:6658: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6712,12 +6709,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6716: checking for $ac_func" >&5 +echo "configure:6713: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6767,12 +6764,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6771: checking for $ac_func" >&5 +echo "configure:6768: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6822,12 +6819,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6826: checking for $ac_func" >&5 +echo "configure:6823: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6881,9 +6878,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6885: checking for stat64 in " >&5 +echo "configure:6882: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6914,9 +6911,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6918: checking for lstat64 in " >&5 +echo "configure:6915: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6947,9 +6944,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6951: checking for fstat64 in " >&5 +echo "configure:6948: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6981,7 +6978,7 @@ fi ##################################### # we might need the resolv library on some systems echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:6985: checking for dn_expand in -lresolv" >&5 +echo "configure:6982: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6989,7 +6986,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7038,12 +7035,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7042: checking for $ac_func" >&5 +echo "configure:7039: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7091,7 +7088,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7095: checking for putprpwnam in -lsecurity" >&5 +echo "configure:7092: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7099,7 +7096,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7140,12 +7137,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7144: checking for $ac_func" >&5 +echo "configure:7141: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7199,12 +7196,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7203: checking for $ac_func" >&5 +echo "configure:7200: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7252,7 +7249,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7256: checking for putprpwnam in -lsec" >&5 +echo "configure:7253: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7260,7 +7257,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7301,12 +7298,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7305: checking for $ac_func" >&5 +echo "configure:7302: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7361,12 +7358,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7365: checking for $ac_func" >&5 +echo "configure:7362: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7414,7 +7411,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7418: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7415: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7422,7 +7419,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7463,12 +7460,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7467: checking for $ac_func" >&5 +echo "configure:7464: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7522,12 +7519,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7526: checking for $ac_func" >&5 +echo "configure:7523: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7575,7 +7572,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7579: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7576: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7583,7 +7580,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7624,12 +7621,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7628: checking for $ac_func" >&5 +echo "configure:7625: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7685,12 +7682,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7689: checking for $ac_func" >&5 +echo "configure:7686: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7738,7 +7735,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7742: checking for getspnam in -lgen" >&5 +echo "configure:7739: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7746,7 +7743,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7787,12 +7784,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7791: checking for $ac_func" >&5 +echo "configure:7788: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7847,12 +7844,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7851: checking for $ac_func" >&5 +echo "configure:7848: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7900,7 +7897,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7904: checking for getspnam in -lsecurity" >&5 +echo "configure:7901: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7908,7 +7905,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7949,12 +7946,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7953: checking for $ac_func" >&5 +echo "configure:7950: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8008,12 +8005,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8012: checking for $ac_func" >&5 +echo "configure:8009: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8061,7 +8058,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8065: checking for getspnam in -lsec" >&5 +echo "configure:8062: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8069,7 +8066,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8110,12 +8107,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8114: checking for $ac_func" >&5 +echo "configure:8111: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8170,12 +8167,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8174: checking for $ac_func" >&5 +echo "configure:8171: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8223,7 +8220,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8227: checking for bigcrypt in -lsecurity" >&5 +echo "configure:8224: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8231,7 +8228,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8272,12 +8269,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8276: checking for $ac_func" >&5 +echo "configure:8273: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8331,12 +8328,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8335: checking for $ac_func" >&5 +echo "configure:8332: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8384,7 +8381,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8388: checking for bigcrypt in -lsec" >&5 +echo "configure:8385: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8392,7 +8389,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8433,12 +8430,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8437: checking for $ac_func" >&5 +echo "configure:8434: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8493,12 +8490,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8497: checking for $ac_func" >&5 +echo "configure:8494: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8546,7 +8543,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8550: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8547: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8554,7 +8551,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8595,12 +8592,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8599: checking for $ac_func" >&5 +echo "configure:8596: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8654,12 +8651,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8658: checking for $ac_func" >&5 +echo "configure:8655: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8707,7 +8704,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8711: checking for getprpwnam in -lsec" >&5 +echo "configure:8708: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8715,7 +8712,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8756,12 +8753,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8760: checking for $ac_func" >&5 +echo "configure:8757: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8828,7 +8825,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8832: checking ability to build shared libraries" >&5 +echo "configure:8829: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8988,7 +8985,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8992: checking for $ac_word" >&5 +echo "configure:8989: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9045,17 +9042,17 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9049: checking linker flags for shared libraries" >&5 +echo "configure:9046: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9052: checking compiler flags for position-independent code" >&5 +echo "configure:9049: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9059: checking whether building shared libraries actually works" >&5 +echo "configure:9056: checking whether building shared libraries actually works" >&5 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9086,7 +9083,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9090: checking for long long" >&5 +echo "configure:9087: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9095,12 +9092,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -9127,20 +9124,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9131: checking for LL suffix on long long integers" >&5 +echo "configure:9128: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -9162,7 +9159,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9166: checking for 64 bit off_t" >&5 +echo "configure:9163: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9171,13 +9168,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -9200,7 +9197,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9204: checking for off64_t" >&5 +echo "configure:9201: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9209,7 +9206,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -9242,7 +9239,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9246: checking for 64 bit ino_t" >&5 +echo "configure:9243: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9251,13 +9248,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -9280,7 +9277,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9284: checking for ino64_t" >&5 +echo "configure:9281: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9289,7 +9286,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -9322,7 +9319,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9326: checking for dev64_t" >&5 +echo "configure:9323: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9331,7 +9328,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9364,13 +9361,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9368: checking for struct dirent64" >&5 +echo "configure:9365: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9403,7 +9400,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9407: checking for major macro" >&5 +echo "configure:9404: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9412,7 +9409,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9444,7 +9441,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9448: checking for minor macro" >&5 +echo "configure:9445: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9453,7 +9450,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9485,7 +9482,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9489: checking for unsigned char" >&5 +echo "configure:9486: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9494,12 +9491,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -9522,13 +9519,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9526: checking for sin_len in sock" >&5 +echo "configure:9523: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9537,7 +9534,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9558,13 +9555,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9562: checking whether seekdir returns void" >&5 +echo "configure:9559: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9573,7 +9570,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9594,20 +9591,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9598: checking for __FILE__ macro" >&5 +echo "configure:9595: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9628,20 +9625,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9632: checking for __FUNCTION__ macro" >&5 +echo "configure:9629: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9662,7 +9659,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9666: checking if gettimeofday takes tz argument" >&5 +echo "configure:9663: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9671,14 +9668,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -9701,13 +9698,13 @@ EOF fi echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9705: checking for __va_copy" >&5 +echo "configure:9702: checking for __va_copy" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < va_list ap1,ap2; @@ -9715,7 +9712,7 @@ int main() { __va_copy(ap1,ap2); ; return 0; } EOF -if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_VA_COPY=yes else @@ -9736,7 +9733,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9740: checking for C99 vsnprintf" >&5 +echo "configure:9737: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9745,7 +9742,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9772,7 +9769,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9795,7 +9792,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9799: checking for broken readdir" >&5 +echo "configure:9796: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9804,7 +9801,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9812,7 +9809,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -9835,13 +9832,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9839: checking for utimbuf" >&5 +echo "configure:9836: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9849,7 +9846,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9873,12 +9870,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9877: checking for $ac_func" >&5 +echo "configure:9874: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9927,13 +9924,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9931: checking for ut_name in utmp" >&5 +echo "configure:9928: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9941,7 +9938,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9962,13 +9959,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9966: checking for ut_user in utmp" >&5 +echo "configure:9963: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9976,7 +9973,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9997,13 +9994,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:10001: checking for ut_id in utmp" >&5 +echo "configure:9998: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10011,7 +10008,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -10032,13 +10029,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10036: checking for ut_host in utmp" >&5 +echo "configure:10033: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10046,7 +10043,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -10067,13 +10064,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10071: checking for ut_time in utmp" >&5 +echo "configure:10068: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10081,7 +10078,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -10102,13 +10099,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10106: checking for ut_tv in utmp" >&5 +echo "configure:10103: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10116,7 +10113,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -10137,13 +10134,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10141: checking for ut_type in utmp" >&5 +echo "configure:10138: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10151,7 +10148,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:10155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -10172,13 +10169,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10176: checking for ut_pid in utmp" >&5 +echo "configure:10173: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10186,7 +10183,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:10190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -10207,13 +10204,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10211: checking for ut_exit in utmp" >&5 +echo "configure:10208: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10221,7 +10218,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:10225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -10242,13 +10239,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10246: checking for ut_addr in utmp" >&5 +echo "configure:10243: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10256,7 +10253,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:10260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -10278,13 +10275,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10282: checking whether pututline returns pointer" >&5 +echo "configure:10279: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10292,7 +10289,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:10296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -10314,13 +10311,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10318: checking for ut_syslen in utmpx" >&5 +echo "configure:10315: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10328,7 +10325,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10352,7 +10349,7 @@ fi ################################################# # check for libiconv support echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10356: checking whether to use libiconv" >&5 +echo "configure:10353: checking whether to use libiconv" >&5 # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" @@ -10365,7 +10362,7 @@ if test "${with_libiconv+set}" = set; then CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10369: checking for iconv_open in -liconv" >&5 +echo "configure:10366: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10373,7 +10370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10427,7 +10424,7 @@ fi ############ # check for iconv in libc echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10431: checking for working iconv" >&5 +echo "configure:10428: checking for working iconv" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10436,7 +10433,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else cat > conftest.$ac_ext < @@ -10447,7 +10444,7 @@ main() { } EOF -if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NATIVE_ICONV=yes else @@ -10471,7 +10468,7 @@ fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10475: checking for Linux kernel oplocks" >&5 +echo "configure:10472: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10480,7 +10477,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10494,7 +10491,7 @@ main() { } EOF -if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10517,7 +10514,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10521: checking for kernel change notify support" >&5 +echo "configure:10518: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10526,7 +10523,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10540,7 +10537,7 @@ main() { } EOF -if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10563,7 +10560,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10567: checking for kernel share modes" >&5 +echo "configure:10564: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10572,7 +10569,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10588,7 +10585,7 @@ main() { } EOF -if { (eval echo configure:10592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10614,13 +10611,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10618: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10615: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10628,7 +10625,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:10632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10649,7 +10646,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10653: checking for irix specific capabilities" >&5 +echo "configure:10650: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10658,7 +10655,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10673,7 +10670,7 @@ main() { } EOF -if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10701,13 +10698,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10705: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10702: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10717,7 +10714,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10738,13 +10735,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10742: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10739: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10754,7 +10751,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10775,13 +10772,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10779: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10776: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10791,7 +10788,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10812,13 +10809,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10816: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10813: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10828,7 +10825,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10850,13 +10847,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10854: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10851: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10870,7 +10867,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10891,16 +10888,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10895: checking for test routines" >&5 +echo "configure:10892: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -10914,7 +10911,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10918: checking for ftruncate extend" >&5 +echo "configure:10915: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10923,11 +10920,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -10950,7 +10947,7 @@ EOF fi echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:10954: checking for AF_LOCAL socket support" >&5 +echo "configure:10951: checking for AF_LOCAL socket support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10959,11 +10956,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_WORKING_AF_LOCAL=yes else @@ -10987,7 +10984,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10991: checking for broken getgroups" >&5 +echo "configure:10988: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10996,11 +10993,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -11023,7 +11020,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11027: checking whether getpass should be replaced" >&5 +echo "configure:11024: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11031,7 +11028,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -11067,7 +11064,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11071: checking for broken inet_ntoa" >&5 +echo "configure:11068: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11076,7 +11073,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -11090,7 +11087,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -11113,7 +11110,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11117: checking for secure mkstemp" >&5 +echo "configure:11114: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11122,7 +11119,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -11139,7 +11136,7 @@ main() { exit(0); } EOF -if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -11162,7 +11159,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11166: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:11163: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11171,12 +11168,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -11199,7 +11196,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11203: checking for root" >&5 +echo "configure:11200: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11208,11 +11205,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -11240,7 +11237,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11244: checking for iface AIX" >&5 +echo "configure:11241: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11249,7 +11246,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -11281,7 +11278,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11285: checking for iface ifconf" >&5 +echo "configure:11282: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11290,7 +11287,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -11323,7 +11320,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11327: checking for iface ifreq" >&5 +echo "configure:11324: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11332,7 +11329,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -11369,7 +11366,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11373: checking for setresuid" >&5 +echo "configure:11370: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11378,7 +11375,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -11412,7 +11409,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11416: checking for setreuid" >&5 +echo "configure:11413: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11421,7 +11418,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -11454,7 +11451,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11458: checking for seteuid" >&5 +echo "configure:11455: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11463,7 +11460,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -11496,7 +11493,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11500: checking for setuidx" >&5 +echo "configure:11497: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11505,7 +11502,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -11538,7 +11535,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11542: checking for working mmap" >&5 +echo "configure:11539: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11547,11 +11544,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11574,7 +11571,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11578: checking for ftruncate needs root" >&5 +echo "configure:11575: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11583,11 +11580,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11610,7 +11607,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11614: checking for fcntl locking" >&5 +echo "configure:11611: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11619,11 +11616,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -11646,7 +11643,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11650: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11647: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11655,11 +11652,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11684,7 +11681,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11688: checking for 64 bit fcntl locking" >&5 +echo "configure:11685: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11693,7 +11690,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -11742,13 +11739,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11746: checking for st_blocks in struct stat" >&5 +echo "configure:11743: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11757,7 +11754,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11780,13 +11777,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11784: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11781: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11823,13 +11820,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11827: checking for broken nisplus include files" >&5 +echo "configure:11824: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11839,7 +11836,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11863,7 +11860,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11867: checking whether to use smbwrapper" >&5 +echo "configure:11864: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -11910,7 +11907,7 @@ fi ################################################# # check for AFS clear-text auth support echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11914: checking whether to use AFS clear-text auth" >&5 +echo "configure:11911: checking whether to use AFS clear-text auth" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -11936,7 +11933,7 @@ fi ################################################# # check for the DFS clear-text auth system echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11940: checking whether to use DFS clear-text auth" >&5 +echo "configure:11937: checking whether to use DFS clear-text auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11962,7 +11959,7 @@ fi ################################################# # see if this box has the RedHat location for kerberos echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:11966: checking for /usr/kerberos" >&5 +echo "configure:11963: checking for /usr/kerberos" >&5 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" @@ -11975,7 +11972,7 @@ fi ################################################# # check for location of Kerberos 5 install echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:11979: checking for kerberos 5 install path" >&5 +echo "configure:11976: checking for kerberos 5 install path" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -12004,17 +12001,17 @@ for ac_hdr in krb5.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12008: checking for $ac_hdr" >&5 +echo "configure:12005: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12047,17 +12044,17 @@ for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12051: checking for $ac_hdr" >&5 +echo "configure:12048: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12087,7 +12084,7 @@ done ################################################################## # we might need the k5crypto and com_err libraries on some systems echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12091: checking for _et_list in -lcom_err" >&5 +echo "configure:12088: checking for _et_list in -lcom_err" >&5 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12095,7 +12092,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12127,7 +12124,7 @@ else fi echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12131: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo "configure:12128: checking for krb5_encrypt_data in -lk5crypto" >&5 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12135,7 +12132,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12171,7 +12168,7 @@ fi # now see if we can find the krb5 libs in standard paths # or as specified above echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12175: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo "configure:12172: checking for krb5_mk_req_extended in -lkrb5" >&5 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12179,7 +12176,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12218,7 +12215,7 @@ fi ######################################################## # now see if we can find the gssapi libs in standard paths echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12222: checking for gss_display_status in -lgssapi_krb5" >&5 +echo "configure:12219: checking for gss_display_status in -lgssapi_krb5" >&5 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12226,7 +12223,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi_krb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12266,7 +12263,7 @@ fi # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12270: checking for ber_scanf in -llber" >&5 +echo "configure:12267: checking for ber_scanf in -llber" >&5 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12274,7 +12271,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12310,7 +12307,7 @@ fi # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12314: checking for ldap_domain2hostlist in -lldap" >&5 +echo "configure:12311: checking for ldap_domain2hostlist in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12318,7 +12315,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lldap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12360,12 +12357,12 @@ fi for ac_func in ldap_set_rebind_proc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12364: checking for $ac_func" >&5 +echo "configure:12361: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12413,13 +12410,13 @@ fi done echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12417: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo "configure:12414: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12428,7 +12425,7 @@ int main() { ldap_set_rebind_proc(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pam_ldap_cv_ldap_set_rebind_proc=3 else @@ -12450,7 +12447,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:12454: checking whether to use AUTOMOUNT" >&5 +echo "configure:12451: checking whether to use AUTOMOUNT" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -12475,7 +12472,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:12479: checking whether to use SMBMOUNT" >&5 +echo "configure:12476: checking whether to use SMBMOUNT" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -12512,7 +12509,7 @@ fi # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:12516: checking whether to use PAM" >&5 +echo "configure:12513: checking whether to use PAM" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -12538,7 +12535,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:12542: checking for pam_get_data in -lpam" >&5 +echo "configure:12539: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12546,7 +12543,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12584,7 +12581,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:12588: checking whether to use pam_smbpass" >&5 +echo "configure:12585: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -12622,12 +12619,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12626: checking for $ac_func" >&5 +echo "configure:12623: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12676,7 +12673,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12680: checking for crypt in -lcrypt" >&5 +echo "configure:12677: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12684,7 +12681,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12730,7 +12727,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:12734: checking for a crypt that needs truncated salt" >&5 +echo "configure:12731: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12739,11 +12736,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -12777,7 +12774,7 @@ fi ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:12781: checking whether to use TDB SAM database" >&5 +echo "configure:12778: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -12802,7 +12799,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:12806: checking whether to use NISPLUS SAM database" >&5 +echo "configure:12803: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -12833,7 +12830,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:12837: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12834: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -12858,7 +12855,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12862: checking whether to use syslog logging" >&5 +echo "configure:12859: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -12883,7 +12880,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12887: checking whether to use profiling" >&5 +echo "configure:12884: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12911,7 +12908,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12915: checking whether to support disk-quotas" >&5 +echo "configure:12912: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -12922,13 +12919,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12926: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12923: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12940,7 +12937,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12989,7 +12986,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12993: checking whether to support utmp accounting" >&5 +echo "configure:12990: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -13014,7 +13011,7 @@ fi ################################################# # choose native language(s) of man pages echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13018: checking chosen man pages' language(s)" >&5 +echo "configure:13015: checking chosen man pages' language(s)" >&5 # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" @@ -13045,7 +13042,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13049: checking whether to build the libsmbclient shared library" >&5 +echo "configure:13046: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -13073,14 +13070,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13077: checking how to get filesystem space usage" >&5 +echo "configure:13074: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13084: checking statvfs64 function (SVR4)" >&5 +echo "configure:13081: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13088,7 +13085,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -13135,12 +13132,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:13139: checking statvfs function (SVR4)" >&5 +echo "configure:13136: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13148,7 +13145,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -13173,7 +13170,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:13177: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:13174: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13181,7 +13178,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -13194,7 +13191,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -13221,7 +13218,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:13225: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:13222: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13229,7 +13226,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -13275,7 +13272,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:13279: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:13276: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13283,7 +13280,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -13293,7 +13290,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -13320,7 +13317,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:13324: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:13321: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13328,7 +13325,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13344,7 +13341,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -13371,7 +13368,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:13375: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:13372: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13379,7 +13376,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13399,7 +13396,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -13432,9 +13429,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:13436: checking if large file support can be enabled" >&5 +echo "configure:13433: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -13512,7 +13509,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:13516: checking whether to support ACLs" >&5 +echo "configure:13513: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -13565,7 +13562,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13569: checking for acl_get_file in -lacl" >&5 +echo "configure:13566: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13573,7 +13570,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13612,13 +13609,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:13616: checking for ACL support" >&5 +echo "configure:13613: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13626,7 +13623,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -13646,13 +13643,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:13650: checking for acl_get_perm_np" >&5 +echo "configure:13647: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13660,7 +13657,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -13707,7 +13704,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:13711: checking whether to build winbind" >&5 +echo "configure:13708: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13766,6 +13763,10 @@ WINBIND_PAM_PROGS="" if test x"$HAVE_WINBIND" = x"yes"; then echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_WINBIND 1 +EOF + WINBIND_TARGETS="bin/wbinfo" WINBIND_STARGETS="bin/winbindd" @@ -13799,20 +13800,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:13803: checking whether struct passwd has pw_comment" >&5 +echo "configure:13804: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:13816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -13837,20 +13838,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:13841: checking whether struct passwd has pw_age" >&5 +echo "configure:13842: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:13854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -13889,7 +13890,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13893: checking for poptGetContext in -lpopt" >&5 +echo "configure:13894: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13897,7 +13898,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13932,7 +13933,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13936: checking whether to use included popt" >&5 +echo "configure:13937: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""$srcdir/popt" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13955,16 +13956,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13959: checking configure summary" >&5 +echo "configure:13960: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else diff --git a/source3/configure.in b/source3/configure.in index 4397d5846c5..e73047de6c1 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2695,6 +2695,7 @@ WINBIND_PAM_PROGS="" if test x"$HAVE_WINBIND" = x"yes"; then AC_MSG_RESULT(yes) + AC_DEFINE(WITH_WINBIND) WINBIND_TARGETS="bin/wbinfo" WINBIND_STARGETS="bin/winbindd" diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 3900ef187e7..4a138b6db6a 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */ +/* include/config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on AIX 3. System headers sometimes define this. diff --git a/source3/web/diagnose.c b/source3/web/diagnose.c index e822474aab4..396499bcb9e 100644 --- a/source3/web/diagnose.c +++ b/source3/web/diagnose.c @@ -21,6 +21,23 @@ #include "includes.h" #include "../web/swat_proto.h" +#ifdef WITH_WINBIND + +NSS_STATUS winbindd_request(int req_type, + struct winbindd_request *request, + struct winbindd_response *response); + +/* check to see if winbind is running by pinging it */ + +BOOL winbindd_running(void) +{ + + if (winbindd_request(WINBINDD_PING, NULL, NULL)) + return False; + + return True; +} +#endif /* check to see if nmbd is running on localhost by looking for a __SAMBA__ response */ diff --git a/source3/web/startstop.c b/source3/web/startstop.c index 893784dd55e..e10dff41180 100644 --- a/source3/web/startstop.c +++ b/source3/web/startstop.c @@ -67,6 +67,27 @@ void start_nmbd(void) exit(0); } +/** Startup winbindd from web interface. */ +void start_winbindd(void) +{ + pstring binfile; + + if (geteuid() != 0) return; + + if (fork()) { + sleep(SLEEP_TIME); + return; + } + + slprintf(binfile, sizeof(pstring) - 1, "%s/winbindd", dyn_SBINDIR); + + become_daemon(); + + execl(binfile, binfile, NULL); + + exit(0); +} + /* stop smbd */ void stop_smbd(void) @@ -91,7 +112,19 @@ void stop_nmbd(void) kill(pid, SIGTERM); } +#ifdef WITH_WINBIND +/* stop winbindd */ +void stop_winbindd(void) +{ + pid_t pid = pidfile_pid("winbindd"); + if (geteuid() != 0) return; + + if (pid <= 0) return; + + kill(pid, SIGTERM); +} +#endif /* kill a specified process */ void kill_pid(pid_t pid) { diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index 792e077a616..3b597d44c04 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -248,6 +248,20 @@ void status_page(void) stop_nmbd(); } +#ifdef WITH_WINBIND + if (cgi_variable("winbindd_restart")) { + stop_winbindd(); + start_winbindd(); + } + + if (cgi_variable("winbindd_start")) { + start_winbindd(); + } + + if (cgi_variable("winbindd_stop")) { + stop_winbindd(); + } +#endif if (cgi_variable("autorefresh")) { autorefresh = 1; } else if (cgi_variable("norefresh")) { @@ -320,6 +334,20 @@ void status_page(void) } d_printf("\n"); +#ifdef WITH_WINBIND + fflush(stdout); + d_printf("%s%s\n", _("winbindd:"), winbindd_running()?_("running"):_("not running")); + if (geteuid() == 0) { + if (winbindd_running()) { + d_printf("\n", _("Stop winbindd")); + } else { + d_printf("\n", _("Start winbindd")); + } + d_printf("\n", _("Restart winbindd")); + } + d_printf("\n"); +#endif + d_printf("\n"); fflush(stdout); From 31b4cfd8208a0efd63891eb24827babb88d04ba0 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 27 Jul 2002 02:33:49 +0000 Subject: [PATCH 098/262] nice day today add also hide unwriteable as per user request (This used to be commit e6b38a881b67af5365f84e52f9cd6dcfec82bf2f) --- source3/param/loadparm.c | 4 +++ source3/smbd/dir.c | 69 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a5f01c6abf7..6f976cda645 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -339,6 +339,7 @@ typedef struct BOOL bCaseMangle; BOOL bHideDotFiles; BOOL bHideUnReadable; + BOOL bHideUnWriteable; BOOL bBrowseable; BOOL bAvailable; BOOL bRead_only; @@ -457,6 +458,7 @@ static service sDefault = { False, /* case mangle */ True, /* bHideDotFiles */ False, /* bHideUnReadable */ + False, /* bHideUnable */ True, /* bBrowseable */ True, /* bAvailable */ True, /* bRead_only */ @@ -875,6 +877,7 @@ static struct parm_struct parm_table[] = { {"mangling char", P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"hide unreadable", P_BOOL, P_LOCAL, &sDefault.bHideUnReadable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"hide unwriteable", P_BOOL, P_LOCAL, &sDefault.bHideUnWriteable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"delete veto files", P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"veto files", P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, {"hide files", P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, @@ -1661,6 +1664,7 @@ FN_LOCAL_BOOL(lp_shortpreservecase, bShortCasePreserve) FN_LOCAL_BOOL(lp_casemangle, bCaseMangle) FN_LOCAL_BOOL(lp_hide_dot_files, bHideDotFiles) FN_LOCAL_BOOL(lp_hideunreadable, bHideUnReadable) +FN_LOCAL_BOOL(lp_hideunwriteable, bHideUnWriteable) FN_LOCAL_BOOL(lp_browseable, bBrowseable) FN_LOCAL_BOOL(lp_readonly, bRead_only) FN_LOCAL_BOOL(lp_no_set_dir, bNo_set_dir) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 7dd425ef8a5..01e3063b672 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -721,6 +721,62 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) &access_granted, &status); } +/******************************************************************* +check to see if a user can write a file. This is only approximate, +it is used as part of the "hide unwriteable" option. Don't +use it for anything security sensitive +********************************************************************/ + +static BOOL user_can_write_file(connection_struct *conn, char *name) +{ + extern struct current_user current_user; + SMB_STRUCT_STAT ste; + SEC_DESC *psd = NULL; + size_t sd_size; + files_struct *fsp; + int smb_action; + int access_mode; + NTSTATUS status; + uint32 access_granted; + + ZERO_STRUCT(ste); + + /* + * If user is a member of the Admin group + * we never hide files from them. + */ + + if (conn->admin_user) + return True; + + /* If we can't stat it does not show it */ + if (vfs_stat(conn, name, &ste) != 0) + return False; + + /* Pseudo-open the file (note - no fd's created). */ + + if(S_ISDIR(ste.st_mode)) + fsp = open_directory(conn, name, &ste, 0, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), + unix_mode(conn, aDIR, name), &smb_action); + else + fsp = open_file_shared1(conn, name, &ste, FILE_WRITE_ATTRIBUTES, SET_DENY_MODE(DENY_NONE), + (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action); + + if (!fsp) + return False; + + /* Get NT ACL -allocated in main loop talloc context. No free needed here. */ + sd_size = conn->vfs_ops.fget_nt_acl(fsp, fsp->fd, &psd); + close_file(fsp, False); + + /* No access if SD get failed. */ + if (!sd_size) + return False; + + return se_access_check(psd, current_user.nt_user_token, FILE_WRITE_DATA, + &access_granted, &status); +} + /******************************************************************* Open a directory. ********************************************************************/ @@ -781,6 +837,19 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) continue; } + /* Honour _hide unwriteable_ option */ + if (normal_entry && conn && lp_hideunwriteable(SNUM(conn))) { + char *entry; + int ret=0; + + if (asprintf(&entry, "%s/%s/%s", conn->origpath, name, n) > 0) { + ret = user_can_write_file(conn, entry); + SAFE_FREE(entry); + } + if (!ret) + continue; + } + if (used + l > dirp->mallocsize) { int s = MAX(used+l,used+2000); char *r; From e0c57e6ab550b208283aec13fc2728537d7ab57e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 27 Jul 2002 02:54:39 +0000 Subject: [PATCH 099/262] This should fix a nastly little bug where if a user had already done one session setup, it would not correctly pick up the [homes] share on a subsequent session setup. The new rules are: If you want to connect to [homes], then it must have been available at session setup time, or you must be in security=share. At each session setup, the user's copy of [homes] is updated to ensure it has the right path etc. Andrew Bartlett (This used to be commit 5d2c7816a3ea02a67c5b501626d91d43557e9dd9) --- source3/smbd/password.c | 7 ++++--- source3/smbd/service.c | 16 ++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 9c67edd2551..391de02dea8 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -274,7 +274,7 @@ int register_vuid(auth_serversupplied_info *server_info, char *smb_name) /* Create an NT_USER_TOKEN struct for this user. */ vuser->nt_user_token = create_nt_token(vuser->uid, vuser->gid, vuser->n_groups, vuser->groups, vuser->guest, server_info->ptok); - DEBUG(3,("uid %d registered to name %s\n",(int)vuser->uid,vuser->user.unix_name)); + DEBUG(3,("UNIX uid %d is UNIX user %s, and will be vuid %u\n",(int)vuser->uid,vuser->user.unix_name, vuser->vuid)); next_vuid++; num_validated_vuids++; @@ -288,8 +288,9 @@ int register_vuid(auth_serversupplied_info *server_info, char *smb_name) } /* Register a home dir service for this user */ - if ((!vuser->guest) && vuser->unix_homedir && *(vuser->unix_homedir) - && (lp_servicenumber(vuser->user.unix_name) < 0)) { + if ((!vuser->guest) && vuser->unix_homedir && *(vuser->unix_homedir)) { + DEBUG(3, ("Adding/updating homes service for user '%s' using home direcotry: '%s'\n", + vuser->user.unix_name, vuser->unix_homedir)); vuser->homes_snum = add_home_service(vuser->user.unix_name, vuser->user.unix_name, vuser->unix_homedir); } else { vuser->homes_snum = -1; diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 7dd61f23257..aac90f2fdcf 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -523,7 +523,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, pstrcpy(s,lp_pathname(snum)); standard_sub_conn(conn,s,sizeof(s)); string_set(&conn->connectpath,s); - DEBUG(3,("Connect path is %s\n",s)); + DEBUG(3,("Connect path is '%s' for service [%s]\n",s, lp_servicename(snum))); } /* groups stuff added by ih */ @@ -761,6 +761,7 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password, vuser = get_valid_user_struct(vuid); if (!vuser) { DEBUG(1,("make_connection: refusing to connect with no session setup\n")); + *status = NT_STATUS_ACCESS_DENIED; return NULL; } } @@ -775,12 +776,15 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password, if (strequal(service_in,HOMES_NAME)) { if(lp_security() != SEC_SHARE) { DATA_BLOB no_pw = data_blob(NULL, 0); - if (vuser->homes_snum != -1) { - DEBUG(5, ("making a connection to [homes] service created at session setup time\n")); - return make_connection_snum(vuser->homes_snum, - vuser, no_pw, - dev, status); + if (vuser->homes_snum == -1) { + DEBUG(2, ("[homes] share not available for this user becouse it was not found or created at session setup time\n")); + *status = NT_STATUS_BAD_NETWORK_NAME; + return NULL; } + DEBUG(5, ("making a connection to [homes] service created at session setup time\n")); + return make_connection_snum(vuser->homes_snum, + vuser, no_pw, + dev, status); } else { /* Security = share. Try with current_user_info.smb_name * as the username. */ From 8e04b2d4bb04c238840046513aac44e454cf1c81 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 27 Jul 2002 06:07:53 +0000 Subject: [PATCH 100/262] Update the rebind code in pdb_ldap. I've still not tested this, but I didn't test the last lot and I'm pretty sure I stuffed it up - but at least this rebind procedure matches the function prototype. It should also be fine on OpenLDAP 2.1 if I'm lucky. Andrew Bartlett (This used to be commit 064f269508d05cc833cf7bfd5613e4fe389f32dc) --- source3/passdb/pdb_ldap.c | 158 ++++++++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 39 deletions(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 45e71b7a149..581aa48b997 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -70,8 +70,14 @@ struct ldapsam_privates { uint32 low_nua_rid; uint32 high_nua_rid; + + char *bind_dn; + char *bind_secret; }; + +static struct ldapsam_privates *static_ldap_state; + static uint32 ldapsam_get_next_available_nua_rid(struct ldapsam_privates *ldap_state); /******************************************************************* @@ -157,7 +163,7 @@ static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP * DEBUG(0, ("ldap_open_connection: cannot access LDAP when not root..\n")); return False; } - + #if defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000) DEBUG(10, ("ldapsam_open_connection: %s\n", ldap_state->uri)); @@ -251,6 +257,67 @@ static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP * } +/******************************************************************* + a rebind function for authenticated referrals + This version takes a void* that we can shove useful stuff in :-) +******************************************************************/ + +static int rebindproc_with_state (LDAP * ld, char **whop, char **credp, + int *methodp, int freeit, void *arg) +{ + struct ldapsam_privates *ldap_state = arg; + + /** @TODO Should we be doing something to check what servers we rebind to? + Could we get a referral to a machine that we don't want to give our + username and password to? */ + + if (freeit) { + SAFE_FREE(*whop); + memset(*credp, '\0', strlen(*credp)); + SAFE_FREE(*credp); + } else { + DEBUG(5,("ldap_connect_system: Rebinding as \"%s\"\n", + ldap_state->bind_dn)); + + *whop = strdup(ldap_state->bind_dn); + if (!*whop) { + return LDAP_NO_MEMORY; + } + *credp = strdup(ldap_state->bind_secret); + if (!*credp) { + SAFE_FREE(*whop); + return LDAP_NO_MEMORY; + } + *methodp = LDAP_AUTH_SIMPLE; + } + return 0; +} + +/******************************************************************* + a rebind function for authenticated referrals + This version takes a void* that we can shove useful stuff in :-) + and actually does the connection. +******************************************************************/ + +static int rebindproc_connect_with_state (LDAP *ldap_struct, + LDAP_CONST char *url, + ber_tag_t request, + ber_int_t msgid, void *arg) +{ + struct ldapsam_privates *ldap_state = arg; + int rc; + DEBUG(5,("ldap_connect_system: Rebinding as \"%s\"\n", + ldap_state->bind_dn)); + + /** @TODO Should we be doing something to check what servers we rebind to? + Could we get a referral to a machine that we don't want to give our + username and password to? */ + + rc = ldap_simple_bind_s(ldap_struct, ldap_state->bind_dn, ldap_state->bind_secret); + + return rc; +} + /******************************************************************* Add a rebind function for authenticated referrals ******************************************************************/ @@ -258,36 +325,24 @@ static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP * static int rebindproc (LDAP *ldap_struct, char **whop, char **credp, int *method, int freeit ) { - int rc; - char *ldap_dn; - char *ldap_secret; + return rebindproc_with_state(ldap_struct, whop, credp, + method, freeit, static_ldap_state); - /** @TODO Should we be doing something to check what servers we rebind to? - Could we get a referral to a machine that we don't want to give our - username and password to? */ - - if (freeit != 0) - { - - if (!fetch_ldapsam_pw(&ldap_dn, &ldap_secret)) - { - DEBUG(0, ("ldap_connect_system: Failed to retrieve password from secrets.tdb\n")); - return LDAP_OPERATIONS_ERROR; /* No idea what to return */ - } - - DEBUG(5,("ldap_connect_system: Rebinding as \"%s\"\n", - ldap_dn)); - - rc = ldap_simple_bind_s(ldap_struct, ldap_dn, ldap_secret); - - SAFE_FREE(ldap_dn); - SAFE_FREE(ldap_secret); - - return rc; - } - return 0; } +/******************************************************************* + a rebind function for authenticated referrals + this also does the connection, but no void*. +******************************************************************/ + +static int rebindproc_connect (LDAP * ld, LDAP_CONST char *url, int request, + ber_int_t msgid) +{ + return rebindproc_connect_with_state(ld, url, (ber_tag_t)request, msgid, + static_ldap_state); +} + + /******************************************************************* connect to the ldap server under system privilege. ******************************************************************/ @@ -297,6 +352,10 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l char *ldap_dn; char *ldap_secret; + /* The rebind proc needs this *HACK*. We are not multithreaded, so + this will work, but it's not nice. */ + static_ldap_state = ldap_state; + /* get the password */ if (!fetch_ldapsam_pw(&ldap_dn, &ldap_secret)) { @@ -304,24 +363,32 @@ static BOOL ldapsam_connect_system(struct ldapsam_privates *ldap_state, LDAP * l return False; } + ldap_state->bind_dn = ldap_dn; + ldap_state->bind_secret = ldap_secret; + /* removed the sasl_bind_s "EXTERNAL" stuff, as my testsuite (OpenLDAP) doesnt' seem to support it */ DEBUG(10,("ldap_connect_system: Binding to ldap server as \"%s\"\n", ldap_dn)); -#if LDAP_SET_REBIND_PROC_ARGS == 3 - ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc), NULL); -#elif LDAP_SET_REBIND_PROC_ARGS == 2 - ldap_set_rebind_proc(ldap_struct, (LDAP_REBIND_PROC *)(&rebindproc)); +#if defined(LDAP_API_FEATURE_X_OPENLDAP) && (LDAP_API_VERSION > 2000) +# if LDAP_SET_REBIND_PROC_ARGS == 2 + ldap_set_rebind_proc(ldap_struct, &rebindproc_connect); +# endif +# if LDAP_SET_REBIND_PROC_ARGS == 3 + ldap_set_rebind_proc(ldap_struct, &rebindproc_connect_with_state, (void *)ldap_state); +# endif +#else +# if LDAP_SET_REBIND_PROC_ARGS == 2 + ldap_set_rebind_proc(ldap_struct, &rebindproc); +# endif +# if LDAP_SET_REBIND_PROC_ARGS == 3 + ldap_set_rebind_proc(ldap_struct, &rebindproc_with_state, (void *)ldap_state); +# endif #endif - - rc = ldap_simple_bind_s(ldap_struct, ldap_dn, ldap_secret); - SAFE_FREE(ldap_dn); - SAFE_FREE(ldap_secret); - if (rc != LDAP_SUCCESS) { DEBUG(0, ("Bind failed: %s\n", ldap_err2string(rc))); @@ -761,18 +828,20 @@ static BOOL init_sam_from_ldap (struct ldapsam_privates *ldap_state, /* leave as default */ } else { pdb_gethexpwd(temp, smblmpwd); - memset((char *)temp, '\0', sizeof(temp)); + memset((char *)temp, '\0', strlen(temp)+1); if (!pdb_set_lanman_passwd(sampass, smblmpwd)) return False; + ZERO_STRUCT(smblmpwd); } if (!get_single_attribute (ldap_struct, entry, "ntPassword", temp)) { /* leave as default */ } else { pdb_gethexpwd(temp, smbntpwd); - memset((char *)temp, '\0', sizeof(temp)); + memset((char *)temp, '\0', strlen(temp)+1); if (!pdb_set_nt_passwd(sampass, smbntpwd)) return False; + ZERO_STRUCT(smbntpwd); } if (!get_single_attribute (ldap_struct, entry, "acctFlags", temp)) { @@ -1158,6 +1227,10 @@ static BOOL ldapsam_getsampwent(struct pdb_methods *my_methods, SAM_ACCOUNT * us struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data; BOOL ret = False; + /* The rebind proc needs this *HACK*. We are not multithreaded, so + this will work, but it's not nice. */ + static_ldap_state = ldap_state; + while (!ret) { if (!ldap_state->entry) return False; @@ -1535,6 +1608,13 @@ static void free_private_data(void **vp) ldap_unbind((*ldap_state)->ldap_struct); } + if ((*ldap_state)->bind_secret) { + memset((*ldap_state)->bind_secret, '\0', strlen((*ldap_state)->bind_secret)); + } + + SAFE_FREE((*ldap_state)->bind_dn); + SAFE_FREE((*ldap_state)->bind_secret); + *ldap_state = NULL; /* No need to free any further, as it is talloc()ed */ From 7ce66f79ea84d77f186bbf6e7831dc71cc6ec46a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 27 Jul 2002 11:48:55 +0000 Subject: [PATCH 101/262] A very long time ago (actually 6 months ago) I promised to commit this code to the Samba tree. Originally written by Nigel Williams" , I've been trying to keep it in some form of shape for the last 6 months. In particular I think some of the code got committed a few months ago, and others have made changes to the CVS version over time. anyway, its finally in - and doesn't appear to have broken anything. Now to try the client-side patches :-) Andrew Bartlett (This used to be commit f9bac7c5c2c4ddf0bf39d596a7b922fbb17c6b16) --- source3/include/rpc_srvsvc.h | 116 ++++- source3/rpc_parse/parse_srv.c | 700 ++++++++++++++++++++++++++--- source3/rpc_server/srv_srvsvc.c | 31 ++ source3/rpc_server/srv_srvsvc_nt.c | 396 ++++++++++++---- 4 files changed, 1078 insertions(+), 165 deletions(-) diff --git a/source3/include/rpc_srvsvc.h b/source3/include/rpc_srvsvc.h index 1753c19783b..94d23bb4bc4 100644 --- a/source3/include/rpc_srvsvc.h +++ b/source3/include/rpc_srvsvc.h @@ -4,6 +4,7 @@ Copyright (C) Andrew Tridgell 1992-1997 Copyright (C) Luke Kenneth Casson Leighton 1996-1997 Copyright (C) Paul Ashton 1997 + Copyright (C) Nigel Williams 2001 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,6 +34,7 @@ #define SRV_NET_SHARE_GET_INFO 0x10 #define SRV_NET_SHARE_SET_INFO 0x11 #define SRV_NET_SHARE_DEL 0x12 +#define SRV_NET_SHARE_DEL_STICKY 0x13 #define SRV_NET_SRV_GET_INFO 0x15 #define SRV_NET_SRV_SET_INFO 0x16 #define SRV_NET_DISK_ENUM 0x17 @@ -54,7 +56,7 @@ typedef struct disk_enum_container { uint32 entries_read; uint32 unknown; uint32 disk_info_ptr; - DISK_INFO disk_info[MAX_SERVER_DISK_ENTRIES]; + DISK_INFO *disk_info; } DISK_ENUM_CONTAINER; typedef struct net_srv_disk_enum { @@ -294,6 +296,29 @@ typedef struct r_net_conn_enum_info } SRV_R_NET_CONN_ENUM; +/* SH_INFO_0 */ +typedef struct ptr_share_info0 +{ + uint32 ptr_netname; /* pointer to net name. */ +} SH_INFO_0; + +/* SH_INFO_0_STR (level 0 share info strings) */ +typedef struct str_share_info0 +{ + SH_INFO_0 *ptrs; + + UNISTR2 uni_netname; /* unicode string of net name */ + +} SH_INFO_0_STR; + +/* SRV_SHARE_INFO_0 */ +typedef struct share_info_0_info +{ + SH_INFO_0 info_0; + SH_INFO_0_STR info_0_str; + +} SRV_SHARE_INFO_0; + /* SH_INFO_1 (pointers to level 1 share info strings) */ typedef struct ptr_share_info1 { @@ -306,6 +331,8 @@ typedef struct ptr_share_info1 /* SH_INFO_1_STR (level 1 share info strings) */ typedef struct str_share_info1 { + SH_INFO_1 *ptrs; + UNISTR2 uni_netname; /* unicode string of net name */ UNISTR2 uni_remark; /* unicode string of comment */ @@ -336,6 +363,8 @@ typedef struct ptr_share_info2 /* SH_INFO_2_STR (level 2 share info strings) */ typedef struct str_share_info2 { + SH_INFO_2 *ptrs; + UNISTR2 uni_netname; /* unicode string of net name (e.g NETLOGON) */ UNISTR2 uni_remark; /* unicode string of comment (e.g "Logon server share") */ UNISTR2 uni_path; /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */ @@ -383,6 +412,8 @@ typedef struct ptr_share_info502 uint32 num_uses; /* current uses */ uint32 ptr_path; /* pointer to path name */ uint32 ptr_passwd; /* pointer to password */ + uint32 reserved; /* this holds the space taken by the sd in the rpc packet */ + uint32 reserved_offset; /* required for _post operation when marshalling */ uint32 sd_size; /* size of security descriptor */ uint32 ptr_sd; /* pointer to security descriptor */ @@ -398,6 +429,7 @@ typedef struct str_share_info502 UNISTR2 uni_path; /* unicode string of local path (e.g c:\winnt\system32\repl\import\scripts) */ UNISTR2 uni_passwd; /* unicode string of password - presumably for share level security (e.g NULL) */ + uint32 reserved; uint32 sd_size; SEC_DESC *sd; @@ -411,12 +443,57 @@ typedef struct share_info_502_info } SRV_SHARE_INFO_502; -/* SRV_SHARE_INFO_1005 */ +typedef struct ptr_share_info1004 +{ + uint32 ptr_remark; + +} SH_INFO_1004; + +typedef struct str_share_info1004 +{ + SH_INFO_1004 *ptrs; + + UNISTR2 uni_remark; + +} SH_INFO_1004_STR; + +typedef struct ptr_info_1004_info +{ + SH_INFO_1004 info_1004; + SH_INFO_1004_STR info_1004_str; +} SRV_SHARE_INFO_1004; + typedef struct share_info_1005_info { uint32 dfs_root_flag; } SRV_SHARE_INFO_1005; +typedef struct share_info_1006_info +{ + uint32 max_uses; +} SRV_SHARE_INFO_1006; + +typedef struct ptr_share_info1007 +{ + uint32 flags; + uint32 ptr_AlternateDirectoryName; + +} SH_INFO_1007; + +typedef struct str_share_info1007 +{ + SH_INFO_1007 *ptrs; + + UNISTR2 uni_AlternateDirectoryName; + +} SH_INFO_1007_STR; + +typedef struct ptr_info_1007_info +{ + SH_INFO_1007 info_1007; + SH_INFO_1007_STR info_1007_str; +} SRV_SHARE_INFO_1007; + /* SRV_SHARE_INFO_1501 */ typedef struct share_info_1501_info { @@ -435,10 +512,16 @@ typedef struct srv_share_info_ctr_info uint32 num_entries2; union { - SRV_SHARE_INFO_1 *info1; /* share info level 1 */ - SRV_SHARE_INFO_2 *info2; /* share info level 2 */ - SRV_SHARE_INFO_501 *info501; /* share info level 501 */ - SRV_SHARE_INFO_502 *info502; /* share info level 502 */ + SRV_SHARE_INFO_0 *info0; + SRV_SHARE_INFO_1 *info1; /* share info level 1 */ + SRV_SHARE_INFO_2 *info2; /* share info level 2 */ + SRV_SHARE_INFO_501 *info501; /* share info level 501 */ + SRV_SHARE_INFO_502 *info502; /* share info level 502 */ + SRV_SHARE_INFO_1004 *info1004; + SRV_SHARE_INFO_1005 *info1005; + SRV_SHARE_INFO_1006 *info1006; + SRV_SHARE_INFO_1007 *info1007; + SRV_SHARE_INFO_1501 *info1501; void *info; } share; @@ -484,19 +567,21 @@ typedef struct q_net_share_get_info_info } SRV_Q_NET_SHARE_GET_INFO; -/* JRA. NB. We also need level 1004 and 1006 here. */ - /* SRV_SHARE_INFO */ typedef struct srv_share_info { uint32 switch_value; uint32 ptr_share_ctr; union { + SRV_SHARE_INFO_0 info0; SRV_SHARE_INFO_1 info1; SRV_SHARE_INFO_2 info2; SRV_SHARE_INFO_501 info501; SRV_SHARE_INFO_502 info502; + SRV_SHARE_INFO_1004 info1004; SRV_SHARE_INFO_1005 info1005; + SRV_SHARE_INFO_1006 info1006; + SRV_SHARE_INFO_1007 info1007; SRV_SHARE_INFO_1501 info1501; } share; } SRV_SHARE_INFO; @@ -520,12 +605,16 @@ typedef struct q_net_share_set_info_info SRV_SHARE_INFO info; + uint32 ptr_parm_error; + uint32 parm_error; + } SRV_Q_NET_SHARE_SET_INFO; /* SRV_R_NET_SHARE_SET_INFO */ typedef struct r_net_share_set_info { - uint32 switch_value; /* switch value */ + uint32 ptr_parm_error; + uint32 parm_error; WERROR status; /* return status */ @@ -549,7 +638,9 @@ typedef struct q_net_share_add /* SRV_R_NET_SHARE_ADD */ typedef struct r_net_share_add { - uint32 switch_value; /* switch value */ + + uint32 ptr_parm_error; + uint32 parm_error; WERROR status; /* return status */ @@ -594,9 +685,12 @@ typedef struct str_file_info3_info /* SRV_FILE_INFO_3 */ typedef struct srv_file_info_3 { + uint32 num_entries_read; /* EntriesRead */ + uint32 ptr_file_info; /* Buffer */ + + uint32 num_entries_read2; /* EntriesRead */ FILE_INFO_3 info_3; /* file entry details */ FILE_INFO_3_STR info_3_str; /* file entry strings */ - } SRV_FILE_INFO_3; /* SRV_FILE_INFO_CTR */ diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index 7f1915edc76..531267c308c 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -3,9 +3,10 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Jeremy Allison 1999. - * Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2002 + * Copyright (C) Paul Ashton 1997, + * Copyright (C) Jeremy Allison 1999, + * Copyright (C) Nigel Williams 2001, + * Copyright (C) Jim McDonough (jmcd@us.ibm.com) 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +28,71 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_PARSE +/******************************************************************* + Inits a SH_INFO_0_STR structure +********************************************************************/ + +void init_srv_share_info0_str(SH_INFO_0_STR *sh0, char *net_name) +{ + DEBUG(5,("init_srv_share_info0_str\n")); + + if(net_name) + init_unistr2(&sh0->uni_netname, net_name, strlen(net_name)+1); +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info0_str(char *desc, SH_INFO_0_STR *sh0, prs_struct *ps, int depth) +{ + if (sh0 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info0_str"); + depth++; + + if(!prs_align(ps)) + return False; + if(sh0->ptrs->ptr_netname) + if(!smb_io_unistr2("", &sh0->uni_netname, True, ps, depth)) + return False; + + return True; +} + +/******************************************************************* + makes a SH_INFO_0 structure +********************************************************************/ + +void init_srv_share_info0(SH_INFO_0 *sh0, char *net_name) +{ + DEBUG(5,("init_srv_share_info0: %s\n", net_name)); + + sh0->ptr_netname = (net_name != NULL) ? 1 : 0; +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info0(char *desc, SH_INFO_0 *sh0, prs_struct *ps, int depth) +{ + if (sh0 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info0"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_netname", ps, depth, &sh0->ptr_netname)) + return False; + + return True; +} + /******************************************************************* Inits a SH_INFO_1_STR structure ********************************************************************/ @@ -35,8 +101,10 @@ void init_srv_share_info1_str(SH_INFO_1_STR *sh1, char *net_name, char *remark) { DEBUG(5,("init_srv_share_info1_str\n")); - init_unistr2(&sh1->uni_netname, net_name, strlen(net_name)+1); - init_unistr2(&sh1->uni_remark, remark, strlen(remark)+1); + if(net_name) + init_unistr2(&sh1->uni_netname, net_name, strlen(net_name)+1); + if(remark) + init_unistr2(&sh1->uni_remark, remark, strlen(remark)+1); } /******************************************************************* @@ -47,20 +115,24 @@ static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *p { if (sh1 == NULL) return False; - + prs_debug(ps, depth, desc, "srv_io_share_info1_str"); depth++; - + if(!prs_align(ps)) return False; - if(!smb_io_unistr2("", &sh1->uni_netname, True, ps, depth)) - return False; + if(sh1->ptrs->ptr_netname) + if(!smb_io_unistr2("", &sh1->uni_netname, True, ps, depth)) + return False; + if(!prs_align(ps)) return False; - if(!smb_io_unistr2("", &sh1->uni_remark, True, ps, depth)) - return False; - + + if(sh1->ptrs->ptr_remark) + if(!smb_io_unistr2("", &sh1->uni_remark, True, ps, depth)) + return False; + return True; } @@ -71,7 +143,7 @@ static BOOL srv_io_share_info1_str(char *desc, SH_INFO_1_STR *sh1, prs_struct *p void init_srv_share_info1(SH_INFO_1 *sh1, char *net_name, uint32 type, char *remark) { DEBUG(5,("init_srv_share_info1: %s %8x %s\n", net_name, type, remark)); - + sh1->ptr_netname = (net_name != NULL) ? 1 : 0; sh1->type = type; sh1->ptr_remark = (remark != NULL) ? 1 : 0; @@ -139,6 +211,7 @@ static BOOL srv_io_share_info2_str(char *desc, SH_INFO_2 *sh, SH_INFO_2_STR *sh2 if(!prs_align(ps)) return False; + if (sh->ptr_netname) if(!smb_io_unistr2("", &sh2->uni_netname, True, ps, depth)) return False; @@ -175,7 +248,6 @@ void init_srv_share_info2(SH_INFO_2 *sh2, sh2->perms = perms; sh2->max_uses = max_uses; sh2->num_uses = num_uses; - sh2->type = type; sh2->ptr_path = (path != NULL) ? 1 : 0; sh2->ptr_passwd = (passwd != NULL) ? 1 : 0; } @@ -215,6 +287,21 @@ static BOOL srv_io_share_info2(char *desc, SH_INFO_2 *sh2, prs_struct *ps, int d return True; } +/******************************************************************* + Inits a SH_INFO_501_STR structure +********************************************************************/ + +void init_srv_share_info501_str(SH_INFO_501_STR *sh501, + char *net_name, char *remark) +{ + DEBUG(5,("init_srv_share_info501_str\n")); + + if(net_name) + init_unistr2(&sh501->uni_netname, net_name, strlen(net_name)+1); + if(remark) + init_unistr2(&sh501->uni_remark, remark, strlen(remark)+1); +} + /******************************************************************* Inits a SH_INFO_2 structure *******************************************************************/ @@ -259,18 +346,6 @@ static BOOL srv_io_share_info501(char *desc, SH_INFO_501 *sh501, prs_struct *ps, return True; } -/******************************************************************** - Inits a SH_INFO_501_STR structure -********************************************************************/ - -void init_srv_share_info501_str(SH_INFO_501_STR *sh501, char *net_name, char *remark) -{ - DEBUG(5,("init_srv_share_info501_str\n")); - - init_unistr2(&sh501->uni_netname, net_name, strlen(net_name)+1); - init_unistr2(&sh501->uni_remark, remark, strlen(remark)+1); -} - /******************************************************************* Reads or writes a structure. ********************************************************************/ @@ -301,7 +376,7 @@ static BOOL srv_io_share_info501_str(char *desc, SH_INFO_501_STR *sh501, prs_str ********************************************************************/ void init_srv_share_info502(SH_INFO_502 *sh502, - char *net_name, uint32 type, char *remark, + const char *net_name, uint32 type, char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, char *path, char *passwd, SEC_DESC *psd, size_t sd_size) { @@ -315,9 +390,9 @@ void init_srv_share_info502(SH_INFO_502 *sh502, sh502->perms = perms; sh502->max_uses = max_uses; sh502->num_uses = num_uses; - sh502->type = type; sh502->ptr_path = (path != NULL) ? 1 : 0; sh502->ptr_passwd = (passwd != NULL) ? 1 : 0; + sh502->reserved = 0; /* actual size within rpc */ sh502->sd_size = (uint32)sd_size; sh502->ptr_sd = (psd != NULL) ? 1 : 0; } @@ -353,7 +428,7 @@ static BOOL srv_io_share_info502(char *desc, SH_INFO_502 *sh502, prs_struct *ps, return False; if(!prs_uint32("ptr_passwd ", ps, depth, &sh502->ptr_passwd)) return False; - if(!prs_uint32("sd_size ", ps, depth, &sh502->sd_size)) + if(!prs_uint32_pre("reserved ", ps, depth, &sh502->reserved, &sh502->reserved_offset)) return False; if(!prs_uint32("ptr_sd ", ps, depth, &sh502->ptr_sd)) return False; @@ -366,26 +441,22 @@ static BOOL srv_io_share_info502(char *desc, SH_INFO_502 *sh502, prs_struct *ps, ********************************************************************/ void init_srv_share_info502_str(SH_INFO_502_STR *sh502str, - SH_INFO_502 *ptrs, char *net_name, char *remark, char *path, char *passwd, SEC_DESC *psd, size_t sd_size) { DEBUG(5,("init_srv_share_info502_str\n")); - sh502str->ptrs = ptrs; - - if(sh502str->ptrs->ptr_netname) + if(net_name) init_unistr2(&sh502str->uni_netname, net_name, strlen(net_name)+1); - if(sh502str->ptrs->ptr_remark) + if(remark) init_unistr2(&sh502str->uni_remark, remark, strlen(remark)+1); - if(sh502str->ptrs->ptr_path) + if(path) init_unistr2(&sh502str->uni_path, path, strlen(path)+1); - if(sh502str->ptrs->ptr_passwd) + if(passwd) init_unistr2(&sh502str->uni_passwd, passwd, strlen(passwd)+1); - if(sh502str->ptrs->ptr_sd) { sh502str->sd = psd; + sh502str->reserved = 0; sh502str->sd_size = sd_size; - } } /******************************************************************* @@ -436,21 +507,112 @@ static BOOL srv_io_share_info502_str(char *desc, SH_INFO_502_STR *sh502, prs_str return False; if(sh502->ptrs->ptr_sd) { - if(!prs_uint32("sd_size ", ps, depth, &sh502->sd_size)) + uint32 old_offset; + uint32 reserved_offset; + + if(!prs_uint32_pre("reserved ", ps, depth, &sh502->reserved, &reserved_offset)) return False; + + old_offset = prs_offset(ps); + if (!sec_io_desc(desc, &sh502->sd, ps, depth)) return False; + + if(UNMARSHALLING(ps)) { + + sh502->ptrs->sd_size = sh502->sd_size = sec_desc_size(sh502->sd); + + prs_set_offset(ps, old_offset + sh502->reserved); + } + + prs_align(ps); + + if(MARSHALLING(ps)) { + + sh502->ptrs->reserved = sh502->reserved = prs_offset(ps) - old_offset; + } + + if(!prs_uint32_post("reserved ", ps, depth, + &sh502->reserved, reserved_offset, sh502->reserved)) + return False; + if(!prs_uint32_post("reserved ", ps, depth, + &sh502->ptrs->reserved, sh502->ptrs->reserved_offset, sh502->ptrs->reserved)) + return False; } return True; } +/******************************************************************* + Inits a SH_INFO_1004_STR structure +********************************************************************/ + +void init_srv_share_info1004_str(SH_INFO_1004_STR *sh1004, char *remark) +{ + DEBUG(5,("init_srv_share_info1004_str\n")); + + if(remark) + init_unistr2(&sh1004->uni_remark, remark, strlen(remark)+1); +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info1004_str(char *desc, SH_INFO_1004_STR *sh1004, prs_struct *ps, int depth) +{ + if (sh1004 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info1004_str"); + depth++; + + if(!prs_align(ps)) + return False; + if(sh1004->ptrs->ptr_remark) + if(!smb_io_unistr2("", &sh1004->uni_remark, True, ps, depth)) + return False; + + return True; +} + +/******************************************************************* + makes a SH_INFO_1004 structure +********************************************************************/ + +void init_srv_share_info1004(SH_INFO_1004 *sh1004, char *remark) +{ + DEBUG(5,("init_srv_share_info1004: %s\n", remark)); + + sh1004->ptr_remark = (remark != NULL) ? 1 : 0; +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info1004(char *desc, SH_INFO_1004 *sh1004, prs_struct *ps, int depth) +{ + if (sh1004 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info1004"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_remark", ps, depth, &sh1004->ptr_remark)) + return False; + + return True; +} + /******************************************************************* Reads or writes a structure. ********************************************************************/ -static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, - prs_struct* ps, int depth) +static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, prs_struct* ps, int depth) { if(sh1005 == NULL) return False; @@ -471,6 +633,95 @@ static BOOL srv_io_share_info1005(char* desc, SRV_SHARE_INFO_1005* sh1005, Reads or writes a structure. ********************************************************************/ +static BOOL srv_io_share_info1006(char* desc, SRV_SHARE_INFO_1006* sh1006, prs_struct* ps, int depth) +{ + if(sh1006 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info1006"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("max uses ", ps, depth, &sh1006->max_uses)) + return False; + + return True; +} + +/******************************************************************* + Inits a SH_INFO_1007_STR structure +********************************************************************/ + +void init_srv_share_info1007_str(SH_INFO_1007_STR *sh1007, const char *alternate_directory_name) +{ + DEBUG(5,("init_srv_share_info1007_str\n")); + + if(alternate_directory_name) + init_unistr2(&sh1007->uni_AlternateDirectoryName, alternate_directory_name, strlen(alternate_directory_name)+1); +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info1007_str(char *desc, SH_INFO_1007_STR *sh1007, prs_struct *ps, int depth) +{ + if (sh1007 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info1007_str"); + depth++; + + if(!prs_align(ps)) + return False; + if(sh1007->ptrs->ptr_AlternateDirectoryName) + if(!smb_io_unistr2("", &sh1007->uni_AlternateDirectoryName, True, ps, depth)) + return False; + + return True; +} + +/******************************************************************* + makes a SH_INFO_1007 structure +********************************************************************/ + +void init_srv_share_info1007(SH_INFO_1007 *sh1007, uint32 flags, const char *alternate_directory_name) +{ + DEBUG(5,("init_srv_share_info1007: %s\n", alternate_directory_name)); + + sh1007->flags = flags; + sh1007->ptr_AlternateDirectoryName = (alternate_directory_name != NULL) ? 1 : 0; +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + +static BOOL srv_io_share_info1007(char *desc, SH_INFO_1007 *sh1007, prs_struct *ps, int depth) +{ + if (sh1007 == NULL) + return False; + + prs_debug(ps, depth, desc, "srv_io_share_info1007"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("flags ", ps, depth, &sh1007->flags)) + return False; + if(!prs_uint32("ptr_Alter..", ps, depth, &sh1007->ptr_AlternateDirectoryName)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes a structure. +********************************************************************/ + static BOOL srv_io_share_info1501(char* desc, SRV_SHARE_INFO_1501* sh1501, prs_struct* ps, int depth) { @@ -511,9 +762,6 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct if(!prs_uint32("info_level", ps, depth, &ctr->info_level)) return False; - if (ctr->info_level == 0) - return True; - if(!prs_uint32("switch_value", ps, depth, &ctr->switch_value)) return False; if(!prs_uint32("ptr_share_info", ps, depth, &ctr->ptr_share_info)) @@ -541,6 +789,33 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct return False; switch (ctr->switch_value) { + + case 0: + { + SRV_SHARE_INFO_0 *info0 = ctr->share.info0; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info0 = (SRV_SHARE_INFO_0 *)prs_alloc_mem(ps, num_entries * sizeof(SRV_SHARE_INFO_0)))) + return False; + ctr->share.info0 = info0; + } + + for (i = 0; i < num_entries; i++) { + if(!srv_io_share_info0("", &info0[i].info_0, ps, depth)) + return False; + } + + for (i = 0; i < num_entries; i++) { + info0[i].info_0_str.ptrs = &info0[i].info_0; + if(!srv_io_share_info0_str("", &info0[i].info_0_str, ps, depth)) + return False; + } + + break; + } + case 1: { SRV_SHARE_INFO_1 *info1 = ctr->share.info1; @@ -559,6 +834,7 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct } for (i = 0; i < num_entries; i++) { + info1[i].info_1_str.ptrs = &info1[i].info_1; if(!srv_io_share_info1_str("", &info1[i].info_1_str, ps, depth)) return False; } @@ -632,8 +908,8 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct for (i = 0; i < num_entries; i++) { if(!srv_io_share_info502("", &info502[i].info_502, ps, depth)) return False; - } - + } + for (i = 0; i < num_entries; i++) { info502[i].info_502_str.ptrs = &info502[i].info_502; if(!srv_io_share_info502_str("", &info502[i].info_502_str, ps, depth)) @@ -643,6 +919,118 @@ static BOOL srv_io_srv_share_ctr(char *desc, SRV_SHARE_INFO_CTR *ctr, prs_struct break; } + case 1004: + { + SRV_SHARE_INFO_1004 *info1004 = ctr->share.info1004; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info1004 = (SRV_SHARE_INFO_1004 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_1004)))) + return False; + ctr->share.info1004 = info1004; + } + + for (i = 0; i < num_entries; i++) { + if(!srv_io_share_info1004("", &info1004[i].info_1004, ps, depth)) + return False; + } + + for (i = 0; i < num_entries; i++) { + info1004[i].info_1004_str.ptrs = &info1004[i].info_1004; + if(!srv_io_share_info1004_str("", &info1004[i].info_1004_str, ps, depth)) + return False; + } + + break; + } + + case 1005: + { + SRV_SHARE_INFO_1005 *info1005 = ctr->share.info1005; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info1005 = (SRV_SHARE_INFO_1005 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_1005)))) + return False; + ctr->share.info1005 = info1005; + } + + for (i = 0; i < num_entries; i++) { + if(!srv_io_share_info1005("", &info1005[i], ps, depth)) + return False; + } + + break; + } + + case 1006: + { + SRV_SHARE_INFO_1006 *info1006 = ctr->share.info1006; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info1006 = (SRV_SHARE_INFO_1006 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_1006)))) + return False; + ctr->share.info1006 = info1006; + } + + for (i = 0; i < num_entries; i++) { + if(!srv_io_share_info1006("", &info1006[i], ps, depth)) + return False; + } + + break; + } + + case 1007: + { + SRV_SHARE_INFO_1007 *info1007 = ctr->share.info1007; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info1007 = (SRV_SHARE_INFO_1007 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_1007)))) + return False; + ctr->share.info1007 = info1007; + } + + for (i = 0; i < num_entries; i++) { + if(!srv_io_share_info1007("", &info1007[i].info_1007, ps, depth)) + return False; + } + + for (i = 0; i < num_entries; i++) { + info1007[i].info_1007_str.ptrs = &info1007[i].info_1007; + if(!srv_io_share_info1007_str("", &info1007[i].info_1007_str, ps, depth)) + return False; + } + + break; + } + + case 1501: + { + SRV_SHARE_INFO_1501 *info1501 = ctr->share.info1501; + int num_entries = ctr->num_entries; + int i; + + if (UNMARSHALLING(ps)) { + if (!(info1501 = (SRV_SHARE_INFO_1501 *)prs_alloc_mem(ps,num_entries * sizeof(SRV_SHARE_INFO_1501)))) + return False; + ctr->share.info1501 = info1501; + } + + for (i = 0; i < num_entries; i++) { + if(!srv_io_share_info1501("", &info1501[i], ps, depth)) + return False; + } + + break; + } + default: DEBUG(5,("%s no share info at switch_value %d\n", tab_depth(depth), ctr->switch_value)); @@ -667,8 +1055,9 @@ void init_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n, q_n->ctr.info_level = q_n->ctr.switch_value = info_level; q_n->ctr.ptr_share_info = 1; - q_n->ctr.num_entries = 0; - q_n->ctr.ptr_entries = 0; + q_n->ctr.num_entries = 0; + q_n->ctr.ptr_entries = 0; + q_n->ctr.num_entries2 = 0; q_n->preferred_len = preferred_len; memcpy(&q_n->enum_hnd, hnd, sizeof(*hnd)); @@ -729,14 +1118,37 @@ BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct * if(!prs_uint32("total_entries", ps, depth, &r_n->total_entries)) return False; - if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) - return False; + + if(r_n->total_entries != 0) { + if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) + return False; + } + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; } +/******************************************************************* + initialises a structure. +********************************************************************/ + +BOOL init_srv_q_net_share_get_info(SRV_Q_NET_SHARE_GET_INFO *q_n, const char *srv_name, const char *share_name, uint32 info_level) +{ + + uint32 ptr_share_name; + + DEBUG(5,("init_srv_q_net_share_get_info\n")); + + init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name); + init_buf_unistr2(&q_n->uni_share_name, &ptr_share_name, share_name); + + q_n->info_level = info_level; + + return True; +} + /******************************************************************* Reads or writes a structure. ********************************************************************/ @@ -792,10 +1204,24 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA if (r_n->ptr_share_ctr != 0) { switch (r_n->switch_value) { + case 0: + if(!srv_io_share_info0("", &r_n->share.info0.info_0, ps, depth)) + return False; + + /* allow access to pointers in the str part. */ + r_n->share.info0.info_0_str.ptrs = &r_n->share.info0.info_0; + + if(!srv_io_share_info0_str("", &r_n->share.info0.info_0_str, ps, depth)) + return False; + + break; case 1: if(!srv_io_share_info1("", &r_n->share.info1.info_1, ps, depth)) return False; + /* allow access to pointers in the str part. */ + r_n->share.info1.info_1_str.ptrs = &r_n->share.info1.info_1; + if(!srv_io_share_info1_str("", &r_n->share.info1.info_1_str, ps, depth)) return False; @@ -819,16 +1245,40 @@ static BOOL srv_io_srv_share_info(char *desc, prs_struct *ps, int depth, SRV_SHA if(!srv_io_share_info502("", &r_n->share.info502.info_502, ps, depth)) return False; - /*allow access to pointers in the str part. */ + /* allow access to pointers in the str part. */ r_n->share.info502.info_502_str.ptrs = &r_n->share.info502.info_502; if(!srv_io_share_info502_str("", &r_n->share.info502.info_502_str, ps, depth)) return False; break; + case 1004: + if(!srv_io_share_info1004("", &r_n->share.info1004.info_1004, ps, depth)) + return False; + + /* allow access to pointers in the str part. */ + r_n->share.info1004.info_1004_str.ptrs = &r_n->share.info1004.info_1004; + + if(!srv_io_share_info1004_str("", &r_n->share.info1004.info_1004_str, ps, depth)) + return False; + break; case 1005: if(!srv_io_share_info1005("", &r_n->share.info1005, ps, depth)) return False; break; + case 1006: + if(!srv_io_share_info1006("", &r_n->share.info1006, ps, depth)) + return False; + break; + case 1007: + if(!srv_io_share_info1007("", &r_n->share.info1007.info_1007, ps, depth)) + return False; + + /* allow access to pointers in the str part. */ + r_n->share.info1007.info_1007_str.ptrs = &r_n->share.info1007.info_1007; + + if(!srv_io_share_info1007_str("", &r_n->share.info1007.info_1007_str, ps, depth)) + return False; + break; case 1501: if (!srv_io_share_info1501("", &r_n->share.info1501, ps, depth)) return False; @@ -869,6 +1319,34 @@ BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_ return True; } +/******************************************************************* + intialises a structure. +********************************************************************/ + +BOOL init_srv_q_net_share_set_info(SRV_Q_NET_SHARE_SET_INFO *q_n, + const char *srv_name, + const char *share_name, + uint32 info_level, + const SRV_SHARE_INFO *info) +{ + + uint32 ptr_share_name; + + DEBUG(5,("init_srv_q_net_share_set_info\n")); + + init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name); + init_buf_unistr2(&q_n->uni_share_name, &ptr_share_name, share_name); + + q_n->info_level = info_level; + + q_n->info = *info; + + q_n->ptr_parm_error = 1; + q_n->parm_error = 0; + + return True; +} + /******************************************************************* Reads or writes a structure. ********************************************************************/ @@ -904,6 +1382,15 @@ BOOL srv_io_q_net_share_set_info(char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_ if(!srv_io_srv_share_info("info ", ps, depth, &q_n->info)) return False; + if(!prs_align(ps)) + return False; + if(!prs_uint32("ptr_parm_error", ps, depth, &q_n->ptr_parm_error)) + return False; + if(q_n->ptr_parm_error!=0) { + if(!prs_uint32("parm_error", ps, depth, &q_n->parm_error)) + return False; + } + return True; } @@ -911,9 +1398,9 @@ BOOL srv_io_q_net_share_set_info(char *desc, SRV_Q_NET_SHARE_SET_INFO *q_n, prs_ Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *r_n, prs_struct *ps, int depth) { - if (q_n == NULL) + if (r_n == NULL) return False; prs_debug(ps, depth, desc, "srv_io_r_net_share_set_info"); @@ -922,14 +1409,22 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_ if(!prs_align(ps)) return False; - if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) + if(!prs_uint32("ptr_parm_error ", ps, depth, &r_n->ptr_parm_error)) return False; - if(!prs_werror("status", ps, depth, &q_n->status)) + + if(r_n->ptr_parm_error) { + + if(!prs_uint32("parm_error ", ps, depth, &r_n->parm_error)) + return False; + } + + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; } + /******************************************************************* Reads or writes a structure. ********************************************************************/ @@ -962,6 +1457,9 @@ BOOL srv_io_q_net_share_add(char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps if(!srv_io_srv_share_info("info ", ps, depth, &q_n->info)) return False; + if(!prs_align(ps)) + return False; + if(!prs_uint32("ptr_err_index", ps, depth, &q_n->ptr_err_index)) return False; if (q_n->ptr_err_index) @@ -994,9 +1492,9 @@ void init_srv_q_net_share_add(SRV_Q_NET_SHARE_ADD *q, char *srvname, Reads or writes a structure. ********************************************************************/ -BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps, int depth) +BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *r_n, prs_struct *ps, int depth) { - if (q_n == NULL) + if (r_n == NULL) return False; prs_debug(ps, depth, desc, "srv_io_r_net_share_add"); @@ -1005,14 +1503,25 @@ BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps if(!prs_align(ps)) return False; - if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) + if(!prs_uint32("ptr_parm_error", ps, depth, &r_n->ptr_parm_error)) return False; - if(!prs_werror("status", ps, depth, &q_n->status)) + + if(r_n->ptr_parm_error) { + + if(!prs_uint32("parm_error", ps, depth, &r_n->parm_error)) + return False; + } + + if(!prs_werror("status", ps, depth, &r_n->status)) return False; return True; } +/******************************************************************* + initialises a structure. +********************************************************************/ + void init_srv_q_net_share_del(SRV_Q_NET_SHARE_DEL *del, const char *srvname, const char *sharename) { @@ -1889,8 +2398,8 @@ static BOOL srv_io_file_info3_str(char *desc, FILE_INFO_3_STR *sh1, prs_struct * ********************************************************************/ void init_srv_file_info3(FILE_INFO_3 *fl3, - uint32 id, uint32 perms, uint32 num_locks, - char *path_name, char *user_name) + uint32 id, uint32 perms, uint32 num_locks, + char *path_name, char *user_name) { DEBUG(5,("init_srv_file_info3: %s %s\n", path_name, user_name)); @@ -2296,7 +2805,7 @@ void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, char *name, sv102->disc = disc; sv102->hidden = hidden; sv102->announce = announce; - sv102->ann_delta =ann_delta; + sv102->ann_delta = ann_delta; sv102->licenses = licenses; init_buf_unistr2(&sv102->uni_usr_path, &sv102->ptr_usr_path, usr_path); } @@ -2560,7 +3069,7 @@ BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, if(!prs_align(ps)) return False; - if(!prs_uint32("switch_value ", ps, depth, &r_n->switch_value)) + if(!prs_uint32("switch value ", ps, depth, &r_n->switch_value)) return False; if(!prs_werror("status", ps, depth, &r_n->status)) @@ -2688,6 +3197,31 @@ BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct * return True; } +/******************************************************************* + initialises a structure. + ********************************************************************/ + +BOOL init_srv_q_net_disk_enum(SRV_Q_NET_DISK_ENUM *q_n, + const char *srv_name, + uint32 preferred_len, + ENUM_HND *enum_hnd + ) +{ + + + DEBUG(5,("init_srv_q_net_srv_disk_enum\n")); + + init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name); + + q_n->disk_enum_ctr.level = 0; + q_n->disk_enum_ctr.disk_info_ptr = 0; + + q_n->preferred_len = preferred_len; + memcpy(&q_n->enum_hnd, enum_hnd, sizeof(*enum_hnd)); + + return True; +} + /******************************************************************* Reads or writes a structure. ********************************************************************/ @@ -2738,7 +3272,9 @@ BOOL srv_io_q_net_disk_enum(char *desc, SRV_Q_NET_DISK_ENUM *q_n, prs_struct *ps BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps, int depth) { + int i; + uint32 entries_read, entries_read2, entries_read3; if (r_n == NULL) return False; @@ -2746,23 +3282,36 @@ BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps prs_debug(ps, depth, desc, "srv_io_r_net_disk_enum"); depth++; + entries_read = entries_read2 = entries_read3 = r_n->disk_enum_ctr.entries_read; + if(!prs_align(ps)) return False; - if(!prs_uint32("entries_read", ps, depth, &r_n->disk_enum_ctr.entries_read)) + if(!prs_uint32("entries_read", ps, depth, &entries_read)) return False; if(!prs_uint32("ptr_disk_info", ps, depth, &r_n->disk_enum_ctr.disk_info_ptr)) return False; /*this may be max, unknown, actual?*/ - if(!prs_uint32("max_elements", ps, depth, &r_n->disk_enum_ctr.entries_read)) + if(!prs_uint32("max_elements", ps, depth, &entries_read2)) return False; if(!prs_uint32("unknown", ps, depth, &r_n->disk_enum_ctr.unknown)) return False; - if(!prs_uint32("actual_elements", ps, depth, &r_n->disk_enum_ctr.entries_read)) + if(!prs_uint32("actual_elements", ps, depth, &entries_read3)) return False; + r_n->disk_enum_ctr.entries_read = entries_read3; + + if(UNMARSHALLING(ps)) { + + DISK_INFO *dinfo; + + if(!(dinfo = (DISK_INFO *)prs_alloc_mem(ps, sizeof(*dinfo) * entries_read3))) + return False; + r_n->disk_enum_ctr.disk_info = dinfo; + } + for(i=0; i < r_n->disk_enum_ctr.entries_read; i++) { if(!prs_uint32("unknown", ps, depth, &r_n->disk_enum_ctr.disk_info[i].unknown)) @@ -2787,6 +3336,25 @@ BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps return True; } +/******************************************************************* + initialises a structure. + ********************************************************************/ + +BOOL init_srv_q_net_name_validate(SRV_Q_NET_NAME_VALIDATE *q_n, const char *srv_name, const char *share_name, int type) +{ + uint32 ptr_share_name; + + DEBUG(5,("init_srv_q_net_name_validate\n")); + + init_buf_unistr2(&q_n->uni_srv_name, &q_n->ptr_srv_name, srv_name); + init_buf_unistr2(&q_n->uni_name, &ptr_share_name, share_name); + + q_n->type = type; + q_n->flags = 0; + + return True; +} + /******************************************************************* Reads or writes a structure. ********************************************************************/ diff --git a/source3/rpc_server/srv_srvsvc.c b/source3/rpc_server/srv_srvsvc.c index 5e1c005d540..4a372de0897 100644 --- a/source3/rpc_server/srv_srvsvc.c +++ b/source3/rpc_server/srv_srvsvc.c @@ -344,6 +344,36 @@ static BOOL api_srv_net_share_del(pipes_struct *p) return True; } +/******************************************************************* + RPC to delete share information. +********************************************************************/ + +static BOOL api_srv_net_share_del_sticky(pipes_struct *p) +{ + SRV_Q_NET_SHARE_DEL q_u; + SRV_R_NET_SHARE_DEL r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + /* Unmarshall the net server del info. */ + if(!srv_io_q_net_share_del("", &q_u, data, 0)) { + DEBUG(0,("api_srv_net_share_del_sticky: Failed to unmarshall SRV_Q_NET_SHARE_DEL.\n")); + return False; + } + + r_u.status = _srv_net_share_del_sticky(p, &q_u, &r_u); + + if(!srv_io_r_net_share_del("", &r_u, rdata, 0)) { + DEBUG(0,("api_srv_net_share_del_sticky: Failed to marshall SRV_R_NET_SHARE_DEL.\n")); + return False; + } + + return True; +} + /******************************************************************* api_srv_net_remote_tod ********************************************************************/ @@ -503,6 +533,7 @@ static const struct api_struct api_srv_cmds[] = { "SRV_NET_SHARE_ENUM" , SRV_NET_SHARE_ENUM , api_srv_net_share_enum }, { "SRV_NET_SHARE_ADD" , SRV_NET_SHARE_ADD , api_srv_net_share_add }, { "SRV_NET_SHARE_DEL" , SRV_NET_SHARE_DEL , api_srv_net_share_del }, + { "SRV_NET_SHARE_DEL_STICKY", SRV_NET_SHARE_DEL_STICKY, api_srv_net_share_del_sticky }, { "SRV_NET_SHARE_GET_INFO", SRV_NET_SHARE_GET_INFO, api_srv_net_share_get_info }, { "SRV_NET_SHARE_SET_INFO", SRV_NET_SHARE_SET_INFO, api_srv_net_share_set_info }, { "SRV_NET_FILE_ENUM" , SRV_NET_FILE_ENUM , api_srv_net_file_enum }, diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index 202e869d35c..b68dcce6726 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -3,6 +3,7 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Jeremy Allison 2001. + * Copyright (C) Nigel Williams 2001. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,33 +29,54 @@ extern pstring global_myname; +/******************************************************************* + Utility function to get the 'type' of a share from an snum. + ********************************************************************/ +static uint32 get_share_type(int snum) +{ + char *net_name = lp_servicename(snum); + int len_net_name = strlen(net_name); + + /* work out the share type */ + uint32 type = STYPE_DISKTREE; + + if (lp_print_ok(snum)) + type = STYPE_PRINTQ; + if (strequal(lp_fstype(snum), "IPC")) + type = STYPE_IPC; + if (net_name[len_net_name] == '$') + type |= STYPE_HIDDEN; + + return type; +} + +/******************************************************************* + Fill in a share info level 0 structure. + ********************************************************************/ + +static void init_srv_share_info_0(pipes_struct *p, SRV_SHARE_INFO_0 *sh0, int snum) +{ + pstring net_name; + + pstrcpy(net_name, lp_servicename(snum)); + + init_srv_share_info0(&sh0->info_0, net_name); + init_srv_share_info0_str(&sh0->info_0_str, net_name); +} + /******************************************************************* Fill in a share info level 1 structure. ********************************************************************/ static void init_srv_share_info_1(pipes_struct *p, SRV_SHARE_INFO_1 *sh1, int snum) { - int len_net_name; - pstring net_name; pstring remark; - uint32 type; - pstrcpy(net_name, lp_servicename(snum)); + char *net_name = lp_servicename(snum); pstrcpy(remark, lp_comment(snum)); standard_sub_conn(p->conn, remark,sizeof(remark)); - len_net_name = strlen(net_name); - /* work out the share type */ - type = STYPE_DISKTREE; - - if (lp_print_ok(snum)) - type = STYPE_PRINTQ; - if (strequal("IPC$", net_name) || strequal("ADMIN$", net_name)) - type = STYPE_IPC; - if (net_name[len_net_name] == '$') - type |= STYPE_HIDDEN; - - init_srv_share_info1(&sh1->info_1, net_name, type, remark); + init_srv_share_info1(&sh1->info_1, net_name, get_share_type(snum), remark); init_srv_share_info1_str(&sh1->info_1_str, net_name, remark); } @@ -64,14 +86,11 @@ static void init_srv_share_info_1(pipes_struct *p, SRV_SHARE_INFO_1 *sh1, int sn static void init_srv_share_info_2(pipes_struct *p, SRV_SHARE_INFO_2 *sh2, int snum) { - int len_net_name; - pstring net_name; pstring remark; pstring path; pstring passwd; - uint32 type; - pstrcpy(net_name, lp_servicename(snum)); + char *net_name = lp_servicename(snum); pstrcpy(remark, lp_comment(snum)); standard_sub_conn(p->conn, remark,sizeof(remark)); pstrcpy(path, "C:"); @@ -85,19 +104,8 @@ static void init_srv_share_info_2(pipes_struct *p, SRV_SHARE_INFO_2 *sh2, int sn string_replace(path, '/', '\\'); pstrcpy(passwd, ""); - len_net_name = strlen(net_name); - /* work out the share type */ - type = STYPE_DISKTREE; - - if (lp_print_ok(snum)) - type = STYPE_PRINTQ; - if (strequal("IPC$", net_name) || strequal("ADMIN$", net_name)) - type = STYPE_IPC; - if (net_name[len_net_name] == '$') - type |= STYPE_HIDDEN; - - init_srv_share_info2(&sh2->info_2, net_name, type, remark, 0, 0xffffffff, 1, path, passwd); + init_srv_share_info2(&sh2->info_2, net_name, get_share_type(snum), remark, 0, 0xffffffff, 1, path, passwd); init_srv_share_info2_str(&sh2->info_2_str, net_name, remark, path, passwd); } @@ -251,7 +259,7 @@ static BOOL set_share_security(TALLOC_CTX *ctx, const char *share_name, SEC_DESC /* Free malloc'ed memory */ - out: +out: prs_mem_free(&ps); if (mem_ctx) @@ -337,7 +345,7 @@ BOOL share_access_check(connection_struct *conn, int snum, user_struct *vuser, u ret = se_access_check(psd, token, desired_access, &granted, &status); - out: +out: talloc_destroy(mem_ctx); @@ -351,27 +359,15 @@ BOOL share_access_check(connection_struct *conn, int snum, user_struct *vuser, u static void init_srv_share_info_501(pipes_struct *p, SRV_SHARE_INFO_501 *sh501, int snum) { int len_net_name; - pstring net_name; pstring remark; - uint32 type; - pstrcpy(net_name, lp_servicename(snum)); + char *net_name = lp_servicename(snum); pstrcpy(remark, lp_comment(snum)); standard_sub_conn(p->conn, remark, sizeof(remark)); len_net_name = strlen(net_name); - /* work out the share type */ - type = STYPE_DISKTREE; - - if (lp_print_ok(snum)) - type = STYPE_PRINTQ; - if (strequal("IPC$", net_name) || strequal("ADMIN$", net_name)) - type = STYPE_IPC; - if (net_name[len_net_name] == '$') - type |= STYPE_HIDDEN; - - init_srv_share_info501(&sh501->info_501, net_name, type, remark, (lp_csc_policy(snum) << 4)); + init_srv_share_info501(&sh501->info_501, net_name, get_share_type(snum), remark, (lp_csc_policy(snum) << 4)); init_srv_share_info501_str(&sh501->info_501_str, net_name, remark); } @@ -386,7 +382,6 @@ static void init_srv_share_info_502(pipes_struct *p, SRV_SHARE_INFO_502 *sh502, pstring remark; pstring path; pstring passwd; - uint32 type; SEC_DESC *sd; size_t sd_size; TALLOC_CTX *ctx = p->mem_ctx; @@ -410,39 +405,86 @@ static void init_srv_share_info_502(pipes_struct *p, SRV_SHARE_INFO_502 *sh502, pstrcpy(passwd, ""); len_net_name = strlen(net_name); - /* work out the share type */ - type = STYPE_DISKTREE; - - if (lp_print_ok(snum)) - type = STYPE_PRINTQ; - if (strequal("IPC$", net_name)) - type = STYPE_IPC; - if (net_name[len_net_name] == '$') - type |= STYPE_HIDDEN; - sd = get_share_security(ctx, snum, &sd_size); - init_srv_share_info502(&sh502->info_502, net_name, type, remark, 0, 0xffffffff, 1, path, passwd, sd, sd_size); - init_srv_share_info502_str(&sh502->info_502_str, &sh502->info_502, net_name, remark, path, passwd, sd, sd_size); + init_srv_share_info502(&sh502->info_502, net_name, get_share_type(snum), remark, 0, 0xffffffff, 1, path, passwd, sd, sd_size); + init_srv_share_info502_str(&sh502->info_502_str, net_name, remark, path, passwd, sd, sd_size); +} + +/*************************************************************************** + Fill in a share info level 1004 structure. + ***************************************************************************/ + +static void init_srv_share_info_1004(pipes_struct *p, SRV_SHARE_INFO_1004* sh1004, int snum) +{ + pstring remark; + + pstrcpy(remark, lp_comment(snum)); + standard_sub_conn(p->conn, remark, sizeof(remark)); + + ZERO_STRUCTP(sh1004); + + init_srv_share_info1004(&sh1004->info_1004, remark); + init_srv_share_info1004_str(&sh1004->info_1004_str, remark); } /*************************************************************************** Fill in a share info level 1005 structure. ***************************************************************************/ -static void init_srv_share_info_1005(SRV_SHARE_INFO_1005* sh1005, int snum) +static void init_srv_share_info_1005(pipes_struct *p, SRV_SHARE_INFO_1005* sh1005, int snum) { sh1005->dfs_root_flag = 0; if(lp_host_msdfs() && lp_msdfs_root(snum)) sh1005->dfs_root_flag = 3; } +/*************************************************************************** + Fill in a share info level 1006 structure. + ***************************************************************************/ + +static void init_srv_share_info_1006(pipes_struct *p, SRV_SHARE_INFO_1006* sh1006, int snum) +{ + sh1006->max_uses = -1; +} + +/*************************************************************************** + Fill in a share info level 1007 structure. + ***************************************************************************/ + +static void init_srv_share_info_1007(pipes_struct *p, SRV_SHARE_INFO_1007* sh1007, int snum) +{ + pstring alternate_directory_name = ""; + uint32 flags = 0; + + ZERO_STRUCTP(sh1007); + + init_srv_share_info1007(&sh1007->info_1007, flags, alternate_directory_name); + init_srv_share_info1007_str(&sh1007->info_1007_str, alternate_directory_name); +} + +/******************************************************************* + Fill in a share info level 1501 structure. + ********************************************************************/ + +static void init_srv_share_info_1501(pipes_struct *p, SRV_SHARE_INFO_1501 *sh1501, int snum) +{ + SEC_DESC *sd; + size_t sd_size; + TALLOC_CTX *ctx = p->mem_ctx; + + ZERO_STRUCTP(sh1501); + + sd = get_share_security(ctx, snum, &sd_size); + + sh1501->sdb = make_sec_desc_buf(p->mem_ctx, sd_size, sd); +} /******************************************************************* True if it ends in '$'. ********************************************************************/ -static BOOL is_admin_share(int snum) +static BOOL is_hidden_share(int snum) { pstring net_name; @@ -471,7 +513,7 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, /* Count the number of entries. */ for (snum = 0; snum < num_services; snum++) { - if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) num_entries++; } @@ -483,6 +525,24 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, return True; switch (info_level) { + case 0: + { + SRV_SHARE_INFO_0 *info0; + int i = 0; + + info0 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_0)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { + init_srv_share_info_0(p, &info0[i++], snum); + } + } + + ctr->share.info0 = info0; + break; + + } + case 1: { SRV_SHARE_INFO_1 *info1; @@ -491,7 +551,7 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, info1 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_1)); for (snum = *resume_hnd; snum < num_services; snum++) { - if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { init_srv_share_info_1(p, &info1[i++], snum); } } @@ -508,7 +568,7 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, info2 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_2)); for (snum = *resume_hnd; snum < num_services; snum++) { - if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { init_srv_share_info_2(p, &info2[i++], snum); } } @@ -525,7 +585,7 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, info501 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_501)); for (snum = *resume_hnd; snum < num_services; snum++) { - if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { init_srv_share_info_501(p, &info501[i++], snum); } } @@ -542,7 +602,7 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, info502 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_502)); for (snum = *resume_hnd; snum < num_services; snum++) { - if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_admin_share(snum)) ) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { init_srv_share_info_502(p, &info502[i++], snum); } } @@ -551,6 +611,92 @@ static BOOL init_srv_share_info_ctr(pipes_struct *p, SRV_SHARE_INFO_CTR *ctr, break; } + /* here for completeness but not currently used with enum (1004 - 1501)*/ + + case 1004: + { + SRV_SHARE_INFO_1004 *info1004; + int i = 0; + + info1004 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_1004)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { + init_srv_share_info_1004(p, &info1004[i++], snum); + } + } + + ctr->share.info1004 = info1004; + break; + } + + case 1005: + { + SRV_SHARE_INFO_1005 *info1005; + int i = 0; + + info1005 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_1005)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { + init_srv_share_info_1005(p, &info1005[i++], snum); + } + } + + ctr->share.info1005 = info1005; + break; + } + + case 1006: + { + SRV_SHARE_INFO_1006 *info1006; + int i = 0; + + info1006 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_1006)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { + init_srv_share_info_1006(p, &info1006[i++], snum); + } + } + + ctr->share.info1006 = info1006; + break; + } + + case 1007: + { + SRV_SHARE_INFO_1007 *info1007; + int i = 0; + + info1007 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_1007)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { + init_srv_share_info_1007(p, &info1007[i++], snum); + } + } + + ctr->share.info1007 = info1007; + break; + } + + case 1501: + { + SRV_SHARE_INFO_1501 *info1501; + int i = 0; + + info1501 = talloc(ctx, num_entries * sizeof(SRV_SHARE_INFO_1501)); + + for (snum = *resume_hnd; snum < num_services; snum++) { + if (lp_browseable(snum) && lp_snum_ok(snum) && (all_shares || !is_hidden_share(snum)) ) { + init_srv_share_info_1501(p, &info1501[i++], snum); + } + } + + ctr->share.info1501 = info1501; + break; + } default: DEBUG(5,("init_srv_share_info_ctr: unsupported switch value %d\n", info_level)); return False; @@ -596,6 +742,9 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I if (snum >= 0) { switch (info_level) { + case 0: + init_srv_share_info_0(p, &r_n->info.share.info0, snum); + break; case 1: init_srv_share_info_1(p, &r_n->info.share.info1, snum); break; @@ -608,8 +757,24 @@ static void init_srv_r_net_share_get_info(pipes_struct *p, SRV_R_NET_SHARE_GET_I case 502: init_srv_share_info_502(p, &r_n->info.share.info502, snum); break; + + /* here for completeness */ + case 1004: + init_srv_share_info_1004(p, &r_n->info.share.info1004, snum); + break; case 1005: - init_srv_share_info_1005(&r_n->info.share.info1005, snum); + init_srv_share_info_1005(p, &r_n->info.share.info1005, snum); + break; + + /* here for completeness 1006 - 1501 */ + case 1006: + init_srv_share_info_1006(p, &r_n->info.share.info1006, snum); + break; + case 1007: + init_srv_share_info_1007(p, &r_n->info.share.info1007, snum); + break; + case 1501: + init_srv_share_info_1501(p, &r_n->info.share.info1501, snum); break; default: DEBUG(5,("init_srv_net_share_get_info: unsupported switch value %d\n", info_level)); @@ -955,7 +1120,8 @@ static void init_srv_r_net_conn_enum(SRV_R_NET_CONN_ENUM *r_n, ********************************************************************/ static WERROR init_srv_file_info_ctr(pipes_struct *p, SRV_FILE_INFO_CTR *ctr, - int switch_value, uint32 *resume_hnd, uint32 *total_entries) + int switch_value, uint32 *resume_hnd, + uint32 *total_entries) { WERROR status = WERR_OK; TALLOC_CTX *ctx = p->mem_ctx; @@ -1206,8 +1372,8 @@ WERROR _srv_net_share_enum(pipes_struct *p, SRV_Q_NET_SHARE_ENUM *q_u, SRV_R_NET /* Create the list of shares for the response. */ init_srv_r_net_share_enum(p, r_u, - q_u->ctr.info_level, - get_enum_hnd(&q_u->enum_hnd), False); + q_u->ctr.info_level, + get_enum_hnd(&q_u->enum_hnd), False); DEBUG(5,("_srv_net_share_enum: %d\n", __LINE__)); @@ -1295,7 +1461,7 @@ WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S unistr2_to_ascii(share_name, &q_u->uni_share_name, sizeof(share_name)); - r_u->switch_value = 0; + r_u->parm_error = 0; if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global")) return WERR_ACCESS_DENIED; @@ -1312,28 +1478,47 @@ WERROR _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S get_current_user(&user,p); - if (user.uid != 0) + if (user.uid != sec_initial_uid()) return WERR_ACCESS_DENIED; switch (q_u->info_level) { case 1: - /* Not enough info in a level 1 to do anything. */ - return WERR_ACCESS_DENIED; - case 2: - unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(share_name)); - unistr2_to_ascii(pathname, &q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name)); + fstrcpy(pathname, lp_pathname(snum)); + unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(comment)); type = q_u->info.share.info2.info_2.type; psd = NULL; break; + case 2: + unistr2_to_ascii(comment, &q_u->info.share.info2.info_2_str.uni_remark, sizeof(comment)); + unistr2_to_ascii(pathname, &q_u->info.share.info2.info_2_str.uni_path, sizeof(pathname)); + type = q_u->info.share.info2.info_2.type; + psd = NULL; + break; +#if 0 + /* not supported on set but here for completeness */ + case 501: + unistr2_to_ascii(comment, &q_u->info.share.info501.info_501_str.uni_remark, sizeof(comment)); + type = q_u->info.share.info501.info_501.type; + psd = NULL; + break; +#endif case 502: - unistr2_to_ascii(comment, &q_u->info.share.info502.info_502_str.uni_remark, sizeof(share_name)); - unistr2_to_ascii(pathname, &q_u->info.share.info502.info_502_str.uni_path, sizeof(share_name)); + unistr2_to_ascii(comment, &q_u->info.share.info502.info_502_str.uni_remark, sizeof(comment)); + unistr2_to_ascii(pathname, &q_u->info.share.info502.info_502_str.uni_path, sizeof(pathname)); type = q_u->info.share.info502.info_502.type; psd = q_u->info.share.info502.info_502_str.sd; map_generic_share_sd_bits(psd); break; + case 1004: + fstrcpy(pathname, lp_pathname(snum)); + unistr2_to_ascii(comment, &q_u->info.share.info1004.info_1004_str.uni_remark, sizeof(comment)); + type = STYPE_DISKTREE; + break; case 1005: + case 1006: + case 1007: return WERR_ACCESS_DENIED; + break; case 1501: fstrcpy(pathname, lp_pathname(snum)); fstrcpy(comment, lp_comment(snum)); @@ -1422,12 +1607,12 @@ WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S DEBUG(5,("_srv_net_share_add: %d\n", __LINE__)); - r_u->switch_value = 0; + r_u->parm_error = 0; get_current_user(&user,p); - if (user.uid != 0) { - DEBUG(10,("_srv_net_share_add: uid != 0. Access denied.\n")); + if (user.uid != sec_initial_uid()) { + DEBUG(10,("_srv_net_share_add: uid != sec_initial_uid(). Access denied.\n")); return WERR_ACCESS_DENIED; } @@ -1437,6 +1622,9 @@ WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S } switch (q_u->info_level) { + case 0: + /* No path. Not enough info in a level 0 to do anything. */ + return WERR_ACCESS_DENIED; case 1: /* Not enough info in a level 1 to do anything. */ return WERR_ACCESS_DENIED; @@ -1446,6 +1634,9 @@ WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S unistr2_to_ascii(pathname, &q_u->info.share.info2.info_2_str.uni_path, sizeof(share_name)); type = q_u->info.share.info2.info_2.type; break; + case 501: + /* No path. Not enough info in a level 501 to do anything. */ + return WERR_ACCESS_DENIED; case 502: unistr2_to_ascii(share_name, &q_u->info.share.info502.info_502_str.uni_netname, sizeof(share_name)); unistr2_to_ascii(comment, &q_u->info.share.info502.info_502_str.uni_remark, sizeof(share_name)); @@ -1454,7 +1645,16 @@ WERROR _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S psd = q_u->info.share.info502.info_502_str.sd; map_generic_share_sd_bits(psd); break; + + /* none of the following contain share names. NetShareAdd does not have a separate parameter for the share name */ + + case 1004: case 1005: + case 1006: + case 1007: + return WERR_ACCESS_DENIED; + break; + case 1501: /* DFS only level. */ return WERR_ACCESS_DENIED; default: @@ -1544,7 +1744,7 @@ WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S get_current_user(&user,p); - if (user.uid != 0) + if (user.uid != sec_initial_uid()) return WERR_ACCESS_DENIED; if (!lp_delete_share_cmd() || !*lp_delete_share_cmd()) @@ -1570,6 +1770,13 @@ WERROR _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S return WERR_OK; } +WERROR _srv_net_share_del_sticky(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u) +{ + DEBUG(5,("_srv_net_share_del_stick: %d\n", __LINE__)); + + return _srv_net_share_del(p, q_u, r_u); +} + /******************************************************************* time of day ********************************************************************/ @@ -1703,7 +1910,7 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC close_cnum(conn, user.vuid); return r_u->status; - error_exit: +error_exit: if(fsp) { close_file(fsp, True); @@ -1799,7 +2006,7 @@ WERROR _srv_net_file_set_secdesc(pipes_struct *p, SRV_Q_NET_FILE_SET_SECDESC *q_ close_cnum(conn, user.vuid); return r_u->status; - error_exit: +error_exit: if(fsp) { close_file(fsp, True); @@ -1864,6 +2071,7 @@ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D { uint32 i; const char *disk_name; + TALLOC_CTX *ctx = p->mem_ctx; uint32 resume=get_enum_hnd(&q_u->enum_hnd); r_u->status=WERR_OK; @@ -1872,6 +2080,18 @@ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D r_u->disk_enum_ctr.unknown = 0; + { + DISK_INFO *dinfo; + + int dinfo_size = MAX_SERVER_DISK_ENTRIES * sizeof(*dinfo); + + if(!(dinfo = talloc(ctx, dinfo_size))) { + + } + + r_u->disk_enum_ctr.disk_info = dinfo; + } + r_u->disk_enum_ctr.disk_info_ptr = r_u->disk_enum_ctr.disk_info ? 1 : 0; /*allow one DISK_INFO for null terminator*/ @@ -1885,7 +2105,7 @@ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D init_unistr3(&r_u->disk_enum_ctr.disk_info[i].disk_name, disk_name); } - /*add a terminating null string. Is this there if there is more data to come?*/ + /* add a terminating null string. Is this there if there is more data to come? */ r_u->disk_enum_ctr.entries_read++; From 9423ac9b4f3731faf92c9a688a043f04742b4eb1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 02:17:57 +0000 Subject: [PATCH 102/262] Clean this code up a little. If it's alrady asprintf()ed, I see no need for a manual strdup() too... (This used to be commit 71452365c8d9aa3d06b64716636a32bfebd3d4f8) --- source3/utils/net_rpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 120916d7b43..a13a8c5e22a 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1605,8 +1605,7 @@ static int rpc_trustdom_establish(int argc, const char **argv) asprintf(&acct_name, "%s$", lp_workgroup()); strupper(acct_name); - opt_user_name = (char*)malloc(strlen(acct_name) + 1); - safe_strcpy(opt_user_name, acct_name, strlen(acct_name) + 1); + opt_user_name = acct_name; /* find the domain controller */ if (!net_find_dc(&server_ip, pdc_name, domain_name)) { @@ -1708,6 +1707,8 @@ static int rpc_trustdom_establish(int argc, const char **argv) } + + /* There should be actually query info level 3 (following nt serv behaviour), but I still don't know if it's _really_ necessary */ From 74d235ff1a08f931a85f7715526344d0e08ccfd4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 02:20:15 +0000 Subject: [PATCH 103/262] It seems I didn't need to write a dup2() wrapper - as we already use it a lot. But as thats done, we might as well use it anyway. Andrew Bartlett (This used to be commit d78cce806d967d0442b153242ba2061f1b14b6b6) --- source3/lib/smbrun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c index 67f82ed0ad4..592543bc43b 100644 --- a/source3/lib/smbrun.c +++ b/source3/lib/smbrun.c @@ -143,7 +143,7 @@ int smbrun(char *cmd, int *outfd) /* point our stdout at the file we want output to go into */ if (outfd) { close(1); - if (dup2(*outfd,1) != 1) { + if (sys_dup2(*outfd,1) != 1) { DEBUG(2,("Failed to create stdout file descriptor\n")); close(*outfd); exit(80); From e39b6dbff3464f621d40d53e03f5f5e3abf5162a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 02:23:22 +0000 Subject: [PATCH 104/262] Another item off my long-term todo list: Remove the n^2 search for valid 'tty' names from the sesion code when we don't actually need it. Its main value is in getting 'well behaved' numbers for use with utmp, so when we are not doing utmp we don't need this to get in the way. Andrew Bartlett (This used to be commit 50507e131dac19485a2561f3448da7334e357f50) --- source3/include/local.h | 14 ++++++++- source3/include/smb.h | 4 +-- source3/smbd/session.c | 70 +++++++++++++++++++++++++++-------------- 3 files changed, 62 insertions(+), 26 deletions(-) diff --git a/source3/include/local.h b/source3/include/local.h index 24f3fa77246..2538715c412 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -187,8 +187,20 @@ than 62*62 for the current code */ #define MAX_SESSION_ID 3000 +/* For the benifit of PAM and the 'session exec' scripts, we fake up a terminal + name. This can be in one of two forms: The first for systems not using + utmp (and therefore not constrained as to length or the need for a number + < 3000 or so) and the second for systems with this 'well behaved terminal + like name' constraint. +*/ + #ifndef SESSION_TEMPLATE -#define SESSION_TEMPLATE "smb/%d" +/* Paramaters are 'pid' and 'vuid' */ +#define SESSION_TEMPLATE "smb/%lu/%d" +#endif + +#ifndef SESSION_UTMP_TEMPLATE +#define SESSION_UTMP_TEMPLATE "smb/%d" #endif /* the maximum age in seconds of a password. Should be a lp_ parameter */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 636e4ab00c4..c48c81e6e43 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1594,8 +1594,8 @@ typedef struct user_struct uint8 session_key[16]; - int session_id; /* used by utmp and pam session code */ - + char *session_keystr; /* used by utmp and pam session code. + TDB key string */ int homes_snum; } user_struct; diff --git a/source3/smbd/session.c b/source3/smbd/session.c index dade953ec1a..f7ade5570c3 100644 --- a/source3/smbd/session.c +++ b/source3/smbd/session.c @@ -33,15 +33,18 @@ static TDB_CONTEXT *tdb; /* called when a session is created */ BOOL session_claim(user_struct *vuser) { - int i; + int i = 0; TDB_DATA data; struct sessionid sessionid; uint32 pid = (uint32)sys_getpid(); TDB_DATA key; fstring keystr; char * hostname; + int tdb_store_flag; /* If using utmp, we do an inital 'lock hold' store, + but we don't need this if we are just using the + (unique) pid/vuid combination */ - vuser->session_id = 0; + vuser->session_keystr = NULL; /* don't register sessions for the guest user - its just too expensive to go through pam session code for browsing etc */ @@ -63,18 +66,37 @@ BOOL session_claim(user_struct *vuser) data.dptr = NULL; data.dsize = 0; - for (i=1;ivuid); + slprintf(sessionid.id_str, sizeof(sessionid.id_str)-1, + SESSION_TEMPLATE, (long unsigned int)sys_getpid(), + vuser->vuid); + key.dptr = keystr; key.dsize = strlen(keystr)+1; - - if (tdb_store(tdb, key, data, TDB_INSERT) == 0) break; - } - - if (i == MAX_SESSION_ID) { - DEBUG(1,("session_claim: out of session IDs (max is %d)\n", - MAX_SESSION_ID)); - return False; + + tdb_store_flag = TDB_REPLACE; } /* If 'hostname lookup' == yes, then do the DNS lookup. This is @@ -90,8 +112,7 @@ BOOL session_claim(user_struct *vuser) fstrcpy(sessionid.username, vuser->user.unix_name); fstrcpy(sessionid.hostname, hostname); - slprintf(sessionid.id_str, sizeof(sessionid.id_str)-1, SESSION_TEMPLATE, i); - sessionid.id_num = i; + sessionid.id_num = i; /* Only valid for utmp sessions */ sessionid.pid = pid; sessionid.uid = vuser->uid; sessionid.gid = vuser->gid; @@ -101,13 +122,15 @@ BOOL session_claim(user_struct *vuser) if (!smb_pam_claim_session(sessionid.username, sessionid.id_str, sessionid.hostname)) { DEBUG(1,("pam_session rejected the session for %s [%s]\n", sessionid.username, sessionid.id_str)); - tdb_delete(tdb, key); + if (tdb_store_flag == TDB_MODIFY) { + tdb_delete(tdb, key); + } return False; } data.dptr = (char *)&sessionid; data.dsize = sizeof(sessionid); - if (tdb_store(tdb, key, data, TDB_MODIFY) != 0) { + if (tdb_store(tdb, key, data, tdb_store_flag) != 0) { DEBUG(1,("session_claim: unable to create session id record\n")); return False; } @@ -119,7 +142,11 @@ BOOL session_claim(user_struct *vuser) } #endif - vuser->session_id = i; + vuser->session_keystr = strdup(keystr); + if (!vuser->session_keystr) { + DEBUG(0, ("session_claim: strdup() failed for session_keystr\n")); + return False; + } return True; } @@ -129,18 +156,15 @@ void session_yield(user_struct *vuser) TDB_DATA dbuf; struct sessionid sessionid; TDB_DATA key; - fstring keystr; if (!tdb) return; - if (vuser->session_id == 0) { + if (!vuser->session_keystr) { return; } - slprintf(keystr, sizeof(keystr)-1, "ID/%d", vuser->session_id); - - key.dptr = keystr; - key.dsize = strlen(keystr)+1; + key.dptr = vuser->session_keystr; + key.dsize = strlen(vuser->session_keystr)+1; dbuf = tdb_fetch(tdb, key); From 46d8c28ab6a66a50850de9dc9627fc37d30dc455 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 02:36:16 +0000 Subject: [PATCH 105/262] Warn about n^2 algorithm with utmp=yes. Andrew Bartlett (This used to be commit 70929a970e7ca0488a6c9ed8664a6857d86349eb) --- docs/docbook/manpages/smb.conf.5.sgml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 641e36f57ac..a9567b8b253 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -7570,6 +7570,12 @@ connection is made to a Samba server. Sites may use this to record the user connecting to a Samba share. + Due to the requirements of the utmp record, we + are required to create a unique identifier for the + incoming user. Enabling this option creates an n^2 + algorithm to find this number. This may impede + performance on large installations. + See also the utmp directory parameter. From 86b7abe54cff1aa3494656f7f3f547f2747e4fce Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 03:41:50 +0000 Subject: [PATCH 106/262] Fix a missing 'no memory' return in last night's svrsvc code, and use sys_dup2() in a couple more places. Andrew Bartlett (This used to be commit e69b476626c802b1e1920f241733d0dd6d06a06e) --- source3/rpc_server/srv_srvsvc_nt.c | 2 +- source3/smbd/chgpasswd.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c index b68dcce6726..5c1038949b5 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -2086,7 +2086,7 @@ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D int dinfo_size = MAX_SERVER_DISK_ENTRIES * sizeof(*dinfo); if(!(dinfo = talloc(ctx, dinfo_size))) { - + return WERR_NOMEM; } r_u->disk_enum_ctr.disk_info = dinfo; diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 68871deb90c..094b4683e41 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -167,17 +167,17 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass, /* Make slave stdin/out/err of child. */ - if (dup2(slave, STDIN_FILENO) != STDIN_FILENO) + if (sys_dup2(slave, STDIN_FILENO) != STDIN_FILENO) { DEBUG(3, ("Could not re-direct stdin\n")); return (False); } - if (dup2(slave, STDOUT_FILENO) != STDOUT_FILENO) + if (sys_dup2(slave, STDOUT_FILENO) != STDOUT_FILENO) { DEBUG(3, ("Could not re-direct stdout\n")); return (False); } - if (dup2(slave, STDERR_FILENO) != STDERR_FILENO) + if (sys_dup2(slave, STDERR_FILENO) != STDERR_FILENO) { DEBUG(3, ("Could not re-direct stderr\n")); return (False); From 5db291d1abf4294c531d1d4a3c40060ac925230d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 05:45:48 +0000 Subject: [PATCH 107/262] fixed typo samba-patches 970 (This used to be commit f3a0842e3020ddb9a710252a0bd51c2a01636695) --- docs/docbook/projdoc/Samba-PDC-HOWTO.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docbook/projdoc/Samba-PDC-HOWTO.sgml b/docs/docbook/projdoc/Samba-PDC-HOWTO.sgml index 475b66598c2..5b21e0a535f 100644 --- a/docs/docbook/projdoc/Samba-PDC-HOWTO.sgml +++ b/docs/docbook/projdoc/Samba-PDC-HOWTO.sgml @@ -1652,7 +1652,7 @@ I think this is all bogus, but have not deleted it. (Richard Sharpe) -The default logon path is \\%N\U%. NT Workstation will attempt to create +The default logon path is \\%N\%U. NT Workstation will attempt to create a directory "\\samba-server\username.PDS" if you specify the logon path as "\\samba-server\username" with the NT User Manager. Therefore, you will need to specify (for example) "\\samba-server\username\profile". From e95e731fee89bc711859e19d925c8e248281a54d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 05:50:57 +0000 Subject: [PATCH 108/262] fixed logfile location to honor configure samba-patches 966 (This used to be commit 06d8549196ff1482be94c08c7a742896ae35fd88) --- source3/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index 765b22a7736..77ca5d0294e 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -52,7 +52,7 @@ INSTALLPERMS = 0755 # set these to where to find various files # These can be overridden by command line switches (see smbd(8)) # or in smb.conf (see smb.conf(5)) -LOGFILEBASE = $(VARDIR) +LOGFILEBASE = @logfilebase@ CONFIGFILE = $(LIBDIR)/smb.conf LMHOSTSFILE = $(LIBDIR)/lmhosts DRIVERFILE = $(LIBDIR)/printers.def From 03e9a50305ed14e580c26cbe1fb53d3f7784e9da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 05:57:23 +0000 Subject: [PATCH 109/262] fixed man install samba-patches 961 (This used to be commit 935996e1c7e742da5961e0eaaf4b3cf5a40b9547) --- source3/script/installman.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 2329ed5425c..5b6bba69edb 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -22,8 +22,8 @@ for lang in $langs; do echo Installing \"$lang\" man pages in $MANDIR/lang/$lang fi - langdir=$MANDIR/lang/$lang - for d in $MANDIR $MANDIR/lang $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do + langdir=$MANDIR/$lang + for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then From a5216d2340095ecd71fc8f039ac3bb03b9e61665 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 06:04:32 +0000 Subject: [PATCH 110/262] partial apply of samba-patches 960 (This used to be commit a302e31519e0935f820dfe3555ec6d3473d89694) --- source3/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index 77ca5d0294e..7f23d11e40e 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -110,7 +110,7 @@ TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest \ SHLIBS = @LIBSMBCLIENT@ SCRIPTS = $(srcdir)/script/smbtar $(srcdir)/script/addtosmbpass $(srcdir)/script/convert_smbpasswd \ - $(srcdir)/script/findsmb + $(builddir)/script/findsmb QUOTAOBJS=@QUOTAOBJS@ From c4fcf56380739cc58a2096aefe587bee50fde27d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 06:08:30 +0000 Subject: [PATCH 111/262] good security patch from Timothy.Sell@unisys.com we could generate short passwords! samba-patches 880 (This used to be commit 1466acba7e18f5ce733b376d031f1596a1a674d8) --- source3/lib/genrand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/genrand.c b/source3/lib/genrand.c index ee8bc0b1d5a..fe756169a66 100644 --- a/source3/lib/genrand.c +++ b/source3/lib/genrand.c @@ -259,7 +259,7 @@ char *generate_random_str(size_t len) len = sizeof(retstr) -1; generate_random_buffer( retstr, len, False); for (i = 0; i < len; i++) - retstr[i] = c_list[ retstr[i] % sizeof(c_list) ]; + retstr[i] = c_list[ retstr[i] % (sizeof(c_list)-1) ]; retstr[i] = '\0'; From ed9a219c8719063898c9b39ade0ba1b10739db98 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 06:19:14 +0000 Subject: [PATCH 112/262] fix minor nits in nmbd from adtam@cup.hp.com samba-patches 959 (This used to be commit ef04261e2510b658322336ce841b01f1c903eee2) --- source3/nmbd/nmbd_mynames.c | 2 +- source3/nmbd/nmbd_nameregister.c | 22 +++++++++++----------- source3/nmbd/nmbd_packets.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c index 345245c57d0..ba7d509a77f 100644 --- a/source3/nmbd/nmbd_mynames.c +++ b/source3/nmbd/nmbd_mynames.c @@ -225,7 +225,7 @@ void refresh_my_names(time_t t) wins_refresh_name(namerec); } namerec->data.death_time = t + lp_max_ttl(); - namerec->data.refresh_time = t + MIN(lp_max_ttl(), MAX_REFRESH_TIME); + namerec->data.refresh_time = t + MIN(lp_max_ttl()/2, MAX_REFRESH_TIME); } } } diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c index 4ac5473d4ae..b6d3c20d995 100644 --- a/source3/nmbd/nmbd_nameregister.c +++ b/source3/nmbd/nmbd_nameregister.c @@ -106,17 +106,7 @@ static void register_name_response(struct subnet_record *subrec, success = False; } else { /* Unicast - check to see if the response allows us to have the name. */ - if(nmb->header.rcode != 0) { - /* Error code - we didn't get the name. */ - success = False; - - DEBUG(0,("register_name_response: %sserver at IP %s rejected our name registration of %s IP %s with error code %d.\n", - subrec==unicast_subnet?"WINS ":"", - inet_ntoa(p->ip), - nmb_namestr(answer_name), - reg_name, - nmb->header.rcode)); - } else if (nmb->header.opcode == NMB_WACK_OPCODE) { + if (nmb->header.opcode == NMB_WACK_OPCODE) { /* WINS server is telling us to wait. Pretend we didn't get the response but don't send out any more register requests. */ @@ -128,6 +118,16 @@ static void register_name_response(struct subnet_record *subrec, rrec->repeat_time = p->timestamp + nmb->answers->ttl; rrec->num_msgs--; return; + } else if (nmb->header.rcode != 0) { + /* Error code - we didn't get the name. */ + success = False; + + DEBUG(0,("register_name_response: %sserver at IP %s rejected our name registration of %s IP %s with error code %d.\n", + subrec==unicast_subnet?"WINS ":"", + inet_ntoa(p->ip), + nmb_namestr(answer_name), + reg_name, + nmb->header.rcode)); } else { success = True; /* Get the data we need to pass to the success function. */ diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index a20ebf16fde..4bd949f5a3e 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1670,7 +1670,7 @@ void retransmit_or_expire_response_records(time_t t) to IP %s on subnet %s\n", rrec->response_id, inet_ntoa(rrec->packet->ip), subrec->subnet_name)); } - rrec->repeat_time += rrec->repeat_interval; + rrec->repeat_time = t + rrec->repeat_interval; rrec->repeat_count--; } else From 4b68935a519955f7cda9b874220fdbd037a5b0c0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 06:26:41 +0000 Subject: [PATCH 113/262] make sure async dns nmbd child dies samba-patches 898 (This used to be commit a954f72fe315ec59bfeb4bd407179bc54689440f) --- source3/nmbd/asyncdns.c | 1 + source3/nmbd/nmbd.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c index 6c2f8de3b18..c86ee69a097 100644 --- a/source3/nmbd/asyncdns.c +++ b/source3/nmbd/asyncdns.c @@ -122,6 +122,7 @@ void kill_async_dns_child(void) { if (child_pid > 0) { kill(child_pid, SIGTERM); + child_pid = -1; } } diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index d30efb550ce..3a0dabe8d71 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -861,8 +861,10 @@ static void usage(char *pname) DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) ); - if ( !open_sockets( is_daemon, global_nmb_port ) ) + if ( !open_sockets( is_daemon, global_nmb_port ) ) { + kill_async_dns_child(); return 1; + } /* Determine all the IP addresses we have. */ load_interfaces(); @@ -871,6 +873,7 @@ static void usage(char *pname) if( False == create_subnets() ) { DEBUG(0,("ERROR: Failed when creating subnet lists. Exiting.\n")); + kill_async_dns_child(); exit(1); } @@ -882,6 +885,7 @@ static void usage(char *pname) if( !initialise_wins() ) { DEBUG( 0, ( "nmbd: Failed when initialising WINS server.\n" ) ); + kill_async_dns_child(); exit(1); } @@ -896,6 +900,7 @@ static void usage(char *pname) if( False == register_my_workgroup_and_names() ) { DEBUG(0,("ERROR: Failed when creating my my workgroup. Exiting.\n")); + kill_async_dns_child(); exit(1); } @@ -906,5 +911,6 @@ static void usage(char *pname) if (dbf) x_fclose(dbf); + kill_async_dns_child(); return(0); } From 5b5208a0b86c0c3d745f7a9694b4096a6b26043b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 06:43:03 +0000 Subject: [PATCH 114/262] Add the ability to set account policies too. Andrew Bartlett (This used to be commit 2bf6edf78b64335bf10c10c893d6e8fa0fac708b) --- source3/utils/pdbedit.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 4f67cf7ab75..76c0196cf95 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -417,6 +417,8 @@ int main (int argc, char **argv) static char *config_file = dyn_CONFIGFILE; static char *new_debuglevel = NULL; static char *account_policy = NULL; + static long int account_policy_value = 0; + BOOL account_policy_value_set = False; struct pdb_context *in; poptContext pc; @@ -436,10 +438,10 @@ int main (int argc, char **argv) {"delete", 'x',POPT_ARG_VAL,&delete_user,1,"delete user",NULL}, {"import", 'i',POPT_ARG_STRING,&backend_in,0,"use different passdb backend",NULL}, {"export", 'e',POPT_ARG_STRING,&backend_out,0,"export user accounts to backend", NULL}, - {"debuglevel",'D', POPT_ARG_STRING, &new_debuglevel,0,"set debuglevel",NULL}, - {"configfile",'c',POPT_ARG_STRING, &config_file,0,"use different configuration file",NULL}, - {"account-policy-get",'P',POPT_ARG_STRING, &account_policy,0,"get the value of an account policy (like maximum password age)",NULL}, - + {"debuglevel", 'D',POPT_ARG_STRING, &new_debuglevel,0,"set debuglevel",NULL}, + {"configfile", 'c',POPT_ARG_STRING, &config_file,0,"use different configuration file",NULL}, + {"account-policy",'P',POPT_ARG_STRING, &account_policy,0,"value of an account policy (like maximum password age)",NULL}, + {"value", 'V',POPT_ARG_LONG, &account_policy_value,'V',"set the account policy to this value", NULL}, {0,0,0,0} }; @@ -448,7 +450,13 @@ int main (int argc, char **argv) pc = poptGetContext(NULL, argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); - while((opt = poptGetNextOpt(pc)) != -1); + while((opt = poptGetNextOpt(pc)) != -1) { + switch (opt) { + case 'V': + account_policy_value_set = True; + break; + } + } if (new_debuglevel){ debug_parse_levels(new_debuglevel); @@ -480,8 +488,18 @@ int main (int argc, char **argv) fprintf(stderr, "valid account policy, but unable to fetch value!\n"); exit(1); } - printf("account policy value for %s is %u\n", account_policy, value); - exit(0); + if (account_policy_value_set) { + printf("account policy value for %s was %u\n", account_policy, value); + if (!account_policy_set(field, account_policy_value)){ + fprintf(stderr, "valid account policy, but unable to set value!\n"); + exit(1); + } + printf("account policy value for %s is now %lu\n", account_policy, account_policy_value); + exit(0); + } else { + printf("account policy value for %s is %u\n", account_policy, value); + exit(0); + } } if (!backend_in) { From c76ab193dcc3285ce13ab2abcbcfce172874df70 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 07:15:42 +0000 Subject: [PATCH 115/262] this is an interim fix for nmbd not registering DOMAIN#1b with WINS when a PDC. The fix does not iterate over all WINS tags, which it should do, but after having looked at doing that it gets *very* messy to do with our current code base. (This used to be commit 434e5124db28134ebfc9840cf0839d77987db65e) --- source3/nmbd/nmbd_packets.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 4bd949f5a3e..105fb60e99c 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -705,14 +705,33 @@ struct response_record *queue_query_name( struct subnet_record *subrec, { struct packet_struct *p; struct response_record *rrec; + struct in_addr to_ip; if(assert_check_subnet(subrec)) return NULL; + to_ip = subrec->bcast_ip; + + /* queries to the WINS server turn up here as queries to IP 0.0.0.0 + These need to be handled a bit differently */ + if (subrec->type == UNICAST_SUBNET && is_zero_ip(to_ip)) { + /* what we really need to do is loop over each of our wins + * servers and wins server tags here, but that just doesn't + * fit our architecture at the moment (userdata may already + * be used when we get here). For now we just query the first + * active wins server on the first tag. */ + char **tags = wins_srv_tags(); + if (!tags) { + return NULL; + } + to_ip = wins_srv_ip_tag(tags[0], to_ip); + wins_srv_tags_free(tags); + } + if(( p = create_and_init_netbios_packet(nmbname, (subrec != unicast_subnet), (subrec == unicast_subnet), - subrec->bcast_ip)) == NULL) + to_ip)) == NULL) return NULL; if(lp_bind_interfaces_only()) { From 80c39a9c1fd70ff80afb7d500137db597df19426 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 07:53:14 +0000 Subject: [PATCH 116/262] fix for smbtar filename matching samba-patches 852 (This used to be commit e2558baa32657a71fd7e0958446f72e373cfadc9) --- source3/client/clitar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 43b0ef44bc7..c453cfbb548 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -492,7 +492,7 @@ static int strslashcmp(char *s1, char *s2) if (!*s2 && (*s1 == '/' || *s1 == '\\') && !*(s1+1)) return 0; /* check for s1 is an "initial" string of s2 */ - if (*s2 == '/' || *s2 == '\\') return 0; + if ((*s2 == '/' || *s2 == '\\') && !*s1) return 0; return *s1-*s2; } From 24d71da71d107c16c0d322b9c9f7b0073841c9f4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 08:04:31 +0000 Subject: [PATCH 117/262] minor portability fix samba-patches 820 (This used to be commit ea0a12fb60791553109f732079d971987538abd6) --- source3/smbd/chgpasswd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index 094b4683e41..9e593b022ef 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -196,7 +196,9 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass, } stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); stermios.c_lflag |= ICANON; +#ifdef ONLCR stermios.c_oflag &= ~(ONLCR); +#endif if (tcsetattr(0, TCSANOW, &stermios) < 0) { DEBUG(3, ("could not set attributes of pty\n")); From 551d50c4e2bdde0b4f92001c92f8f69ffade44ad Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 28 Jul 2002 08:14:17 +0000 Subject: [PATCH 118/262] This patch does two things: The first is to add sensible quotes to various default paramaters, and the second is to ensure that we don't remove to many " characters from paramaters. (Both from the debian patches to Samba). Andrew Bartlett (This used to be commit 03892bcfbb566f866fa8943dc42b844d833690f4) --- source3/param/loadparm.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 6f976cda645..445663f5474 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1060,26 +1060,26 @@ static void init_printer_values(void) case PRINT_AIX: case PRINT_LPRNT: case PRINT_LPROS2: - string_set(&sDefault.szLpqcommand, "lpq -P%p"); - string_set(&sDefault.szLprmcommand, "lprm -P%p %j"); + string_set(&sDefault.szLpqcommand, "lpq -P'%p'"); + string_set(&sDefault.szLprmcommand, "lprm -P'%p' %j"); string_set(&sDefault.szPrintcommand, - "lpr -r -P%p %s"); + "lpr -r -P'%p' %s"); break; case PRINT_LPRNG: case PRINT_PLP: - string_set(&sDefault.szLpqcommand, "lpq -P%p"); - string_set(&sDefault.szLprmcommand, "lprm -P%p %j"); + string_set(&sDefault.szLpqcommand, "lpq -P'%p'"); + string_set(&sDefault.szLprmcommand, "lprm -P'%p' %j"); string_set(&sDefault.szPrintcommand, - "lpr -r -P%p %s"); + "lpr -r -P'%p' %s"); string_set(&sDefault.szQueuepausecommand, - "lpc stop %p"); + "lpc stop '%p'"); string_set(&sDefault.szQueueresumecommand, - "lpc start %p"); + "lpc start '%p'"); string_set(&sDefault.szLppausecommand, - "lpc hold %p %j"); + "lpc hold '%p' %j"); string_set(&sDefault.szLpresumecommand, - "lpc release %p %j"); + "lpc release '%p' %j"); break; case PRINT_CUPS: @@ -1095,19 +1095,19 @@ static void init_printer_values(void) string_set(&Globals.szPrintcapname, "cups"); #else string_set(&sDefault.szLpqcommand, - "/usr/bin/lpstat -o %p"); + "/usr/bin/lpstat -o '%p'"); string_set(&sDefault.szLprmcommand, - "/usr/bin/cancel %p-%j"); + "/usr/bin/cancel '%p-%j'"); string_set(&sDefault.szPrintcommand, - "/usr/bin/lp -d %p %s; rm %s"); + "/usr/bin/lp -d '%p' %s; rm %s"); string_set(&sDefault.szLppausecommand, - "lp -i %p-%j -H hold"); + "lp -i '%p-%j' -H hold"); string_set(&sDefault.szLpresumecommand, - "lp -i %p-%j -H resume"); + "lp -i '%p-%j' -H resume"); string_set(&sDefault.szQueuepausecommand, - "/usr/bin/disable %p"); + "/usr/bin/disable '%p'"); string_set(&sDefault.szQueueresumecommand, - "/usr/bin/enable %p"); + "/usr/bin/enable '%p'"); string_set(&Globals.szPrintcapname, "lpstat"); #endif /* HAVE_CUPS */ break; @@ -1413,7 +1413,10 @@ static char *lp_string(const char *s) else StrnCpy(ret, s, len); - trim_string(ret, "\"", "\""); + if (trim_string(ret, "\"", "\"")) { + if (strchr(ret,'"') != NULL) + StrnCpy(ret, s, len); + } standard_sub_basic(current_user_info.smb_name,ret,len+100); return (ret); From a4ec4acd61d58bca9c1f6d474ab16265e4113f7a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 28 Jul 2002 18:10:39 +0000 Subject: [PATCH 119/262] found nasty bug in intl/lang_tdb.c tdb structure was not tested to not be null before close this one fixes swat not working with browsers that set more then one language. along the way implemented language priority in web/neg_lang.c with bubble sort also changet str_list_make to be able to use a different separator string Simo. (This used to be commit 69765e4faa8aaae74c97afc917891fc72d80703d) --- source3/auth/auth.c | 14 +++++----- source3/intl/lang_tdb.c | 6 ++-- source3/lib/debug.c | 2 +- source3/lib/username.c | 2 +- source3/lib/util_str.c | 5 ++-- source3/param/loadparm.c | 4 +-- source3/passdb/pdb_interface.c | 2 +- source3/smbd/password.c | 2 +- source3/web/neg_lang.c | 50 ++++++++++++++++++++++++++++++---- source3/wrepld/process.c | 2 +- 10 files changed, 66 insertions(+), 23 deletions(-) diff --git a/source3/auth/auth.c b/source3/auth/auth.c index 4f7a5c24a00..dca9c6c3c48 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -395,33 +395,33 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) { case SEC_DOMAIN: DEBUG(5,("Making default auth method list for security=domain\n")); - auth_method_list = str_list_make("guest sam ntdomain"); + auth_method_list = str_list_make("guest sam ntdomain", NULL); break; case SEC_SERVER: DEBUG(5,("Making default auth method list for security=server\n")); - auth_method_list = str_list_make("guest sam smbserver"); + auth_method_list = str_list_make("guest sam smbserver", NULL); break; case SEC_USER: if (lp_encrypted_passwords()) { DEBUG(5,("Making default auth method list for security=user, encrypt passwords = yes\n")); - auth_method_list = str_list_make("guest sam"); + auth_method_list = str_list_make("guest sam", NULL); } else { DEBUG(5,("Making default auth method list for security=user, encrypt passwords = no\n")); - auth_method_list = str_list_make("guest unix"); + auth_method_list = str_list_make("guest unix", NULL); } break; case SEC_SHARE: if (lp_encrypted_passwords()) { DEBUG(5,("Making default auth method list for security=share, encrypt passwords = yes\n")); - auth_method_list = str_list_make("guest sam"); + auth_method_list = str_list_make("guest sam", NULL); } else { DEBUG(5,("Making default auth method list for security=share, encrypt passwords = no\n")); - auth_method_list = str_list_make("guest unix"); + auth_method_list = str_list_make("guest unix", NULL); } break; case SEC_ADS: DEBUG(5,("Making default auth method list for security=ADS\n")); - auth_method_list = str_list_make("guest sam ads ntdomain"); + auth_method_list = str_list_make("guest sam ads ntdomain", NULL); break; default: DEBUG(5,("Unknown auth method!\n")); diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index d5e8bd41bd5..a86ea0a3f9a 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -106,8 +106,10 @@ BOOL lang_tdb_init(const char *lang) if (initialised) { /* we are re-initialising, free up any old init */ - tdb_close(tdb); - tdb = NULL; + if (tdb) { + tdb_close(tdb); + tdb = NULL; + } SAFE_FREE(current_lang); } diff --git a/source3/lib/debug.c b/source3/lib/debug.c index be5f66a562a..842d2dac1d6 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -423,7 +423,7 @@ BOOL debug_parse_levels(const char *params_str) if (AllowDebugChange == False) return True; - params = str_list_make(params_str); + params = str_list_make(params_str, NULL); if (debug_parse_params(params, DEBUGLEVEL_CLASS, DEBUGLEVEL_CLASS_ISSET)) diff --git a/source3/lib/username.c b/source3/lib/username.c index 4813c8fd194..5db7f58b1e2 100644 --- a/source3/lib/username.c +++ b/source3/lib/username.c @@ -163,7 +163,7 @@ BOOL map_username(char *user) } } - dosuserlist = str_list_make(dosname); + dosuserlist = str_list_make(dosname, NULL); if (!dosuserlist) { DEBUG(0,("Unable to build user list\n")); return False; diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 7e974269ece..9dc80c89dbc 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -1125,7 +1125,7 @@ some platforms don't have strnlen #define S_LIST_ABS 16 /* List Allocation Block Size */ -char **str_list_make(const char *string) +char **str_list_make(const char *string, const char *sep) { char **list, **rlist; char *str, *s; @@ -1139,12 +1139,13 @@ char **str_list_make(const char *string) DEBUG(0,("str_list_make: Unable to allocate memory")); return NULL; } + if (!sep) sep = LIST_SEP; num = lsize = 0; list = NULL; str = s; - while (next_token(&str, tok, LIST_SEP, sizeof(tok))) { + while (next_token(&str, tok, sep, sizeof(tok))) { if (num == lsize) { lsize += S_LIST_ABS; rlist = (char **)Realloc(list, ((sizeof(char **)) * (lsize +1))); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 445663f5474..64542cd153d 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1194,7 +1194,7 @@ static void init_globals(void) string_set(&Globals.szSMBPasswdFile, dyn_SMB_PASSWD_FILE); string_set(&Globals.szPrivateDir, dyn_PRIVATE_DIR); - Globals.szPassdbBackend = str_list_make("smbpasswd unixsam"); + Globals.szPassdbBackend = str_list_make("smbpasswd unixsam", NULL); /* use the new 'hash2' method by default */ string_set(&Globals.szManglingMethod, "hash2"); @@ -2850,7 +2850,7 @@ BOOL lp_do_parameter(int snum, char *pszParmName, char *pszParmValue) break; case P_LIST: - *(char ***)parm_ptr = str_list_make(pszParmValue); + *(char ***)parm_ptr = str_list_make(pszParmValue, NULL); break; case P_STRING: diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 3b0f54b2b3a..daa3222c5a0 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -353,7 +353,7 @@ NTSTATUS make_pdb_context_list(struct pdb_context **context, char **selected) NTSTATUS make_pdb_context_string(struct pdb_context **context, const char *selected) { NTSTATUS ret; - char **newsel = str_list_make(selected); + char **newsel = str_list_make(selected, NULL); ret = make_pdb_context_list(context, newsel); str_list_free(&newsel); return ret; diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 391de02dea8..2558ffe1633 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -351,7 +351,7 @@ BOOL user_ok(const char *user,int snum) if (valid) str_list_free (&valid); if (ret && lp_onlyuser(snum)) { - char **user_list = str_list_make (lp_username(snum)); + char **user_list = str_list_make (lp_username(snum), NULL); if (user_list && str_list_substitute(user_list, "%S", lp_servicename(snum))) { ret = user_in_list(user, user_list); } diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c index 88bc5498e92..72dd70fd983 100644 --- a/source3/web/neg_lang.c +++ b/source3/web/neg_lang.c @@ -52,14 +52,54 @@ int web_open(const char *fname, int flags, mode_t mode) choose from a list of languages. The list can be comma or space separated Keep choosing until we get a hit + Changed to habdle priority -- Simo */ -void web_set_lang(const char *lang_list) +void web_set_lang(const char *lang_string) { - fstring lang; - char *p = (char *)lang_list; + char **lang_list, **count; + float *pri; + int lang_num, i; + + /* build the lang list */ + lang_list = str_list_make(lang_string, ", \t\r\n"); + if (!lang_list) return; - while (next_token(&p, lang, ", \t\r\n", sizeof(lang))) { - if (lang_tdb_init(lang)) return; + /* sort the list by priority */ + lang_num = 0; + count = lang_list; + while (*count && **count) { + count++; + lang_num++; + } + pri = (float *)malloc(sizeof(float) * lang_num); + for (i = 0; i < lang_num; i++) { + char *pri_code; + if ((pri_code=strstr(lang_list[i], ";q="))) { + *pri_code = '\0'; + pri_code += 3; + pri[i] = strtof(pri_code, NULL); + } else { + pri[i] = 1; + } + if (i != 0) { + int l; + for (l = i; l > 0; l--) { + if (pri[l] > pri[l-1]) { + char *tempc; + int tempf; + tempc = lang_list[l]; + tempf = pri[l]; + lang_list[l] = lang_list[l-1]; + pri[i] = pri[l-1]; + lang_list[l-1] = tempc; + pri[l-1] = tempf; + } + } + } + } + + for (i = 0; i < lang_num; i++) { + if (lang_tdb_init(lang_list[i])) return; } /* it's not an error to not initialise - we just fall back to diff --git a/source3/wrepld/process.c b/source3/wrepld/process.c index 7615b8c78a1..56013d2e175 100644 --- a/source3/wrepld/process.c +++ b/source3/wrepld/process.c @@ -152,7 +152,7 @@ initialise and fill the in-memory partner table. int init_wins_partner_table(void) { int i=1,j=0,k; - char **partner = str_list_make(lp_wins_partners()); + char **partner = str_list_make(lp_wins_partners(), NULL); if (partner==NULL) { DEBUG(0,("wrepld: no partner list in smb.conf, exiting\n")); From db789e9467e887dca2f4f205467b408287a0cc61 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 03:07:49 +0000 Subject: [PATCH 120/262] Updated patch. (This used to be commit b7bd0bf95380f5fae385bfd353999f40f72e3d06) --- source3/python/samba-head.patch | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/source3/python/samba-head.patch b/source3/python/samba-head.patch index 41b040d8f64..0f4ab146a88 100644 --- a/source3/python/samba-head.patch +++ b/source3/python/samba-head.patch @@ -1,19 +1,18 @@ Index: Makefile.in =================================================================== RCS file: /data/cvs/samba/source/Makefile.in,v -retrieving revision 1.494 -diff -u -r1.494 Makefile.in ---- Makefile.in 2002/07/03 07:37:50 1.494 -+++ Makefile.in 2002/07/11 23:18:11 -@@ -834,6 +834,46 @@ +retrieving revision 1.500 +diff -u -r1.500 Makefile.in +--- Makefile.in 2002/07/28 06:04:32 1.500 ++++ Makefile.in 2002/07/29 01:58:05 +@@ -838,6 +838,45 @@ -$(INSTALLCMD) -d ${prefix}/include -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include +# Python extensions + +PYTHON_OBJS = $(LIB_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) $(UBIQX_OBJ) \ -+ $(PARAM_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ -+ $(SECRETS_OBJ) ++ $(PARAM_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) + +PY_SPOOLSS_PROTO_OBJ = python/py_spoolss.o \ + python/py_spoolss_printers.o python/py_spoolss_printers_conv.o\ @@ -55,11 +54,11 @@ diff -u -r1.494 Makefile.in Index: configure.in =================================================================== RCS file: /data/cvs/samba/source/configure.in,v -retrieving revision 1.321 -diff -u -r1.321 configure.in ---- configure.in 2002/07/03 00:44:39 1.321 -+++ configure.in 2002/07/11 23:18:11 -@@ -2820,7 +2820,7 @@ +retrieving revision 1.324 +diff -u -r1.324 configure.in +--- configure.in 2002/07/27 01:37:32 1.324 ++++ configure.in 2002/07/29 01:58:06 +@@ -2797,7 +2797,7 @@ builddir=`pwd` AC_SUBST(builddir) From c74a8d72f9875ea34886cca6baa8a1cb3c7ad301 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 03:26:31 +0000 Subject: [PATCH 121/262] Merge from APPLIANCE_HEAD: >When creating an automatically generated prototype make sure the >destination directory exists. (This used to be commit 9ffca4824c9fa76ab288f59b4b57a3cdc99a93b8) --- source3/script/mkproto.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh index 4dbe4c204e7..2bf96c9b41d 100755 --- a/source3/script/mkproto.sh +++ b/source3/script/mkproto.sh @@ -29,6 +29,8 @@ proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep - echo creating $header +mkdir -p `dirname $header` + ${awk} $headeropt \ -f script/mkproto.awk $proto_src > $headertmp From 0872bc448686cad6e9e95d24fbf72fdad48ed5d3 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 03:50:35 +0000 Subject: [PATCH 122/262] Skeleton for a libsmb python wrapper. (This used to be commit 36cc488c4d99198d346103b0e44776a7de145428) --- source3/python/py_smb.c | 107 ++++++++++++++++++++++++++++++++ source3/python/py_smb.h | 42 +++++++++++++ source3/python/samba-head.patch | 6 +- source3/python/setup.py.in | 9 +++ 4 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 source3/python/py_smb.c create mode 100644 source3/python/py_smb.h diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c new file mode 100644 index 00000000000..c206e6ba9b4 --- /dev/null +++ b/source3/python/py_smb.c @@ -0,0 +1,107 @@ +/* + Python wrappers for DCERPC/SMB client routines. + + Copyright (C) Tim Potter, 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "python/py_smb.h" + +/* + * Exceptions raised by this module + */ + +PyObject *smb_ntstatus; /* This exception is raised when a RPC call + returns a status code other than + NT_STATUS_OK */ + + +/* + * Method dispatch tables + */ + +static PyMethodDef smb_methods[] = { + { NULL } +}; + +/* Create a new cli_state python object */ + +PyObject *new_cli_state_object(struct cli_state *cli) +{ + cli_state_object *o; + + o = PyObject_New(cli_state_object, &cli_state_type); + + o->cli = cli; + + return (PyObject*)o; +} + +static void py_cli_state_dealloc(PyObject* self) +{ + PyObject_Del(self); +} + +static PyObject *py_cli_state_getattr(PyObject *self, char *attrname) +{ + return Py_FindMethod(smb_methods, self, attrname); +} + +PyTypeObject cli_state_type = { + PyObject_HEAD_INIT(NULL) + 0, + "SMB client connection", + sizeof(cli_state_object), + 0, + py_cli_state_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + py_cli_state_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash */ +}; + +/* + * Module initialisation + */ + +void initsmb(void) +{ + PyObject *module, *dict; + + /* Initialise module */ + + module = Py_InitModule("smb", smb_methods); + dict = PyModule_GetDict(module); + + smb_ntstatus = PyErr_NewException("smb.ntstatus", NULL, NULL); + PyDict_SetItemString(dict, "ntstatus", smb_ntstatus); + + /* Initialise policy handle object */ + + cli_state_type.ob_type = &PyType_Type; + + /* Do samba initialisation */ + + py_samba_init(); + + setup_logging("smb", True); + DEBUGLEVEL = 10; +} diff --git a/source3/python/py_smb.h b/source3/python/py_smb.h new file mode 100644 index 00000000000..18677b49056 --- /dev/null +++ b/source3/python/py_smb.h @@ -0,0 +1,42 @@ +/* + Python wrappers for DCERPC/SMB client routines. + + Copyright (C) Tim Potter, 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _PY_SMB_H +#define _PY_SMB_H + +#include "includes.h" +#include "Python.h" + +#include "python/py_common_proto.h" + +/* cli_state handle object */ + +typedef struct { + PyObject_HEAD + struct cli_state *cli; +} cli_state_object; + +/* Exceptions raised by this module */ + +extern PyTypeObject cli_state_type; + +extern PyObject *smb_ntstatus; + +#endif /* _PY_SMB_H */ diff --git a/source3/python/samba-head.patch b/source3/python/samba-head.patch index 0f4ab146a88..a739346a5bb 100644 --- a/source3/python/samba-head.patch +++ b/source3/python/samba-head.patch @@ -4,7 +4,7 @@ RCS file: /data/cvs/samba/source/Makefile.in,v retrieving revision 1.500 diff -u -r1.500 Makefile.in --- Makefile.in 2002/07/28 06:04:32 1.500 -+++ Makefile.in 2002/07/29 01:58:05 ++++ Makefile.in 2002/07/29 03:48:03 @@ -838,6 +838,45 @@ -$(INSTALLCMD) -d ${prefix}/include -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include @@ -12,7 +12,7 @@ diff -u -r1.500 Makefile.in +# Python extensions + +PYTHON_OBJS = $(LIB_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) $(UBIQX_OBJ) \ -+ $(PARAM_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) ++ $(PARAM_OBJ) $(LIBMSRPC_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) + +PY_SPOOLSS_PROTO_OBJ = python/py_spoolss.o \ + python/py_spoolss_printers.o python/py_spoolss_printers_conv.o\ @@ -57,7 +57,7 @@ RCS file: /data/cvs/samba/source/configure.in,v retrieving revision 1.324 diff -u -r1.324 configure.in --- configure.in 2002/07/27 01:37:32 1.324 -+++ configure.in 2002/07/29 01:58:06 ++++ configure.in 2002/07/29 03:48:04 @@ -2797,7 +2797,7 @@ builddir=`pwd` AC_SUBST(builddir) diff --git a/source3/python/setup.py.in b/source3/python/setup.py.in index 0895e25c08c..c61ec2c2143 100755 --- a/source3/python/setup.py.in +++ b/source3/python/setup.py.in @@ -150,5 +150,14 @@ setup( library_dirs = ["/usr/kerberos/lib"], extra_objects = obj_list), + # libsmb module + + Extension(name = "smb", + sources = [samba_srcdir + "python/py_smb.c", + samba_srcdir + "python/py_common.c"], + libraries = lib_list, + library_dirs = ["/usr/kerberos/lib"], + extra_objects = obj_list), + ], ) From 9b031d83783d7211de8f6fa03232eec8e9fa39d2 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 29 Jul 2002 07:57:48 +0000 Subject: [PATCH 123/262] people should be happier now. changed strtof with sscanf to make things working on all platforms. changed auto-made bubble sort for more efficient and clean qsort() (This used to be commit 61294d74b20741d683b8955d75d44eef00f94a0e) --- source3/web/neg_lang.c | 56 +++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c index 72dd70fd983..da974f78a4a 100644 --- a/source3/web/neg_lang.c +++ b/source3/web/neg_lang.c @@ -48,16 +48,30 @@ int web_open(const char *fname, int flags, mode_t mode) } +struct pri_list { + float pri; + char *string; +}; + +static int qsort_cmp_list(const void *x, const void *y) { + struct pri_list *a = (struct pri_list *)x; + struct pri_list *b = (struct pri_list *)y; + if (a->pri > b->pri) return -1; + if (a->pri == b->pri) return 0; + return 1; +} + /* choose from a list of languages. The list can be comma or space separated Keep choosing until we get a hit Changed to habdle priority -- Simo */ + void web_set_lang(const char *lang_string) { char **lang_list, **count; - float *pri; + struct pri_list *pl; int lang_num, i; /* build the lang list */ @@ -71,37 +85,33 @@ void web_set_lang(const char *lang_string) count++; lang_num++; } - pri = (float *)malloc(sizeof(float) * lang_num); + pl = (struct pri_list *)malloc(sizeof(struct pri_list) * lang_num); for (i = 0; i < lang_num; i++) { char *pri_code; if ((pri_code=strstr(lang_list[i], ";q="))) { *pri_code = '\0'; pri_code += 3; - pri[i] = strtof(pri_code, NULL); + sscanf(pri_code, "%f", &(pl[i].pri)); } else { - pri[i] = 1; + pl[i].pri = 1; } - if (i != 0) { - int l; - for (l = i; l > 0; l--) { - if (pri[l] > pri[l-1]) { - char *tempc; - int tempf; - tempc = lang_list[l]; - tempf = pri[l]; - lang_list[l] = lang_list[l-1]; - pri[i] = pri[l-1]; - lang_list[l-1] = tempc; - pri[l-1] = tempf; - } - } - } + pl[i].string = strdup(lang_list[i]); + } + str_list_free(&lang_list); + + qsort(pl, lang_num, sizeof(struct pri_list), &qsort_cmp_list); + + /* it's not an error to not initialise - we just fall back to + the default */ + + for (i = 0; i < lang_num; i++) { + if (lang_tdb_init(pl[i].string)) break; } for (i = 0; i < lang_num; i++) { - if (lang_tdb_init(lang_list[i])) return; + SAFE_FREE(pl[i].string); } - - /* it's not an error to not initialise - we just fall back to - the default */ + SAFE_FREE(pl); + + return; } From 6eaa06ac53840f36a9c75650f21565828e8fbbd4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 09:23:01 +0000 Subject: [PATCH 124/262] A place to store common popt routines. (This used to be commit b5b64a4e90792000fc377a032cd5c7cb9918261b) --- source3/lib/popt_common.c | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 source3/lib/popt_common.c diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c new file mode 100644 index 00000000000..288cd41b27b --- /dev/null +++ b/source3/lib/popt_common.c @@ -0,0 +1,49 @@ +/* + Unix SMB/CIFS implementation. + Common popt routines + + Copyright (C) Tim Potter 2001,2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + +/* Handle -d,--debuglevel command line option */ + +static void debug_callback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption *opt, + const char *arg, const void *data) +{ + extern BOOL AllowDebugChange; + + switch(opt->val) { + case 'd': + if (arg) { + DEBUGLEVEL = atoi(arg); + AllowDebugChange = False; + } + + break; + } +} + +struct poptOption popt_common_debug[] = { + { NULL, 0, POPT_ARG_CALLBACK, debug_callback }, + { "debuglevel", 'd', POPT_ARG_INT, NULL, 'd', "Set debug level", + "DEBUGLEVEL" }, + POPT_TABLEEND +}; From 11785c7bc83b153e8d177928283474bbb0e5f3a9 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 09:25:23 +0000 Subject: [PATCH 125/262] Use common popt definition for -d option. (This used to be commit 8c17904848a6206ab35652625ff5f3afcf6bcb0d) --- source3/rpcclient/rpcclient.c | 8 +------- source3/utils/net.c | 3 +-- source3/utils/status.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 15e7c380022..2d86fb1d3d0 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -612,7 +612,6 @@ static void usage(void) *opt_configfile=NULL, *opt_logfile=NULL, *opt_ipaddr=NULL; - static int opt_debuglevel; pstring logfile; struct cmd_set **cmd_set; struct in_addr server_ip; @@ -626,14 +625,13 @@ static void usage(void) {"authfile", 'A', POPT_ARG_STRING, &opt_authfile, 'A'}, {"conf", 's', POPT_ARG_STRING, &opt_configfile, 's'}, {"nopass", 'N', POPT_ARG_NONE, &got_pass}, - {"debug", 'd', POPT_ARG_INT, &opt_debuglevel, 'd'}, - {"debuglevel", 'd', POPT_ARG_INT, &opt_debuglevel, 'd'}, {"user", 'U', POPT_ARG_STRING, &opt_username, 'U'}, {"workgroup", 'W', POPT_ARG_STRING, &opt_domain, 'W'}, {"command", 'c', POPT_ARG_STRING, &cmdstr}, {"logfile", 'l', POPT_ARG_STRING, &opt_logfile, 'l'}, {"help", 'h', POPT_ARG_NONE, 0, 'h'}, {"dest-ip", 'I', POPT_ARG_STRING, &opt_ipaddr, 'I'}, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, { NULL } }; @@ -673,10 +671,6 @@ static void usage(void) pstrcpy(dyn_CONFIGFILE, opt_configfile); break; - case 'd': - DEBUGLEVEL = opt_debuglevel; - break; - case 'U': { char *lp; diff --git a/source3/utils/net.c b/source3/utils/net.c index 084edb62840..fc7094bcf77 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -381,8 +381,6 @@ static struct functable net_func[] = { {"port", 'p', POPT_ARG_INT, &opt_port}, {"myname", 'n', POPT_ARG_STRING, &opt_requester_name}, {"conf", 's', POPT_ARG_STRING, &servicesf}, - {"debug", 'd', POPT_ARG_STRING, &debuglevel}, - {"debuglevel", 'd', POPT_ARG_STRING, &debuglevel}, {"server", 'S', POPT_ARG_STRING, &opt_host}, {"comment", 'C', POPT_ARG_STRING, &opt_comment}, {"maxusers", 'M', POPT_ARG_INT, &opt_maxusers}, @@ -393,6 +391,7 @@ static struct functable net_func[] = { {"force", 'f', POPT_ARG_NONE, &opt_force}, {"timeout", 't', POPT_ARG_INT, &opt_timeout}, {"machine-pass",'P', POPT_ARG_NONE, &opt_machine_pass}, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, { 0, 0, 0, 0} }; diff --git a/source3/utils/status.c b/source3/utils/status.c index c624fc4c5fe..0b0c591cb16 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -551,7 +551,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo {"brief", 'b', POPT_ARG_NONE, &brief}, {"profile", 'P', POPT_ARG_NONE, &profile_only}, {"byterange", 'B', POPT_ARG_NONE, &show_brl}, - {"debug", 'd', POPT_ARG_STRING, &new_debuglevel}, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, { 0, 0, 0, 0} }; From 8f0b2c5f5a39a0058dc087abba4b6d9aee78836d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 09:26:38 +0000 Subject: [PATCH 126/262] Add lib/popt_common.o (This used to be commit a29a86f5b55669c615cdc659d1b8a231b16b3273) --- source3/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index 7f23d11e40e..fd49d7265be 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -138,7 +138,7 @@ LIB_OBJ = lib/charcnv.o lib/debug.o lib/fault.o \ lib/md5.o lib/hmacmd5.o lib/iconv.o lib/smbpasswd.o \ nsswitch/wb_client.o nsswitch/wb_common.o \ lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \ - lib/adt_tree.o $(TDB_OBJ) + lib/adt_tree.o lib/popt_common.o $(TDB_OBJ) READLINE_OBJ = lib/readline.o From c47d973ff27ad4aa16f2cd8f5bed2322838dc12b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 09:28:16 +0000 Subject: [PATCH 127/262] Added extern for popt_common_debug. (This used to be commit 4c664a0de89676cfb2b14a93d4e30aed04e29fe9) --- source3/include/smb.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/include/smb.h b/source3/include/smb.h index c48c81e6e43..915ab66703c 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -1667,4 +1667,8 @@ typedef struct { #define DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH 14 +/* Common popt structures */ + +extern struct poptOption popt_common_debug[]; + #endif /* _SMB_H */ From 3a99ab6aa546b3cf67fdece29e46dec5c9817271 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 09:32:25 +0000 Subject: [PATCH 128/262] Started to get samsync to insert account information in the passdb. It's pretty half-arsed at the moment and doesn't work very well but Mr Bartlett was interested in it. Also started playing around with the more interesting bits of popt. The auto-generated usage information is pretty neat. (This used to be commit b3e51bfe6c13f1d20e599f675332f0489d8462e7) --- source3/rpcclient/samsync.c | 413 ++++++++++++++++++++++++++---------- 1 file changed, 306 insertions(+), 107 deletions(-) diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index 802666841dc..e20322cbc5f 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -1,8 +1,8 @@ /* Unix SMB/CIFS implementation. - RPC pipe client + SAM synchronisation and replication - Copyright (C) Tim Potter 2001 + Copyright (C) Tim Potter 2001,2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,8 @@ #include "includes.h" +DOM_SID domain_sid; + static void decode_domain_info(SAM_DOMAIN_INFO *a) { fstring temp; @@ -252,20 +254,134 @@ static void decode_sam_deltas(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas, SAM_ } } +/* Convert a SAM_ACCOUNT_DELTA to a SAM_ACCOUNT. */ + +static void sam_account_from_delta(SAM_ACCOUNT *account, + SAM_ACCOUNT_INFO *delta) +{ + DOM_SID sid; + fstring s; + + /* Username, fullname, home dir, dir drive, logon script, acct + desc, workstations, profile. */ + + unistr2_to_ascii(s, &delta->uni_acct_name, sizeof(s) - 1); + pdb_set_nt_username(account, s); + + unistr2_to_ascii(s, &delta->uni_full_name, sizeof(s) - 1); + pdb_set_fullname(account, s); + + unistr2_to_ascii(s, &delta->uni_home_dir, sizeof(s) - 1); + pdb_set_homedir(account, s, True); + + unistr2_to_ascii(s, &delta->uni_dir_drive, sizeof(s) - 1); + pdb_set_dir_drive(account, s, True); + + unistr2_to_ascii(s, &delta->uni_logon_script, sizeof(s) - 1); + pdb_set_logon_script(account, s, True); + + unistr2_to_ascii(s, &delta->uni_acct_desc, sizeof(s) - 1); + pdb_set_acct_desc(account, s); + + unistr2_to_ascii(s, &delta->uni_workstations, sizeof(s) - 1); + pdb_set_workstations(account, s); + + unistr2_to_ascii(s, &delta->uni_profile, sizeof(s) - 1); + pdb_set_profile_path(account, s, True); + + /* Set Unix username to be winbindd username */ + + { + char *unix_username; + + asprintf(&unix_username, "%s%s%s", lp_workgroup(), + lp_winbind_separator(), pdb_get_nt_username(account)); + + pdb_set_username(account, unix_username); + + SAFE_FREE(unix_username); + } + + /* User and group sid */ + + sid_copy(&sid, &domain_sid); + sid_append_rid(&sid, delta->user_rid); + pdb_set_user_sid(account, &sid); + + sid_copy(&sid, &domain_sid); + sid_append_rid(&sid, delta->group_rid); + pdb_set_group_sid(account, &sid); + + /* Logon and password information */ + + pdb_set_logon_time(account, nt_time_to_unix(&delta->logon_time), True); + pdb_set_logoff_time(account, nt_time_to_unix(&delta->logoff_time), + True); + + pdb_set_logon_divs(account, delta->logon_divs); + + /* TODO: logon hours */ + /* TODO: bad password count */ + /* TODO: logon count */ + + pdb_set_pass_last_set_time( + account, nt_time_to_unix(&delta->pwd_last_set_time)); + + /* TODO: account expiry time */ + + pdb_set_acct_ctrl(account, delta->acb_info); +} + +static void apply_account_info(SAM_ACCOUNT_INFO *sam_acct_delta) +{ + SAM_ACCOUNT sam_acct; + BOOL result; + + ZERO_STRUCT(sam_acct); + + pdb_init_sam(&sam_acct); + + sam_account_from_delta(&sam_acct, sam_acct_delta); + result = pdb_add_sam_account(&sam_acct); +} + +/* Apply an array of deltas to the SAM database */ + +static void apply_deltas(uint32 num_deltas, SAM_DELTA_HDR *hdr_deltas, + SAM_DELTA_CTR *deltas) +{ + uint32 i; + + for (i = 0; i < num_deltas; i++) { + switch(hdr_deltas[i].type) { + case SAM_DELTA_ACCOUNT_INFO: + apply_account_info(&deltas[i].account_info); + break; + } + } +} + /* Synchronise sam database */ static NTSTATUS sam_sync(struct cli_state *cli, unsigned char trust_passwd[16], BOOL do_smbpasswd_output, BOOL verbose) { TALLOC_CTX *mem_ctx; - SAM_DELTA_HDR *hdr_deltas_0, *hdr_deltas_1, *hdr_deltas_2; - SAM_DELTA_CTR *deltas_0, *deltas_1, *deltas_2; - uint32 num_deltas_0, num_deltas_1, num_deltas_2; + SAM_DELTA_HDR *hdr_deltas_0, *hdr_deltas_2; + SAM_DELTA_CTR *deltas_0, *deltas_2; + uint32 num_deltas_0, num_deltas_2; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + struct pdb_context *in; DOM_CRED ret_creds; + /* Initialise */ + if (!NT_STATUS_IS_OK(make_pdb_context_list(&in, lp_passdb_backend()))){ + DEBUG(0, ("Can't initialize passdb backend.\n")); + return result; + } + if (!(mem_ctx = talloc_init())) { DEBUG(0,("talloc_init failed\n")); return result; @@ -288,14 +404,14 @@ static NTSTATUS sam_sync(struct cli_state *cli, unsigned char trust_passwd[16], /* Do sam synchronisation on the SAM database*/ - result = cli_netlogon_sam_sync(cli, mem_ctx, &ret_creds, 0, &num_deltas_0, &hdr_deltas_0, &deltas_0); + result = cli_netlogon_sam_sync(cli, mem_ctx, &ret_creds, 0, + &num_deltas_0, &hdr_deltas_0, + &deltas_0); if (!NT_STATUS_IS_OK(result)) goto done; - /* verbose mode */ - if (verbose) - decode_sam_deltas(num_deltas_0, hdr_deltas_0, deltas_0); + apply_deltas(num_deltas_0, hdr_deltas_0, deltas_0); /* @@ -379,23 +495,6 @@ static NTSTATUS sam_repl(struct cli_state *cli, unsigned char trust_passwde[16], return result; } -/* Print usage information */ - -static void usage(void) -{ - printf("Usage: samsync [options]\n"); - - printf("\t-d debuglevel set the debuglevel\n"); - printf("\t-h Print this help message.\n"); - printf("\t-s configfile specify an alternative config file\n"); - printf("\t-S synchronise sam database\n"); - printf("\t-R replicate sam deltas\n"); - printf("\t-U username username and password\n"); - printf("\t-p produce smbpasswd output\n"); - printf("\t-V verbose output\n"); - printf("\n"); -} - /* Connect to primary domain controller */ static struct cli_state *init_connection(struct cli_state **cli, @@ -407,7 +506,16 @@ static struct cli_state *init_connection(struct cli_state **cli, int count; fstring dest_host; - /* Initialise cli_state information */ + /* Initialise myname */ + + if (!global_myname[0]) { + char *p; + + fstrcpy(global_myname, myhostname()); + p = strchr(global_myname, '.'); + if (p) + *p = 0; + } /* Look up name of PDC controller */ @@ -430,148 +538,239 @@ static struct cli_state *init_connection(struct cli_state **cli, username, domain, password, 0))) { return *cli; - } else { - return NULL; } + + return NULL; } /* Main function */ +static fstring popt_username, popt_domain, popt_password; +static BOOL popt_got_pass; + +static void user_callback(poptContext con, + enum poptCallbackReason reason, + const struct poptOption *opt, + const char *arg, const void *data) +{ + char *p, *ch; + + if (!arg) + return; + + switch(opt->val) { + + /* Check for [DOMAIN\\]username[%password]*/ + + case 'U': + + p = arg; + + if ((ch = strchr(p, '\\'))) { + fstrcpy(popt_domain, p); + popt_domain[ch - p] = 0; + } + + fstrcpy(popt_username, p); + + if ((ch = strchr(p, '%'))) { + popt_username[ch - p] = 0; + fstrcpy(popt_password, ch + 1); + popt_got_pass = True; + } + + break; + + case 'W': + fstrcpy(popt_domain, arg); + break; + } +} + +/* Return domain, username and password passed in from cmd line */ + +void popt_common_get_auth_info(char **domain, char **username, char **password, + BOOL *got_pass) +{ + *domain = popt_domain; + *username = popt_username; + *password = popt_password; + *got_pass = popt_got_pass; +} + +struct poptOption popt_common_auth_info[] = { + { NULL, 0, POPT_ARG_CALLBACK, user_callback }, + { "user", 'U', POPT_ARG_STRING, NULL, 'U', "Set username", + "[DOMAIN\\]username[%password]" }, + { "domain", 'W', POPT_ARG_STRING, NULL, 'W', "Set domain name", + "DOMAIN"}, + POPT_TABLEEND +}; + +static BOOL popt_interactive; + +BOOL popt_common_is_interactive(void) +{ + return popt_interactive; +} + +struct poptOption popt_common_interactive[] = { + { "interactive", 'i', POPT_ARG_NONE, &popt_interactive, 'i', + "Log to stdout" }, + POPT_TABLEEND +}; + int main(int argc, char **argv) { BOOL do_sam_sync = False, do_sam_repl = False; struct cli_state *cli; NTSTATUS result; - int opt; pstring logfile; - BOOL interactive = False, do_smbpasswd_output = False; - BOOL verbose = False; - uint32 low_serial = 0; + BOOL do_smbpasswd_output = False; + BOOL verbose = True, got_pass = False; + uint32 serial = 0; unsigned char trust_passwd[16]; - fstring username, domain, password; + char *username, *domain, *password; + poptContext pc; + char c; - if (argc == 1) { - usage(); - return 1; - } + struct poptOption popt_samsync_opts[] = { + { "synchronise", 'S', POPT_ARG_NONE, &do_sam_sync, 'S', + "Perform full SAM synchronisation" }, + { "replicate", 'R', POPT_ARG_NONE, &do_sam_repl, 'R', + "Replicate SAM changes" }, + { "serial", 0, POPT_ARG_INT, &serial, 0, "SAM serial number" }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debug }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_auth_info }, + { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_interactive }, + POPT_AUTOHELP + POPT_TABLEEND + }; - ZERO_STRUCT(username); - ZERO_STRUCT(domain); - ZERO_STRUCT(password); + /* Read command line options */ - /* Parse command line options */ + pc = poptGetContext("samsync", argc, (const char **)argv, + popt_samsync_opts, 0); - while((opt = getopt(argc, argv, "s:d:SR:hiU:W:pV")) != EOF) { - switch (opt) { - case 's': - pstrcpy(dyn_CONFIGFILE, optarg); - break; - case 'd': - DEBUGLEVEL = atoi(optarg); - break; - case 'S': - do_sam_sync = 1; - break; - case 'R': - do_sam_repl = 1; - low_serial = atoi(optarg); - break; - case 'i': - interactive = True; - break; - case 'U': { - char *lp; + if (argc == 1) { + poptPrintUsage(pc, stdout, 0); + return 1; + } - fstrcpy(username,optarg); - if ((lp=strchr_m(username,'%'))) { - *lp = 0; - fstrcpy(password,lp+1); - memset(strchr_m(optarg, '%') + 1, 'X', - strlen(password)); - } - break; - } - case 'W': - pstrcpy(domain, optarg); - break; - case 'p': - do_smbpasswd_output = True; - break; - case 'V': - verbose = True; - break; - case 'h': - default: - usage(); - exit(1); - } - } + while ((c = poptGetNextOpt(pc)) != -1) { - argc -= optind; + /* Argument processing error */ - if (argc > 0) { - usage(); - return 1; - } + if (c < -1) { + fprintf(stderr, "samsync: %s: %s\n", + poptBadOption(pc, POPT_BADOPTION_NOALIAS), + poptStrerror(c)); + return 1; + } - /* Initialise samba */ + /* Handle arguments */ + + switch (c) { + case 'h': + poptPrintHelp(pc, stdout, 0); + return 1; + case 'u': + poptPrintUsage(pc, stdout, 0); + return 1; + } + } + + /* Bail out if any extra args were passed */ + + if (poptPeekArg(pc)) { + fprintf(stderr, "samsync: invalid argument %s\n", + poptPeekArg(pc)); + poptPrintUsage(pc, stdout, 0); + return 1; + } + + poptFreeContext(pc); + + /* Setup logging */ + + dbf = x_stdout; + + if (!lp_load(dyn_CONFIGFILE, True, False, False)) { + d_fprintf(stderr, "samsync: error opening config file %s. " + "Error was %s\n", dyn_CONFIGFILE, strerror(errno)); + return 1; + } slprintf(logfile, sizeof(logfile) - 1, "%s/log.%s", dyn_LOGFILEBASE, "samsync"); + lp_set_logfile(logfile); - setup_logging("samsync", interactive); + setup_logging("samsync", popt_common_is_interactive()); - if (!interactive) + if (!popt_common_is_interactive()) reopen_logs(); - if (!lp_load(dyn_CONFIGFILE, True, False, False)) { - fprintf(stderr, "Can't load %s\n", dyn_CONFIGFILE); - } - - load_interfaces(); + load_interfaces(); /* Check arguments make sense */ if (do_sam_sync && do_sam_repl) { - fprintf(stderr, "cannot specify both -S and -R\n"); + DEBUG(0, ("cannot specify both -S and -R\n")); return 1; } if (!do_sam_sync && !do_sam_repl) { - fprintf(stderr, "must specify either -S or -R\n"); + DEBUG(0, ("samsync: you must either --synchronise or " + "--replicate the SAM database\n")); return 1; } - if (do_sam_repl && low_serial == 0) { - fprintf(stderr, "serial number must be positive\n"); + if (do_sam_repl && serial == 0) { + DEBUG(0, ("samsync: must specify serial number\n")); return 1; } + if (do_sam_sync && serial != 0) { + DEBUG(0, ("samsync: you can't specify a serial number when " + "synchonising the SAM database\n")); + return 1; + } + /* BDC operations require the machine account password */ if (!secrets_init()) { - DEBUG(0, ("Unable to initialise secrets database\n")); + DEBUG(0, ("samsync: unable to initialise secrets database\n")); return 1; } if (!secrets_fetch_trust_account_password(lp_workgroup(), trust_passwd, NULL)) { - DEBUG(0, ("could not fetch trust account password\n")); + DEBUG(0, ("samsync: could not fetch trust account password\n")); return 1; } + /* I wish the domain sid wasn't stored in secrets.tdb */ + + if (!secrets_fetch_domain_sid(lp_workgroup(), &domain_sid)) { + DEBUG(0, ("samsync: could not retrieve domain sid\n")); + return 1; + } + /* Perform sync or replication */ + popt_common_get_auth_info(&domain, &username, &password, &got_pass); + if (!init_connection(&cli, username, domain, password)) return 1; if (do_sam_sync) - result = sam_sync(cli, trust_passwd, do_smbpasswd_output, verbose); + result = sam_sync(cli, trust_passwd, do_smbpasswd_output, + verbose); if (do_sam_repl) - result = sam_repl(cli, trust_passwd, low_serial); + result = sam_repl(cli, trust_passwd, serial); if (!NT_STATUS_IS_OK(result)) { DEBUG(0, ("%s\n", nt_errstr(result))); From 8c85675b075404a333c8cc3d653b949e33ddc6a8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 29 Jul 2002 09:44:29 +0000 Subject: [PATCH 129/262] as suggested by Alexander Oswald hide only unwriteable files and not dirs with this one. may be a hide unwriteable dirs param will follow. (This used to be commit 161dd6d963ea1c11891278af2483c925e508767e) --- source3/param/loadparm.c | 8 ++++---- source3/smbd/dir.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 64542cd153d..bb97d72d34d 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -339,7 +339,7 @@ typedef struct BOOL bCaseMangle; BOOL bHideDotFiles; BOOL bHideUnReadable; - BOOL bHideUnWriteable; + BOOL bHideUnWriteableFiles; BOOL bBrowseable; BOOL bAvailable; BOOL bRead_only; @@ -458,7 +458,7 @@ static service sDefault = { False, /* case mangle */ True, /* bHideDotFiles */ False, /* bHideUnReadable */ - False, /* bHideUnable */ + False, /* bHideUnWriteableFiles */ True, /* bBrowseable */ True, /* bAvailable */ True, /* bRead_only */ @@ -877,7 +877,7 @@ static struct parm_struct parm_table[] = { {"mangling char", P_CHAR, P_LOCAL, &sDefault.magic_char, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"hide dot files", P_BOOL, P_LOCAL, &sDefault.bHideDotFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"hide unreadable", P_BOOL, P_LOCAL, &sDefault.bHideUnReadable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, - {"hide unwriteable", P_BOOL, P_LOCAL, &sDefault.bHideUnWriteable, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, + {"hide unwriteable files", P_BOOL, P_LOCAL, &sDefault.bHideUnWriteableFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"delete veto files", P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL}, {"veto files", P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, {"hide files", P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL, NULL, FLAG_SHARE | FLAG_GLOBAL }, @@ -1667,7 +1667,7 @@ FN_LOCAL_BOOL(lp_shortpreservecase, bShortCasePreserve) FN_LOCAL_BOOL(lp_casemangle, bCaseMangle) FN_LOCAL_BOOL(lp_hide_dot_files, bHideDotFiles) FN_LOCAL_BOOL(lp_hideunreadable, bHideUnReadable) -FN_LOCAL_BOOL(lp_hideunwriteable, bHideUnWriteable) +FN_LOCAL_BOOL(lp_hideunwriteable_files, bHideUnWriteableFiles) FN_LOCAL_BOOL(lp_browseable, bBrowseable) FN_LOCAL_BOOL(lp_readonly, bRead_only) FN_LOCAL_BOOL(lp_no_set_dir, bNo_set_dir) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 01e3063b672..1a18476b75b 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -722,7 +722,8 @@ static BOOL user_can_read_file(connection_struct *conn, char *name) } /******************************************************************* -check to see if a user can write a file. This is only approximate, +check to see if a user can write a file (and only files, we do not +check dirs on this one). This is only approximate, it is used as part of the "hide unwriteable" option. Don't use it for anything security sensitive ********************************************************************/ @@ -756,8 +757,7 @@ static BOOL user_can_write_file(connection_struct *conn, char *name) /* Pseudo-open the file (note - no fd's created). */ if(S_ISDIR(ste.st_mode)) - fsp = open_directory(conn, name, &ste, 0, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), - unix_mode(conn, aDIR, name), &smb_action); + return True; else fsp = open_file_shared1(conn, name, &ste, FILE_WRITE_ATTRIBUTES, SET_DENY_MODE(DENY_NONE), (FILE_FAIL_IF_NOT_EXIST|FILE_EXISTS_OPEN), 0, 0, &access_mode, &smb_action); @@ -838,7 +838,7 @@ void *OpenDir(connection_struct *conn, char *name, BOOL use_veto) } /* Honour _hide unwriteable_ option */ - if (normal_entry && conn && lp_hideunwriteable(SNUM(conn))) { + if (normal_entry && conn && lp_hideunwriteable_files(SNUM(conn))) { char *entry; int ret=0; From 1ea873e0a07ed146ccfa61acd746de85df9ffb97 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Jul 2002 11:14:05 +0000 Subject: [PATCH 130/262] an initial fix for handling sparse files in smbd This gets my test code working, where we previously failed with files above 20G in size. I'm still not completely happy with this. There are just too many fields in trans2.c that we don't fill in. (This used to be commit 7dfdb456d4c9bcf6ecb1f7e5c5e79989f95e5627) --- source3/include/includes.h | 1 + source3/include/ntioctl.h | 26 +++++++++++ source3/smbd/dosmode.c | 92 +++++++++++++++++++------------------- source3/smbd/nttrans.c | 51 ++++++++++++++++----- source3/smbd/trans2.c | 40 ++++++++++------- 5 files changed, 138 insertions(+), 72 deletions(-) create mode 100644 source3/include/ntioctl.h diff --git a/source3/include/includes.h b/source3/include/includes.h index 04d11afafb9..6084d583ed6 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -707,6 +707,7 @@ extern int errno; #include "hash.h" #include "trans2.h" #include "nterr.h" +#include "ntioctl.h" #include "messages.h" #include "charset.h" #include "dynconfig.h" diff --git a/source3/include/ntioctl.h b/source3/include/ntioctl.h new file mode 100644 index 00000000000..4749842ddc5 --- /dev/null +++ b/source3/include/ntioctl.h @@ -0,0 +1,26 @@ +/* + Unix SMB/CIFS implementation. + NT ioctl code constants + Copyright (C) Andrew Tridgell 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + I'm guessing we will need to support a bunch of these eventually. For now + we only need the sparse flag +*/ + +#define NTIOCTL_SET_SPARSE 0x900c4 diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index dcffe3aa90a..77d8c9cc920 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -115,65 +115,67 @@ mode_t unix_mode(connection_struct *conn,int dosmode,const char *fname) /**************************************************************************** change a unix mode to a dos mode ****************************************************************************/ -int dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf) +uint32 dos_mode(connection_struct *conn,char *path,SMB_STRUCT_STAT *sbuf) { - int result = 0; + int result = 0; - DEBUG(8,("dos_mode: %s\n", path)); + DEBUG(8,("dos_mode: %s\n", path)); - if ((sbuf->st_mode & S_IWUSR) == 0) - result |= aRONLY; + if ((sbuf->st_mode & S_IWUSR) == 0) + result |= aRONLY; + + if (MAP_ARCHIVE(conn) && ((sbuf->st_mode & S_IXUSR) != 0)) + result |= aARCH; - if (MAP_ARCHIVE(conn) && ((sbuf->st_mode & S_IXUSR) != 0)) - result |= aARCH; - - if (MAP_SYSTEM(conn) && ((sbuf->st_mode & S_IXGRP) != 0)) - result |= aSYSTEM; - - if (MAP_HIDDEN(conn) && ((sbuf->st_mode & S_IXOTH) != 0)) - result |= aHIDDEN; + if (MAP_SYSTEM(conn) && ((sbuf->st_mode & S_IXGRP) != 0)) + result |= aSYSTEM; + + if (MAP_HIDDEN(conn) && ((sbuf->st_mode & S_IXOTH) != 0)) + result |= aHIDDEN; - if (S_ISDIR(sbuf->st_mode)) - result = aDIR | (result & aRONLY); + if (S_ISDIR(sbuf->st_mode)) + result = aDIR | (result & aRONLY); + + if (sbuf->st_size > sbuf->st_blocks * (SMB_OFF_T)sbuf->st_blksize) { + result |= FILE_ATTRIBUTE_SPARSE; + } #ifdef S_ISLNK #if LINKS_READ_ONLY - if (S_ISLNK(sbuf->st_mode) && S_ISDIR(sbuf->st_mode)) - result |= aRONLY; + if (S_ISLNK(sbuf->st_mode) && S_ISDIR(sbuf->st_mode)) + result |= aRONLY; #endif #endif - /* hide files with a name starting with a . */ - if (lp_hide_dot_files(SNUM(conn))) - { - char *p = strrchr_m(path,'/'); - if (p) - p++; - else - p = path; - - if (p[0] == '.' && p[1] != '.' && p[1] != 0) - result |= aHIDDEN; - } + /* hide files with a name starting with a . */ + if (lp_hide_dot_files(SNUM(conn))) { + char *p = strrchr_m(path,'/'); + if (p) + p++; + else + p = path; + + if (p[0] == '.' && p[1] != '.' && p[1] != 0) + result |= aHIDDEN; + } + + /* Optimization : Only call is_hidden_path if it's not already + hidden. */ + if (!(result & aHIDDEN) && IS_HIDDEN_PATH(conn,path)) { + result |= aHIDDEN; + } - /* Optimization : Only call is_hidden_path if it's not already - hidden. */ - if (!(result & aHIDDEN) && IS_HIDDEN_PATH(conn,path)) - { - result |= aHIDDEN; - } + DEBUG(8,("dos_mode returning ")); - DEBUG(8,("dos_mode returning ")); + if (result & aHIDDEN) DEBUG(8, ("h")); + if (result & aRONLY ) DEBUG(8, ("r")); + if (result & aSYSTEM) DEBUG(8, ("s")); + if (result & aDIR ) DEBUG(8, ("d")); + if (result & aARCH ) DEBUG(8, ("a")); + + DEBUG(8,("\n")); - if (result & aHIDDEN) DEBUG(8, ("h")); - if (result & aRONLY ) DEBUG(8, ("r")); - if (result & aSYSTEM) DEBUG(8, ("s")); - if (result & aDIR ) DEBUG(8, ("d")); - if (result & aARCH ) DEBUG(8, ("a")); - - DEBUG(8,("\n")); - - return(result); + return(result); } /******************************************************************* diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 8f6b4ab374e..cf69dfddb04 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -851,7 +851,7 @@ int reply_ntcreate_and_X(connection_struct *conn, p += 8; SIVAL(p,0,fmode); /* File Attributes. */ p += 4; - SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); + SOFF_T(p, 0, get_allocation_size(&sbuf)); p += 8; SOFF_T(p,0,file_len); p += 12; @@ -1295,7 +1295,7 @@ static int call_nt_transact_create(connection_struct *conn, p += 8; SIVAL(p,0,fmode); /* File Attributes. */ p += 4; - SOFF_T(p, 0, SMB_ROUNDUP_ALLOCATION(file_len)); + SOFF_T(p, 0, get_allocation_size(&sbuf)); p += 8; SOFF_T(p,0,file_len); @@ -1594,21 +1594,46 @@ static int call_nt_transact_set_security_desc(connection_struct *conn, } /**************************************************************************** - Reply to IOCTL - not implemented - no plans. + Reply to NT IOCTL ****************************************************************************/ - static int call_nt_transact_ioctl(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - char **ppsetup, char **ppparams, char **ppdata) + char **ppsetup, int setup_count, + char **ppparams, int parameter_count, + char **ppdata, int data_count) { - static BOOL logged_message = False; + unsigned fnum, control; + static BOOL logged_message; - if(!logged_message) { - DEBUG(3,("call_nt_transact_ioctl: Currently not implemented.\n")); - logged_message = True; /* Only print this once... */ + if (setup_count != 8) { + DEBUG(3,("call_nt_transact_ioctl: invalid setup count %d\n", setup_count)); + return ERROR_NT(NT_STATUS_NOT_SUPPORTED); } - return ERROR_DOS(ERRSRV,ERRnosupport); + + fnum = SVAL(*ppsetup, 4); + control = IVAL(*ppsetup, 0); + + DEBUG(6,("call_nt_transact_ioctl: fnum=%d control=0x%x\n", + fnum, control)); + + switch (control) { + case NTIOCTL_SET_SPARSE: + /* pretend this succeeded - tho strictly we should + mark the file sparse (if the local fs supports it) + so we can know if we need to pre-allocate or not */ + send_nt_replies(inbuf, outbuf, bufsize, NT_STATUS_OK, NULL, 0, NULL, 0); + return -1; + + default: + if (!logged_message) { + logged_message = True; /* Only print this once... */ + DEBUG(3,("call_nt_transact_ioctl(0x%x): Currently not implemented.\n", + control)); + } + } + + return ERROR_NT(NT_STATUS_NOT_SUPPORTED); } /**************************************************************************** @@ -1769,8 +1794,10 @@ due to being in oplock break state.\n", (unsigned int)function_code )); case NT_TRANSACT_IOCTL: START_PROFILE_NESTED(NT_transact_ioctl); outsize = call_nt_transact_ioctl(conn, inbuf, outbuf, - length, bufsize, - &setup, ¶ms, &data); + length, bufsize, + &setup, setup_count, + ¶ms, parameter_count, + &data, data_count); END_PROFILE_NESTED(NT_transact_ioctl); break; case NT_TRANSACT_SET_SECURITY_DESC: diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 7da1758decc..3a8e41c6546 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -30,6 +30,17 @@ extern int global_oplock_break; extern uint32 global_client_caps; extern pstring global_myname; +/* given a stat buffer return the allocated size on disk, taking into + account sparse files */ +SMB_OFF_T get_allocation_size(SMB_STRUCT_STAT *sbuf) +{ + SMB_OFF_T ret; + ret = sbuf->st_blksize * (SMB_OFF_T)sbuf->st_blocks; + ret = SMB_ROUNDUP_ALLOCATION(ret); + return ret; +} + + /**************************************************************************** Send the required number of replies back. We assume all fields other than the data fields are @@ -566,7 +577,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, } size = sbuf.st_size; - allocation_size = SMB_ROUNDUP_ALLOCATION(sbuf.st_size); + allocation_size = get_allocation_size(&sbuf); mdate = sbuf.st_mtime; adate = sbuf.st_atime; cdate = get_create_time(&sbuf,lp_fake_dir_create_times(SNUM(conn))); @@ -1528,7 +1539,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, uint16 tran_call = SVAL(inbuf, smb_setup0); uint16 info_level; int mode=0; - SMB_OFF_T size=0; + SMB_OFF_T file_size=0; SMB_OFF_T allocation_size=0; unsigned int data_size; SMB_STRUCT_STAT sbuf; @@ -1643,10 +1654,10 @@ static int call_trans2qfilepathinfo(connection_struct *conn, mode = dos_mode(conn,fname,&sbuf); fullpathname = fname; - size = sbuf.st_size; - allocation_size = SMB_ROUNDUP_ALLOCATION(sbuf.st_size); + file_size = sbuf.st_size; + allocation_size = get_allocation_size(&sbuf); if (mode & aDIR) - size = 0; + file_size = 0; params = Realloc(*pparams,2); if (params == NULL) @@ -1692,7 +1703,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, put_dos_date2(pdata,l1_fdateCreation,c_time); put_dos_date2(pdata,l1_fdateLastAccess,sbuf.st_atime); put_dos_date2(pdata,l1_fdateLastWrite,sbuf.st_mtime); /* write time */ - SIVAL(pdata,l1_cbFile,(uint32)size); + SIVAL(pdata,l1_cbFile,(uint32)file_size); SIVAL(pdata,l1_cbFileAlloc,(uint32)allocation_size); SSVAL(pdata,l1_attrFile,mode); SIVAL(pdata,l1_attrFile+2,4); /* this is what OS2 does */ @@ -1703,7 +1714,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, put_dos_date2(pdata,0,c_time); put_dos_date2(pdata,4,sbuf.st_atime); put_dos_date2(pdata,8,sbuf.st_mtime); - SIVAL(pdata,12,(uint32)size); + SIVAL(pdata,12,(uint32)file_size); SIVAL(pdata,16,(uint32)allocation_size); SIVAL(pdata,20,mode); break; @@ -1747,9 +1758,8 @@ static int call_trans2qfilepathinfo(connection_struct *conn, case SMB_QUERY_FILE_STANDARD_INFO: data_size = 24; - /* Fake up allocation size. */ SOFF_T(pdata,0,allocation_size); - SOFF_T(pdata,8,size); + SOFF_T(pdata,8,file_size); SIVAL(pdata,16,sbuf.st_nlink); SCVAL(pdata,20,0); SCVAL(pdata,21,(mode&aDIR)?1:0); @@ -1794,7 +1804,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, case SMB_FILE_END_OF_FILE_INFORMATION: case SMB_QUERY_FILE_END_OF_FILEINFO: data_size = 8; - SOFF_T(pdata,0,size); + SOFF_T(pdata,0,file_size); break; case SMB_QUERY_FILE_ALL_INFO: @@ -1805,7 +1815,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, SIVAL(pdata,32,mode); pdata += 40; SOFF_T(pdata,0,allocation_size); - SOFF_T(pdata,8,size); + SOFF_T(pdata,8,file_size); SIVAL(pdata,16,sbuf.st_nlink); SCVAL(pdata,20,delete_pending); SCVAL(pdata,21,(mode&aDIR)?1:0); @@ -1917,7 +1927,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, size_t byte_len = dos_PutUniCode(pdata+24,"::$DATA", 0xE, False); SIVAL(pdata,0,0); /* ??? */ SIVAL(pdata,4,byte_len); /* Byte length of unicode string ::$DATA */ - SOFF_T(pdata,8,size); + SOFF_T(pdata,8,file_size); SIVAL(pdata,16,allocation_size); SIVAL(pdata,20,0); /* ??? */ data_size = 24 + byte_len; @@ -1925,7 +1935,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, break; case SMB_FILE_COMPRESSION_INFORMATION: - SOFF_T(pdata,0,size); + SOFF_T(pdata,0,allocation_size); SIVAL(pdata,8,0); /* ??? */ SIVAL(pdata,12,0); /* ??? */ data_size = 16; @@ -1937,7 +1947,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, put_long_date(pdata+16,sbuf.st_mtime); /* write time */ put_long_date(pdata+24,sbuf.st_mtime); /* change time */ SIVAL(pdata,32,allocation_size); - SOFF_T(pdata,40,size); + SOFF_T(pdata,40,file_size); SIVAL(pdata,48,mode); SIVAL(pdata,52,0); /* ??? */ data_size = 56; @@ -2460,7 +2470,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, if (ret == -1) return ERROR_NT(NT_STATUS_DISK_FULL); - /* Allocate can trucate size... */ + /* Allocate can truncate size... */ size = new_sbuf.st_size; } From 0ddfa38e8dd04947487be39614ccf23043e4d739 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 29 Jul 2002 12:52:27 +0000 Subject: [PATCH 131/262] We don't need this silly unix username stuff. NT username is basicly unused, and must == unix username for sane implementation in passdb. Andrew Bartlett (This used to be commit 412c791980de7f88a926b2f9ed361f0f882594c8) --- source3/rpcclient/samsync.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index e20322cbc5f..938a843d15c 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -268,6 +268,9 @@ static void sam_account_from_delta(SAM_ACCOUNT *account, unistr2_to_ascii(s, &delta->uni_acct_name, sizeof(s) - 1); pdb_set_nt_username(account, s); + /* Unix username is the same - for sainity */ + pdb_set_username(account, s); + unistr2_to_ascii(s, &delta->uni_full_name, sizeof(s) - 1); pdb_set_fullname(account, s); @@ -289,19 +292,6 @@ static void sam_account_from_delta(SAM_ACCOUNT *account, unistr2_to_ascii(s, &delta->uni_profile, sizeof(s) - 1); pdb_set_profile_path(account, s, True); - /* Set Unix username to be winbindd username */ - - { - char *unix_username; - - asprintf(&unix_username, "%s%s%s", lp_workgroup(), - lp_winbind_separator(), pdb_get_nt_username(account)); - - pdb_set_username(account, unix_username); - - SAFE_FREE(unix_username); - } - /* User and group sid */ sid_copy(&sid, &domain_sid); From c4dbf09d9d67f0a438a74c04476478450f382264 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Jul 2002 13:10:03 +0000 Subject: [PATCH 132/262] introduced a get_file_size() macro in trans2.c to make it easier to experiment with file size returns (This used to be commit c529cee0b2925184376e3a14e83fa99b3636d4ce) --- source3/smbd/trans2.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 3a8e41c6546..a66c0292863 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -40,6 +40,8 @@ SMB_OFF_T get_allocation_size(SMB_STRUCT_STAT *sbuf) return ret; } +#define get_file_size(sbuf) (sbuf.st_size) + /**************************************************************************** Send the required number of replies back. @@ -267,7 +269,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i return(UNIXERROR(ERRDOS,ERRnoaccess)); } - size = sbuf.st_size; + size = get_file_size(sbuf); fmode = dos_mode(conn,fname,&sbuf); mtime = sbuf.st_mtime; inode = sbuf.st_ino; @@ -464,7 +466,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, uint32 reskey=0; int prev_dirpos=0; int mode=0; - SMB_OFF_T size = 0; + SMB_OFF_T file_size = 0; SMB_OFF_T allocation_size = 0; uint32 len; time_t mdate=0, adate=0, cdate=0; @@ -576,7 +578,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, continue; } - size = sbuf.st_size; + file_size = get_file_size(sbuf); allocation_size = get_allocation_size(&sbuf); mdate = sbuf.st_mtime; adate = sbuf.st_atime; @@ -589,7 +591,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, } if(mode & aDIR) - size = 0; + file_size = 0; DEBUG(5,("get_lanman2_dir_entry found %s fname=%s\n",pathreal,fname)); @@ -613,7 +615,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, put_dos_date2(p,l1_fdateCreation,cdate); put_dos_date2(p,l1_fdateLastAccess,adate); put_dos_date2(p,l1_fdateLastWrite,mdate); - SIVAL(p,l1_cbFile,(uint32)size); + SIVAL(p,l1_cbFile,(uint32)file_size); SIVAL(p,l1_cbFileAlloc,(uint32)allocation_size); SSVAL(p,l1_attrFile,mode); p += l1_achName; @@ -632,7 +634,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, put_dos_date2(p,l2_fdateCreation,cdate); put_dos_date2(p,l2_fdateLastAccess,adate); put_dos_date2(p,l2_fdateLastWrite,mdate); - SIVAL(p,l2_cbFile,(uint32)size); + SIVAL(p,l2_cbFile,(uint32)file_size); SIVAL(p,l2_cbFileAlloc,(uint32)allocation_size); SSVAL(p,l2_attrFile,mode); SIVAL(p,l2_cbList,0); /* No extended attributes */ @@ -652,7 +654,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, put_long_date(p,adate); p += 8; put_long_date(p,mdate); p += 8; put_long_date(p,mdate); p += 8; - SOFF_T(p,0,size); + SOFF_T(p,0,file_size); SOFF_T(p,8,allocation_size); p += 16; SIVAL(p,0,nt_extmode); p += 4; @@ -686,7 +688,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, put_long_date(p,adate); p += 8; put_long_date(p,mdate); p += 8; put_long_date(p,mdate); p += 8; - SOFF_T(p,0,size); + SOFF_T(p,0,file_size); SOFF_T(p,8,allocation_size); p += 16; SIVAL(p,0,nt_extmode); p += 4; @@ -707,7 +709,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, put_long_date(p,adate); p += 8; put_long_date(p,mdate); p += 8; put_long_date(p,mdate); p += 8; - SOFF_T(p,0,size); + SOFF_T(p,0,file_size); SOFF_T(p,8,allocation_size); p += 16; SIVAL(p,0,nt_extmode); p += 4; @@ -746,14 +748,14 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn, SIVAL(p,0,reskey); p+= 4; /* Used for continuing search. */ /* Begin of SMB_QUERY_FILE_UNIX_BASIC */ - SOFF_T(p,0,sbuf.st_size); /* File size 64 Bit */ + SOFF_T(p,0,get_file_size(sbuf)); /* File size 64 Bit */ p+= 8; #if defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE) SOFF_T(p,0,sbuf.st_blocks*STAT_ST_BLOCKSIZE); /* Number of bytes used on disk - 64 Bit */ #else /* Can't get the value - fake it using size. */ - SOFF_T(p,0,sbuf.st_size); /* Number of bytes used on disk - 64 Bit */ + SOFF_T(p,0,get_file_size(sbuf)); /* Number of bytes used on disk - 64 Bit */ #endif p+= 8; @@ -1654,7 +1656,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, mode = dos_mode(conn,fname,&sbuf); fullpathname = fname; - file_size = sbuf.st_size; + file_size = get_file_size(sbuf); allocation_size = get_allocation_size(&sbuf); if (mode & aDIR) file_size = 0; @@ -1967,14 +1969,14 @@ static int call_trans2qfilepathinfo(connection_struct *conn, DEBUG(4,("call_trans2qfilepathinfo: st_mode=%o\n",(int)sbuf.st_mode)); - SOFF_T(pdata,0,sbuf.st_size); /* File size 64 Bit */ + SOFF_T(pdata,0,get_file_size(sbuf)); /* File size 64 Bit */ pdata += 8; #if defined(HAVE_STAT_ST_BLOCKS) && defined(STAT_ST_BLOCKSIZE) SOFF_T(pdata,0,sbuf.st_blocks*STAT_ST_BLOCKSIZE); /* Number of bytes used on disk - 64 Bit */ #else /* Can't get the value - fake it using size. */ - SOFF_T(pdata,0,sbuf.st_size); /* Number of bytes used on disk - 64 Bit */ + SOFF_T(pdata,0,get_file_size(sbuf)); /* Number of bytes used on disk - 64 Bit */ #endif pdata += 8; @@ -2321,7 +2323,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, sbuf.st_mtime = fsp->pending_modtime; } - size = sbuf.st_size; + size = get_file_size(sbuf); tvs.modtime = sbuf.st_mtime; tvs.actime = sbuf.st_atime; dosmode = dos_mode(conn,fname,&sbuf); @@ -2424,7 +2426,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, DEBUG(10,("call_trans2setfilepathinfo: Set file allocation info for file %s to %.0f\n", fname, (double)allocation_size )); - if(allocation_size != sbuf.st_size) { + if(allocation_size != get_file_size(sbuf)) { SMB_STRUCT_STAT new_sbuf; DEBUG(10,("call_trans2setfilepathinfo: file %s : setting new allocation size to %.0f\n", @@ -2471,7 +2473,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, return ERROR_NT(NT_STATUS_DISK_FULL); /* Allocate can truncate size... */ - size = new_sbuf.st_size; + size = get_file_size(new_sbuf); } break; @@ -2726,7 +2728,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", * changing the size of a file. */ if (!size) - size = sbuf.st_size; + size = get_file_size(sbuf); } /* @@ -2768,7 +2770,7 @@ size = %.0f, uid = %u, gid = %u, raw perms = 0%o\n", } } - if(size != sbuf.st_size) { + if (size != get_file_size(sbuf)) { int ret; From d7ad31cdea8fa2ad1f71968388305960076e387f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 13:24:56 +0000 Subject: [PATCH 133/262] merge from SAMBA_2_2 (This used to be commit c268ae460e7e6fe25b6ac1583ea6d2f233c27d0f) --- source3/rpc_server/srv_spoolss_nt.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 46aebbe3a33..4691cbee015 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8234,7 +8234,6 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ while (get_specific_param_by_index(*printer, 2, param_index, value, &data, &type, &data_len)) { PRINTER_ENUM_VALUES *ptr; - uint32 add_len = 0; DEBUG(10,("retrieved value number [%d] [%s]\n", num_entries, value)); @@ -8245,19 +8244,26 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ goto done; } enum_values = ptr; + + ZERO_STRUCTP( &enum_values[num_entries] ); /* copy the data */ + init_unistr(&enum_values[num_entries].valuename, value); enum_values[num_entries].value_len = (strlen(value)+1) * 2; enum_values[num_entries].type = type; - if (!(enum_values[num_entries].data=talloc_zero(p->mem_ctx, data_len+add_len))) { - DEBUG(0,("talloc_realloc failed to allocate more memory for data!\n")); - result = WERR_NOMEM; - goto done; + if ( data_len ) + { + if ( !(enum_values[num_entries].data = talloc_zero(p->mem_ctx, data_len)) ) { + DEBUG(0,("talloc_realloc failed to allocate more memory [data_len=%d] for data!\n", data_len )); + result = WERR_NOMEM; + goto done; + } + memcpy(enum_values[num_entries].data, data, data_len); } - memcpy(enum_values[num_entries].data, data, data_len); - enum_values[num_entries].data_len = data_len + add_len; + + enum_values[num_entries].data_len = data_len; /* keep track of the size of the array in bytes */ From ea27af285a3d32101bdc52ff4a8ff9cdebd4b256 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 16:22:37 +0000 Subject: [PATCH 134/262] simple perl script for retreiving cvs log messages for a file after a given date. I use it to help update the WHATSNEW.txt for a release. ./cvslog.pl SAMBA_2_2 '>2002-06-18' configure.in The output is a little messy right now, but I plan to clean that up. (This used to be commit 8812223e2a37b0d0f143fcc74c6ba85ac8081ffb) --- source3/script/cvslog.pl | 102 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 source3/script/cvslog.pl diff --git a/source3/script/cvslog.pl b/source3/script/cvslog.pl new file mode 100755 index 00000000000..f3d020aa722 --- /dev/null +++ b/source3/script/cvslog.pl @@ -0,0 +1,102 @@ +#!/usr/bin/perl -w + +my ( $tag, $filename, $date ); +my ( $tmp, $change_flag ); + +if ( $#ARGV != 2 ) { + + print "Usage: ", $0, " cvstag date file\n"; + exit 1; +} + +$tag = $ARGV[0]; +$date = $ARGV[1]; +$filename = $ARGV[2]; + +print STDERR "$filename\n"; + +open ( CVSLOG, "cvs log -d\"$date\" $filename |" ) || die $!; + +## +## First get the branch revision number +## +undef $revision; +while ( !defined($revision) ) { + if ( eof( \*CVSLOG ) ) { + print STDERR "Premature end of cvs log output!\n"; + exit (1); + } + + $string = ; + chomp( $string ); + + if ( $string =~ /$tag:/ ) { + ( $tmp, $revision ) = split( /:/, $string ); + $revision =~ s/\s+//g; + $revision =~ s/\.0\./\./g; + } +} + +## +## Setup the beginning of the first record +## +$string = ""; +while ( $string !~ /^-+/ ) { + $string = ; + exit(0) if ( eof(\*CVSLOG) ); +} + +## +## Loop starting at the revision number for the entry +## + +while ( $string = ) { + + ($tmp, $entry_rev) = split( /\s+/, $string ); + if ( equal_revision( $revision, $entry_rev ) ) { + if ( ! defined($change_flag) ) { + print "++++++++++++++++++++++++++++++++++++++++++++++++++\n"; + print "## $filename\n"; + print "++\n"; + $change_flag = 1; + } + + while ( $string !~ /^-+/ && !eof(CVSLOG) ) { + print "$string"; + $string = ; + } + } + else { + while ( ($string !~ /^-+/) && !eof(CVSLOG) ) { + $string = ; + } + } +} + +close( CVSLOG ); +exit 0; + +############################################################## +## +sub equal_revision { + my ( $branch, $newfile ) = @_; + my ( $indx ); + my ( @branch_rev, @file_rev ); + + @branch_rev = split( /\./, $branch ); + @file_rev = split( /\./, $newfile ); + + return 0 if ( $#branch_rev != ($#file_rev - 1) ); + + $indx = 0; + while( $indx <= $#branch_rev ) { + if ( $branch_rev[$indx] != $file_rev[$indx] ) { + return 0; + } + $indx++; + } + + return 1; +} + + From 787cd2c1e9e9c873d4067d78fdb02b31894fff93 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 18:06:22 +0000 Subject: [PATCH 135/262] hardcode printprocessor name since it is everywhere else (This used to be commit efbfb8ca5415424827f4b01c9e79439ab8cc9b1c) --- source3/registry/reg_printing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 145b8230c98..3fd36804894 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -569,7 +569,7 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val ) regval_ctr_addvalue( val, "Share", REG_SZ, info2->sharename, sizeof(info2->sharename)+1 ); regval_ctr_addvalue( val, "Driver", REG_SZ, info2->drivername, sizeof(info2->drivername)+1 ); regval_ctr_addvalue( val, "Separator File", REG_SZ, info2->sepfile, sizeof(info2->sepfile)+1 ); - regval_ctr_addvalue( val, "Print Processor", REG_SZ, info2->printprocessor, sizeof(info2->printprocessor)+1 ); + regval_ctr_addvalue( val, "Print Processor", REG_SZ, "winprint", sizeof("winprint")+1 ); /* use a prs_struct for converting the devmode and security From d6a3fd8ad4f01b20eda7eff91cfb336b183c08ac Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 18:10:18 +0000 Subject: [PATCH 136/262] passing -1 for the src length in rpcstr_pull results in only converting the first character of the unicode string., See convert_string() for why. uniarray_2_dosarray() passes 0 for the src length now which works. (This used to be commit 0793612cca3bba55d5e5e2970308f95839f208b4) --- source3/rpc_parse/parse_spoolss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index b10a5c43771..bc1691d26ba 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -5183,7 +5183,7 @@ static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar) *ar = NULL; while (src < ((char *)buf5->buffer) + buf5->buf_len*2) { - rpcstr_pull(f, src, sizeof(f)-1, -1, 0); + rpcstr_pull(f, src, sizeof(f)-1, 0, 0); src = skip_unibuf(src, 2*buf5->buf_len - PTR_DIFF(src,buf5->buffer)); tar = (fstring *)Realloc(*ar, sizeof(fstring)*(n+2)); if (!tar) From 9f7e67c6f9eec4f21d5afbe323dc1c664ff52b54 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 18:10:59 +0000 Subject: [PATCH 137/262] couple of minor formatting fixes to help me see better. (This used to be commit 26027ee42ae378eef59a8ae46f5e4e44bf2d4af0) --- source3/printing/nt_printing.c | 6 ++---- source3/rpc_server/srv_spoolss_nt.c | 7 +++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 76325c2990c..f0995db06df 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1222,8 +1222,7 @@ static WERROR clean_up_driver_struct_level_3(NT_PRINTER_DRIVER_INFO_LEVEL_3 *dri /**************************************************************************** ****************************************************************************/ -static WERROR clean_up_driver_struct_level_6(NT_PRINTER_DRIVER_INFO_LEVEL_6 *driver, - struct current_user *user) +static WERROR clean_up_driver_struct_level_6(NT_PRINTER_DRIVER_INFO_LEVEL_6 *driver, struct current_user *user) { fstring architecture; fstring new_name; @@ -1278,8 +1277,7 @@ static WERROR clean_up_driver_struct_level_6(NT_PRINTER_DRIVER_INFO_LEVEL_6 *dri * NT 4: cversion=2 * NT2K: cversion=3 */ - if ((driver->version = get_correct_cversion(architecture, - driver->driverpath, user, &err)) == -1) + if ((driver->version = get_correct_cversion(architecture, driver->driverpath, user, &err)) == -1) return err; return WERR_OK; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 4691cbee015..20a586a6fb4 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -6813,7 +6813,6 @@ WERROR _spoolss_addprinterex( pipes_struct *p, SPOOL_Q_ADDPRINTEREX *q_u, SPOOL_ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, SPOOL_R_ADDPRINTERDRIVER *r_u) { -/* UNISTR2 *server_name = &q_u->server_name; - notused. */ uint32 level = q_u->level; SPOOL_PRINTER_DRIVER_INFO_LEVEL *info = &q_u->info; WERROR err = WERR_OK; @@ -6891,7 +6890,9 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, version = driver.info_6->version; else version = -1; - switch (version) { + + switch (version) + { /* * 9x printer driver - never delete init data */ @@ -6962,12 +6963,14 @@ WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX * return WERR_ACCESS_DENIED; /* just pass the information off to _spoolss_addprinterdriver() */ + ZERO_STRUCT(q_u_local); ZERO_STRUCT(r_u_local); q_u_local.server_name_ptr = q_u->server_name_ptr; copy_unistr2(&q_u_local.server_name, &q_u->server_name); q_u_local.level = q_u->level; + memcpy( &q_u_local.info, &q_u->info, sizeof(SPOOL_PRINTER_DRIVER_INFO_LEVEL) ); return _spoolss_addprinterdriver( p, &q_u_local, &r_u_local ); From c17dc6c55c3a5a2912028a1d6a713f26b3b91c63 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 19:45:15 +0000 Subject: [PATCH 138/262] add another registry rpc (opnum 0x14). Have no idea what it's real name is. I'm calling it REG_SAVE_KEY, because 2k preps a regedt32.exe Registry->Save Key with this call. Done in the process of tracking down a PrinterDriverData issue. (This used to be commit 66104a361424f10cc986c597b91afa6f12b3cd8a) --- source3/include/rpc_reg.h | 25 +++++++++++++- source3/rpc_parse/parse_reg.c | 60 ++++++++++++++++++++++++++++++--- source3/rpc_server/srv_reg.c | 26 ++++++++++++++ source3/rpc_server/srv_reg_nt.c | 24 +++++++++++++ 4 files changed, 130 insertions(+), 5 deletions(-) diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h index 41d33250158..92175cf287b 100644 --- a/source3/include/rpc_reg.h +++ b/source3/include/rpc_reg.h @@ -38,7 +38,6 @@ #define _REG_UNK_0E 0x0e #define _REG_UNK_12 0x12 #define _REG_UNK_13 0x13 -#define _REG_UNK_14 0x14 #define REG_SET_KEY_SEC 0x15 #define REG_CREATE_VALUE 0x16 #define _REG_UNK_17 0x17 @@ -56,6 +55,7 @@ #define REG_INFO 0x11 #define REG_SHUTDOWN 0x18 #define REG_ABORT_SHUTDOWN 0x19 +#define REG_SAVE_KEY 0x14 /* no idea what the real name is */ #define REG_UNKNOWN_1A 0x1a @@ -455,6 +455,29 @@ typedef struct r_reg_unk_1a_info } REG_R_UNKNOWN_1A; +/* REG_Q_UNKNOWN_1A */ +typedef struct q_reg_unknown_14 +{ + POLICY_HND pol; /* policy handle */ + + UNIHDR hdr_file; /* unicode product type header */ + UNISTR2 uni_file; /* local filename to save key as from regedt32.exe */ + /* e.g. "c:\temp\test.dat" */ + + uint32 unknown; /* 0x0000 0000 */ + +} REG_Q_SAVE_KEY; + + +/* REG_R_UNKNOWN_1A */ +typedef struct r_reg_unknown_14 +{ + NTSTATUS status; /* return status */ + +} REG_R_SAVE_KEY; + + + /* REG_Q_CLOSE */ typedef struct reg_q_close_info { diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 925d8b856e8..473e2554b40 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1,4 +1,4 @@ -/* +/* * Unix SMB/CIFS implementation. * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, @@ -669,7 +669,7 @@ BOOL reg_io_r_query_key(char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int d return False; if(!smb_io_time("mod_time ", &r_r->mod_time, ps, depth)) return False; - + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; @@ -685,6 +685,7 @@ void init_reg_q_unknown_1a(REG_Q_UNKNOWN_1A *q_o, POLICY_HND *hnd) memcpy(&q_o->pol, hnd, sizeof(q_o->pol)); } + /******************************************************************* reads or writes a structure. ********************************************************************/ @@ -699,7 +700,7 @@ BOOL reg_io_q_unknown_1a(char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int if(!prs_align(ps)) return False; - + if(!smb_io_pol_hnd("", &r_q->pol, ps, depth)) return False; @@ -720,7 +721,7 @@ BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int if(!prs_align(ps)) return False; - + if(!prs_uint32("unknown", ps, depth, &r_r->unknown)) return False; if(!prs_ntstatus("status" , ps, depth, &r_r->status)) @@ -729,6 +730,57 @@ BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int return True; } + +/******************************************************************* +reads or writes a structure. +********************************************************************/ + +BOOL reg_io_q_save_key(char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth) +{ + if (r_q == NULL) + return False; + + prs_debug(ps, depth, desc, "reg_io_q_save_key"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("", &r_q->pol, ps, depth)) + return False; + + if(!smb_io_unihdr ("hdr_file", &r_q->hdr_file, ps, depth)) + return False; + if(!smb_io_unistr2("uni_file", &r_q->uni_file, r_q->hdr_file.buffer, ps, depth)) + return False; + + if(!prs_uint32("unknown", ps, depth, &r_q->unknown)) + return False; + + return True; +} + +/******************************************************************* +reads or writes a structure. +********************************************************************/ + +BOOL reg_io_r_save_key(char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth) +{ + if (r_r == NULL) + return False; + + prs_debug(ps, depth, desc, "reg_io_r_save_key"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_ntstatus("status" , ps, depth, &r_r->status)) + return False; + + return True; +} + /******************************************************************* Inits a structure. ********************************************************************/ diff --git a/source3/rpc_server/srv_reg.c b/source3/rpc_server/srv_reg.c index cb96005db10..d0aaf0199bd 100644 --- a/source3/rpc_server/srv_reg.c +++ b/source3/rpc_server/srv_reg.c @@ -341,6 +341,31 @@ static BOOL api_reg_enum_value(pipes_struct *p) return True; } +/******************************************************************* + api_reg_save_key + ********************************************************************/ + +static BOOL api_reg_save_key(pipes_struct *p) +{ + REG_Q_SAVE_KEY q_u; + REG_R_SAVE_KEY r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if(!reg_io_q_save_key("", &q_u, data, 0)) + return False; + + r_u.status = _reg_save_key(p, &q_u, &r_u); + + if(!reg_io_r_save_key("", &r_u, rdata, 0)) + return False; + + return True; +} + /******************************************************************* @@ -360,6 +385,7 @@ static struct api_struct api_reg_cmds[] = { "REG_SHUTDOWN" , REG_SHUTDOWN , api_reg_shutdown }, { "REG_ABORT_SHUTDOWN" , REG_ABORT_SHUTDOWN , api_reg_abort_shutdown }, { "REG_UNKNOWN_1A" , REG_UNKNOWN_1A , api_reg_unknown_1a }, + { "REG_SAVE_KEY" , REG_SAVE_KEY , api_reg_save_key }, { NULL , 0 , NULL } }; diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c index 7ebf940588c..cd9596d2a72 100644 --- a/source3/rpc_server/srv_reg_nt.c +++ b/source3/rpc_server/srv_reg_nt.c @@ -622,4 +622,28 @@ NTSTATUS _reg_abort_shutdown(pipes_struct *p, REG_Q_ABORT_SHUTDOWN *q_u, REG_R_A return status; } +/******************************************************************* + REG_SAVE_KEY (0x14) + ********************************************************************/ + +NTSTATUS _reg_save_key(pipes_struct *p, REG_Q_SAVE_KEY *q_u, REG_R_SAVE_KEY *r_u) +{ + REGISTRY_KEY *regkey = find_regkey_index_by_hnd( p, &q_u->pol ); + + DEBUG(5,("_reg_save_key: Enter\n")); + + /* + * basically this is a no op function which just gverifies + * that the client gave us a valid registry key handle + */ + + if ( !regkey ) + return NT_STATUS_INVALID_HANDLE; + + DEBUG(8,("_reg_save_key: berifying backup of key [%s]\n", regkey->name)); + + + return NT_STATUS_OK; +} + From 362f534fa1152e9fc3d195bd1200b4c5d3e037e2 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 23:50:54 +0000 Subject: [PATCH 139/262] Our include popt is starting to get a bit old - fixed some compile problems here. Also fixed some non-constant initialisers in samsync. (This used to be commit 33bd7214736dafd5927d63af5f8510646b81e7df) --- source3/lib/popt_common.c | 2 +- source3/rpcclient/samsync.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 288cd41b27b..a3d6af4fbc1 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -45,5 +45,5 @@ struct poptOption popt_common_debug[] = { { NULL, 0, POPT_ARG_CALLBACK, debug_callback }, { "debuglevel", 'd', POPT_ARG_INT, NULL, 'd', "Set debug level", "DEBUGLEVEL" }, - POPT_TABLEEND + { 0 } }; diff --git a/source3/rpcclient/samsync.c b/source3/rpcclient/samsync.c index 938a843d15c..3694eb47dfa 100644 --- a/source3/rpcclient/samsync.c +++ b/source3/rpcclient/samsync.c @@ -594,7 +594,7 @@ struct poptOption popt_common_auth_info[] = { "[DOMAIN\\]username[%password]" }, { "domain", 'W', POPT_ARG_STRING, NULL, 'W', "Set domain name", "DOMAIN"}, - POPT_TABLEEND + { 0 } }; static BOOL popt_interactive; @@ -607,7 +607,7 @@ BOOL popt_common_is_interactive(void) struct poptOption popt_common_interactive[] = { { "interactive", 'i', POPT_ARG_NONE, &popt_interactive, 'i', "Log to stdout" }, - POPT_TABLEEND + { 0 } }; int main(int argc, char **argv) @@ -634,7 +634,7 @@ struct poptOption popt_common_interactive[] = { { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_auth_info }, { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_interactive }, POPT_AUTOHELP - POPT_TABLEEND + { 0 } }; /* Read command line options */ From 58fa0ad55a29c33828654291b6c8cac28561094a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 30 Jul 2002 01:06:20 +0000 Subject: [PATCH 140/262] Fixed for memory leak in connection caching code when a dc is permanently down. Found by Dan Coppock. (This used to be commit 13c0cc830e3d787a0c3a1aedd47641597026541e) --- source3/nsswitch/winbindd_cm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 674e71679c1..02162bbd23f 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -262,11 +262,23 @@ static struct failed_connection_cache *failed_connection_cache; /* Add an entry to the failed conneciton cache */ -static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, NTSTATUS result) { +static void add_failed_connection_entry(struct winbindd_cm_conn *new_conn, + NTSTATUS result) +{ struct failed_connection_cache *fcc; SMB_ASSERT(!NT_STATUS_IS_OK(result)); + /* Check we already aren't in the cache */ + + for (fcc = failed_connection_cache; fcc; fcc = fcc->next) { + if (strequal(fcc->domain_name, new_conn->domain)) { + DEBUG(10, ("domain %s already tried and failed\n", + fcc->domain_name)); + return; + } + } + /* Create negative lookup cache entry for this domain and controller */ if (!(fcc = (struct failed_connection_cache *) From c0cd7e0ce3e06c94bacffd86a5fb53ae861844d0 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 30 Jul 2002 01:25:59 +0000 Subject: [PATCH 141/262] Do AC_MSG_RESULT(yes) when using included popt. (This used to be commit edd91fa854356739301604968f15e0a662986d65) --- source3/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/configure.in b/source3/configure.in index e73047de6c1..0531675c7d7 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2768,7 +2768,7 @@ fi AC_MSG_CHECKING(whether to use included popt) if test x"$INCLUDED_POPT" = x"yes"; then - AC_MSG_RESULT($srcdir/popt) + AC_MSG_RESULT(yes) BUILD_POPT='$(POPT_OBJS)' FLAGS1="-I$srcdir/popt" else From 884460c2557dacff13a381157c50d964c25b0396 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 30 Jul 2002 01:26:25 +0000 Subject: [PATCH 142/262] Reran configure. (This used to be commit a306924c9a07ed3cedbb38852d508b30b84235a6) --- source3/configure | 1385 +++++++++++++++++++++++---------------------- 1 file changed, 694 insertions(+), 691 deletions(-) diff --git a/source3/configure b/source3/configure index cf98d12a11c..7fd759b6fbb 100755 --- a/source3/configure +++ b/source3/configure @@ -1115,7 +1115,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -2867,15 +2867,16 @@ else #line 2868 "configure" #include "confdefs.h" #include -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); - return(0); + exit(0); } EOF -if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2895,7 +2896,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2899: checking size of long" >&5 +echo "configure:2900: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2903,18 +2904,19 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); - return(0); + exit(0); } EOF -if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2934,7 +2936,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2938: checking size of short" >&5 +echo "configure:2940: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2942,18 +2944,19 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < -int main() +#include +main() { FILE *f=fopen("conftestval", "w"); - if (!f) return(1); + if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); - return(0); + exit(0); } EOF -if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2974,12 +2977,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2978: checking for working const" >&5 +echo "configure:2981: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3049,21 +3052,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3053: checking for inline" >&5 +echo "configure:3056: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3089,14 +3092,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3093: checking whether byte ordering is bigendian" >&5 +echo "configure:3096: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3107,11 +3110,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3122,7 +3125,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3142,7 +3145,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3179,14 +3182,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3183: checking whether char is unsigned" >&5 +echo "configure:3186: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3243,12 +3246,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3247: checking return type of signal handlers" >&5 +echo "configure:3250: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3265,7 +3268,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3284,12 +3287,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3288: checking for uid_t in sys/types.h" >&5 +echo "configure:3291: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3318,12 +3321,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3322: checking for mode_t" >&5 +echo "configure:3325: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3351,12 +3354,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3355: checking for off_t" >&5 +echo "configure:3358: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3384,12 +3387,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3388: checking for size_t" >&5 +echo "configure:3391: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3417,12 +3420,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3421: checking for pid_t" >&5 +echo "configure:3424: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3450,12 +3453,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3454: checking for st_rdev in struct stat" >&5 +echo "configure:3457: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3463,7 +3466,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3484,12 +3487,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3488: checking for d_off in dirent" >&5 +echo "configure:3491: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3499,7 +3502,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3520,12 +3523,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3524: checking for ino_t" >&5 +echo "configure:3527: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3553,12 +3556,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3557: checking for loff_t" >&5 +echo "configure:3560: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3586,12 +3589,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3590: checking for offset_t" >&5 +echo "configure:3593: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3619,12 +3622,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3623: checking for ssize_t" >&5 +echo "configure:3626: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3652,12 +3655,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3656: checking for wchar_t" >&5 +echo "configure:3659: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3699,7 +3702,7 @@ if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3703: checking for $ac_word" >&5 +echo "configure:3706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3748,12 +3751,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3752: checking for $ac_func" >&5 +echo "configure:3755: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3802,7 +3805,7 @@ done if test x"$ac_cv_func_dlopen" = x"no"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3806: checking for dlopen in -ldl" >&5 +echo "configure:3809: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3810,7 +3813,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3851,13 +3854,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3855: checking for immediate structures" >&5 +echo "configure:3858: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3875,7 +3878,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3898,13 +3901,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3902: checking for unix domain sockets" >&5 +echo "configure:3905: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3919,7 +3922,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3941,13 +3944,13 @@ fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3945: checking for socklen_t type" >&5 +echo "configure:3948: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3960,7 +3963,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3981,13 +3984,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3985: checking for sig_atomic_t type" >&5 +echo "configure:3988: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4000,7 +4003,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -4023,20 +4026,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4027: checking for errno declaration" >&5 +echo "configure:4030: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -4058,20 +4061,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4062: checking for setresuid declaration" >&5 +echo "configure:4065: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -4093,20 +4096,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4097: checking for setresgid declaration" >&5 +echo "configure:4100: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -4128,20 +4131,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4132: checking for asprintf declaration" >&5 +echo "configure:4135: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4163,20 +4166,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4167: checking for vasprintf declaration" >&5 +echo "configure:4170: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4198,20 +4201,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4202: checking for vsnprintf declaration" >&5 +echo "configure:4205: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4233,20 +4236,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4237: checking for snprintf declaration" >&5 +echo "configure:4240: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4270,7 +4273,7 @@ EOF # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4274: checking for real setresuid" >&5 +echo "configure:4277: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4279,12 +4282,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -4309,7 +4312,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4313: checking for real setresgid" >&5 +echo "configure:4316: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4318,13 +4321,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresgid=yes else @@ -4347,7 +4350,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4351: checking for 8-bit clean memcmp" >&5 +echo "configure:4354: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4355,7 +4358,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4388,12 +4391,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4392: checking for $ac_func" >&5 +echo "configure:4395: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4442,7 +4445,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4446: checking for crypt in -lcrypt" >&5 +echo "configure:4449: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4450,7 +4453,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4494,7 +4497,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4498: checking whether to use readline" >&5 +echo "configure:4501: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4506,17 +4509,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4510: checking for $ac_hdr" >&5 +echo "configure:4513: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4546,17 +4549,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4550: checking for $ac_hdr" >&5 +echo "configure:4553: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4587,17 +4590,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4591: checking for $ac_hdr" >&5 +echo "configure:4594: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4620,7 +4623,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4624: checking for tgetent in -l${termlib}" >&5 +echo "configure:4627: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4628,7 +4631,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4661,7 +4664,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4665: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4668: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4669,7 +4672,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4731,17 +4734,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4735: checking for $ac_hdr" >&5 +echo "configure:4738: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4771,17 +4774,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4775: checking for $ac_hdr" >&5 +echo "configure:4778: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4812,17 +4815,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4816: checking for $ac_hdr" >&5 +echo "configure:4819: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4845,7 +4848,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4849: checking for tgetent in -l${termlib}" >&5 +echo "configure:4852: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4853,7 +4856,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4886,7 +4889,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4890: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4893: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4894,7 +4897,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4955,7 +4958,7 @@ fi # code will generate warnings on one of them unless we have a few # special cases. echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:4959: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:4962: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4963,7 +4966,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5007,12 +5010,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5011: checking for $ac_func" >&5 +echo "configure:5014: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5063,7 +5066,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5067: checking for printf in -lnsl_s" >&5 +echo "configure:5070: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5071,7 +5074,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5113,7 +5116,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5117: checking for printf in -lnsl" >&5 +echo "configure:5120: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5121,7 +5124,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5163,7 +5166,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5167: checking for connect in -lsocket" >&5 +echo "configure:5170: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5171,7 +5174,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5213,7 +5216,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5217: checking for connect in -linet" >&5 +echo "configure:5220: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5221,7 +5224,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5276,12 +5279,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5280: checking for $ac_func" >&5 +echo "configure:5283: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5330,7 +5333,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5334: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5337: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5338,7 +5341,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5379,12 +5382,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5383: checking for $ac_func" >&5 +echo "configure:5386: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5440,12 +5443,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5444: checking for $ac_func" >&5 +echo "configure:5447: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5495,12 +5498,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5499: checking for $ac_func" >&5 +echo "configure:5502: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5550,12 +5553,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5554: checking for $ac_func" >&5 +echo "configure:5557: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5605,12 +5608,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5609: checking for $ac_func" >&5 +echo "configure:5612: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5660,12 +5663,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5664: checking for $ac_func" >&5 +echo "configure:5667: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5715,12 +5718,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5719: checking for $ac_func" >&5 +echo "configure:5722: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5770,12 +5773,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5774: checking for $ac_func" >&5 +echo "configure:5777: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5825,12 +5828,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5829: checking for $ac_func" >&5 +echo "configure:5832: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5880,12 +5883,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5884: checking for $ac_func" >&5 +echo "configure:5887: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5935,12 +5938,12 @@ done for ac_func in syslog vsyslog getgrouplist do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5939: checking for $ac_func" >&5 +echo "configure:5942: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5991,12 +5994,12 @@ done for ac_func in setbuffer do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5995: checking for $ac_func" >&5 +echo "configure:5998: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6048,12 +6051,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6052: checking for $ac_func" >&5 +echo "configure:6055: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6104,12 +6107,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6108: checking for $ac_func" >&5 +echo "configure:6111: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6159,12 +6162,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6163: checking for $ac_func" >&5 +echo "configure:6166: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6214,12 +6217,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6218: checking for $ac_func" >&5 +echo "configure:6221: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6269,12 +6272,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6273: checking for $ac_func" >&5 +echo "configure:6276: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6324,12 +6327,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6328: checking for $ac_func" >&5 +echo "configure:6331: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6379,12 +6382,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6383: checking for $ac_func" >&5 +echo "configure:6386: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6434,12 +6437,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6438: checking for $ac_func" >&5 +echo "configure:6441: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6489,12 +6492,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6493: checking for $ac_func" >&5 +echo "configure:6496: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6544,12 +6547,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6548: checking for $ac_func" >&5 +echo "configure:6551: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6599,12 +6602,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6603: checking for $ac_func" >&5 +echo "configure:6606: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6654,12 +6657,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6658: checking for $ac_func" >&5 +echo "configure:6661: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6709,12 +6712,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6713: checking for $ac_func" >&5 +echo "configure:6716: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6764,12 +6767,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6768: checking for $ac_func" >&5 +echo "configure:6771: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6819,12 +6822,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6823: checking for $ac_func" >&5 +echo "configure:6826: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6878,9 +6881,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6882: checking for stat64 in " >&5 +echo "configure:6885: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6911,9 +6914,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6915: checking for lstat64 in " >&5 +echo "configure:6918: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6944,9 +6947,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6948: checking for fstat64 in " >&5 +echo "configure:6951: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6978,7 +6981,7 @@ fi ##################################### # we might need the resolv library on some systems echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:6982: checking for dn_expand in -lresolv" >&5 +echo "configure:6985: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6986,7 +6989,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7035,12 +7038,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7039: checking for $ac_func" >&5 +echo "configure:7042: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7088,7 +7091,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7092: checking for putprpwnam in -lsecurity" >&5 +echo "configure:7095: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7096,7 +7099,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7137,12 +7140,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7141: checking for $ac_func" >&5 +echo "configure:7144: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7196,12 +7199,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7200: checking for $ac_func" >&5 +echo "configure:7203: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7249,7 +7252,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7253: checking for putprpwnam in -lsec" >&5 +echo "configure:7256: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7257,7 +7260,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7298,12 +7301,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7302: checking for $ac_func" >&5 +echo "configure:7305: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7358,12 +7361,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7362: checking for $ac_func" >&5 +echo "configure:7365: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7411,7 +7414,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7415: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7418: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7419,7 +7422,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7460,12 +7463,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7464: checking for $ac_func" >&5 +echo "configure:7467: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7519,12 +7522,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7523: checking for $ac_func" >&5 +echo "configure:7526: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7572,7 +7575,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7576: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7579: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7580,7 +7583,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7621,12 +7624,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7625: checking for $ac_func" >&5 +echo "configure:7628: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7682,12 +7685,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7686: checking for $ac_func" >&5 +echo "configure:7689: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7735,7 +7738,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7739: checking for getspnam in -lgen" >&5 +echo "configure:7742: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7743,7 +7746,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7784,12 +7787,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7788: checking for $ac_func" >&5 +echo "configure:7791: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7844,12 +7847,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7848: checking for $ac_func" >&5 +echo "configure:7851: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7897,7 +7900,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7901: checking for getspnam in -lsecurity" >&5 +echo "configure:7904: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7905,7 +7908,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7946,12 +7949,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7950: checking for $ac_func" >&5 +echo "configure:7953: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8005,12 +8008,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8009: checking for $ac_func" >&5 +echo "configure:8012: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8058,7 +8061,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8062: checking for getspnam in -lsec" >&5 +echo "configure:8065: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8066,7 +8069,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8107,12 +8110,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8111: checking for $ac_func" >&5 +echo "configure:8114: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8167,12 +8170,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8171: checking for $ac_func" >&5 +echo "configure:8174: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8220,7 +8223,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8224: checking for bigcrypt in -lsecurity" >&5 +echo "configure:8227: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8228,7 +8231,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8269,12 +8272,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8273: checking for $ac_func" >&5 +echo "configure:8276: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8328,12 +8331,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8332: checking for $ac_func" >&5 +echo "configure:8335: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8381,7 +8384,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8385: checking for bigcrypt in -lsec" >&5 +echo "configure:8388: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8389,7 +8392,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8430,12 +8433,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8434: checking for $ac_func" >&5 +echo "configure:8437: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8490,12 +8493,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8494: checking for $ac_func" >&5 +echo "configure:8497: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8543,7 +8546,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8547: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8550: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8551,7 +8554,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8592,12 +8595,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8596: checking for $ac_func" >&5 +echo "configure:8599: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8651,12 +8654,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8655: checking for $ac_func" >&5 +echo "configure:8658: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8704,7 +8707,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8708: checking for getprpwnam in -lsec" >&5 +echo "configure:8711: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8712,7 +8715,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8753,12 +8756,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8757: checking for $ac_func" >&5 +echo "configure:8760: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8825,7 +8828,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8829: checking ability to build shared libraries" >&5 +echo "configure:8832: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8985,7 +8988,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8989: checking for $ac_word" >&5 +echo "configure:8992: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9042,17 +9045,17 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9046: checking linker flags for shared libraries" >&5 +echo "configure:9049: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9049: checking compiler flags for position-independent code" >&5 +echo "configure:9052: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9056: checking whether building shared libraries actually works" >&5 +echo "configure:9059: checking whether building shared libraries actually works" >&5 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9083,7 +9086,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9087: checking for long long" >&5 +echo "configure:9090: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9092,12 +9095,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -9124,20 +9127,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9128: checking for LL suffix on long long integers" >&5 +echo "configure:9131: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -9159,7 +9162,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9163: checking for 64 bit off_t" >&5 +echo "configure:9166: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9168,13 +9171,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -9197,7 +9200,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9201: checking for off64_t" >&5 +echo "configure:9204: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9206,7 +9209,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -9239,7 +9242,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9243: checking for 64 bit ino_t" >&5 +echo "configure:9246: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9248,13 +9251,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -9277,7 +9280,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9281: checking for ino64_t" >&5 +echo "configure:9284: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9286,7 +9289,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -9319,7 +9322,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9323: checking for dev64_t" >&5 +echo "configure:9326: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9328,7 +9331,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9361,13 +9364,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9365: checking for struct dirent64" >&5 +echo "configure:9368: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9400,7 +9403,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9404: checking for major macro" >&5 +echo "configure:9407: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9409,7 +9412,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9441,7 +9444,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9445: checking for minor macro" >&5 +echo "configure:9448: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9450,7 +9453,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9482,7 +9485,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9486: checking for unsigned char" >&5 +echo "configure:9489: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9491,12 +9494,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -9519,13 +9522,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9523: checking for sin_len in sock" >&5 +echo "configure:9526: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9534,7 +9537,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9555,13 +9558,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9559: checking whether seekdir returns void" >&5 +echo "configure:9562: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9570,7 +9573,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9591,20 +9594,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9595: checking for __FILE__ macro" >&5 +echo "configure:9598: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9625,20 +9628,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9629: checking for __FUNCTION__ macro" >&5 +echo "configure:9632: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9659,7 +9662,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9663: checking if gettimeofday takes tz argument" >&5 +echo "configure:9666: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9668,14 +9671,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -9698,13 +9701,13 @@ EOF fi echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9702: checking for __va_copy" >&5 +echo "configure:9705: checking for __va_copy" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < va_list ap1,ap2; @@ -9712,7 +9715,7 @@ int main() { __va_copy(ap1,ap2); ; return 0; } EOF -if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_VA_COPY=yes else @@ -9733,7 +9736,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9737: checking for C99 vsnprintf" >&5 +echo "configure:9740: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9742,7 +9745,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9769,7 +9772,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9792,7 +9795,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9796: checking for broken readdir" >&5 +echo "configure:9799: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9801,7 +9804,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9809,7 +9812,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -9832,13 +9835,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9836: checking for utimbuf" >&5 +echo "configure:9839: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9846,7 +9849,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9870,12 +9873,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9874: checking for $ac_func" >&5 +echo "configure:9877: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9924,13 +9927,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9928: checking for ut_name in utmp" >&5 +echo "configure:9931: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9938,7 +9941,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9959,13 +9962,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9963: checking for ut_user in utmp" >&5 +echo "configure:9966: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9973,7 +9976,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9994,13 +9997,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:9998: checking for ut_id in utmp" >&5 +echo "configure:10001: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10008,7 +10011,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -10029,13 +10032,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10033: checking for ut_host in utmp" >&5 +echo "configure:10036: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10043,7 +10046,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -10064,13 +10067,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10068: checking for ut_time in utmp" >&5 +echo "configure:10071: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10078,7 +10081,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -10099,13 +10102,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10103: checking for ut_tv in utmp" >&5 +echo "configure:10106: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10113,7 +10116,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -10134,13 +10137,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10138: checking for ut_type in utmp" >&5 +echo "configure:10141: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10148,7 +10151,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -10169,13 +10172,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10173: checking for ut_pid in utmp" >&5 +echo "configure:10176: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10183,7 +10186,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -10204,13 +10207,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10208: checking for ut_exit in utmp" >&5 +echo "configure:10211: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10218,7 +10221,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:10222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -10239,13 +10242,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10243: checking for ut_addr in utmp" >&5 +echo "configure:10246: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10253,7 +10256,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -10275,13 +10278,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10279: checking whether pututline returns pointer" >&5 +echo "configure:10282: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10289,7 +10292,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -10311,13 +10314,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10315: checking for ut_syslen in utmpx" >&5 +echo "configure:10318: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10325,7 +10328,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10349,7 +10352,7 @@ fi ################################################# # check for libiconv support echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10353: checking whether to use libiconv" >&5 +echo "configure:10356: checking whether to use libiconv" >&5 # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" @@ -10362,7 +10365,7 @@ if test "${with_libiconv+set}" = set; then CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10366: checking for iconv_open in -liconv" >&5 +echo "configure:10369: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10370,7 +10373,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10424,7 +10427,7 @@ fi ############ # check for iconv in libc echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10428: checking for working iconv" >&5 +echo "configure:10431: checking for working iconv" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10433,7 +10436,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else cat > conftest.$ac_ext < @@ -10444,7 +10447,7 @@ main() { } EOF -if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NATIVE_ICONV=yes else @@ -10468,7 +10471,7 @@ fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10472: checking for Linux kernel oplocks" >&5 +echo "configure:10475: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10477,7 +10480,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10491,7 +10494,7 @@ main() { } EOF -if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10514,7 +10517,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10518: checking for kernel change notify support" >&5 +echo "configure:10521: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10523,7 +10526,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10537,7 +10540,7 @@ main() { } EOF -if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10560,7 +10563,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10564: checking for kernel share modes" >&5 +echo "configure:10567: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10569,7 +10572,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10585,7 +10588,7 @@ main() { } EOF -if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10611,13 +10614,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10615: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10618: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10625,7 +10628,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10646,7 +10649,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10650: checking for irix specific capabilities" >&5 +echo "configure:10653: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10655,7 +10658,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10670,7 +10673,7 @@ main() { } EOF -if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10698,13 +10701,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10702: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10705: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10714,7 +10717,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10735,13 +10738,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10739: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10742: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10751,7 +10754,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10772,13 +10775,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10776: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10779: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10788,7 +10791,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10809,13 +10812,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10813: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10816: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10825,7 +10828,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10847,13 +10850,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10851: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10854: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10867,7 +10870,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10888,16 +10891,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10892: checking for test routines" >&5 +echo "configure:10895: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -10911,7 +10914,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10915: checking for ftruncate extend" >&5 +echo "configure:10918: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10920,11 +10923,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -10947,7 +10950,7 @@ EOF fi echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:10951: checking for AF_LOCAL socket support" >&5 +echo "configure:10954: checking for AF_LOCAL socket support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10956,11 +10959,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_WORKING_AF_LOCAL=yes else @@ -10984,7 +10987,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10988: checking for broken getgroups" >&5 +echo "configure:10991: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10993,11 +10996,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -11020,7 +11023,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11024: checking whether getpass should be replaced" >&5 +echo "configure:11027: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11028,7 +11031,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -11064,7 +11067,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11068: checking for broken inet_ntoa" >&5 +echo "configure:11071: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11073,7 +11076,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -11087,7 +11090,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -11110,7 +11113,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11114: checking for secure mkstemp" >&5 +echo "configure:11117: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11119,7 +11122,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -11136,7 +11139,7 @@ main() { exit(0); } EOF -if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -11159,7 +11162,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11163: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:11166: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11168,12 +11171,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -11196,7 +11199,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11200: checking for root" >&5 +echo "configure:11203: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11205,11 +11208,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -11237,7 +11240,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11241: checking for iface AIX" >&5 +echo "configure:11244: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11246,7 +11249,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -11278,7 +11281,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11282: checking for iface ifconf" >&5 +echo "configure:11285: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11287,7 +11290,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -11320,7 +11323,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11324: checking for iface ifreq" >&5 +echo "configure:11327: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11329,7 +11332,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -11366,7 +11369,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11370: checking for setresuid" >&5 +echo "configure:11373: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11375,7 +11378,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -11409,7 +11412,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11413: checking for setreuid" >&5 +echo "configure:11416: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11418,7 +11421,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -11451,7 +11454,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11455: checking for seteuid" >&5 +echo "configure:11458: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11460,7 +11463,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -11493,7 +11496,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11497: checking for setuidx" >&5 +echo "configure:11500: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11502,7 +11505,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -11535,7 +11538,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11539: checking for working mmap" >&5 +echo "configure:11542: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11544,11 +11547,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11571,7 +11574,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11575: checking for ftruncate needs root" >&5 +echo "configure:11578: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11580,11 +11583,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11607,7 +11610,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11611: checking for fcntl locking" >&5 +echo "configure:11614: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11616,11 +11619,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -11643,7 +11646,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11647: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11650: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11652,11 +11655,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11681,7 +11684,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11685: checking for 64 bit fcntl locking" >&5 +echo "configure:11688: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11690,7 +11693,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -11739,13 +11742,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11743: checking for st_blocks in struct stat" >&5 +echo "configure:11746: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11754,7 +11757,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11777,13 +11780,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11781: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11784: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11820,13 +11823,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11824: checking for broken nisplus include files" >&5 +echo "configure:11827: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11836,7 +11839,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11860,7 +11863,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11864: checking whether to use smbwrapper" >&5 +echo "configure:11867: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -11907,7 +11910,7 @@ fi ################################################# # check for AFS clear-text auth support echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11911: checking whether to use AFS clear-text auth" >&5 +echo "configure:11914: checking whether to use AFS clear-text auth" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -11933,7 +11936,7 @@ fi ################################################# # check for the DFS clear-text auth system echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11937: checking whether to use DFS clear-text auth" >&5 +echo "configure:11940: checking whether to use DFS clear-text auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11959,7 +11962,7 @@ fi ################################################# # see if this box has the RedHat location for kerberos echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:11963: checking for /usr/kerberos" >&5 +echo "configure:11966: checking for /usr/kerberos" >&5 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" @@ -11972,7 +11975,7 @@ fi ################################################# # check for location of Kerberos 5 install echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:11976: checking for kerberos 5 install path" >&5 +echo "configure:11979: checking for kerberos 5 install path" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -12001,17 +12004,17 @@ for ac_hdr in krb5.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12005: checking for $ac_hdr" >&5 +echo "configure:12008: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12044,17 +12047,17 @@ for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12048: checking for $ac_hdr" >&5 +echo "configure:12051: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12084,7 +12087,7 @@ done ################################################################## # we might need the k5crypto and com_err libraries on some systems echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12088: checking for _et_list in -lcom_err" >&5 +echo "configure:12091: checking for _et_list in -lcom_err" >&5 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12092,7 +12095,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12124,7 +12127,7 @@ else fi echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12128: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo "configure:12131: checking for krb5_encrypt_data in -lk5crypto" >&5 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12132,7 +12135,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12168,7 +12171,7 @@ fi # now see if we can find the krb5 libs in standard paths # or as specified above echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12172: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo "configure:12175: checking for krb5_mk_req_extended in -lkrb5" >&5 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12176,7 +12179,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12215,7 +12218,7 @@ fi ######################################################## # now see if we can find the gssapi libs in standard paths echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12219: checking for gss_display_status in -lgssapi_krb5" >&5 +echo "configure:12222: checking for gss_display_status in -lgssapi_krb5" >&5 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12223,7 +12226,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi_krb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12263,7 +12266,7 @@ fi # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12267: checking for ber_scanf in -llber" >&5 +echo "configure:12270: checking for ber_scanf in -llber" >&5 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12271,7 +12274,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12307,7 +12310,7 @@ fi # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12311: checking for ldap_domain2hostlist in -lldap" >&5 +echo "configure:12314: checking for ldap_domain2hostlist in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12315,7 +12318,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lldap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12357,12 +12360,12 @@ fi for ac_func in ldap_set_rebind_proc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12361: checking for $ac_func" >&5 +echo "configure:12364: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12410,13 +12413,13 @@ fi done echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12414: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo "configure:12417: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12425,7 +12428,7 @@ int main() { ldap_set_rebind_proc(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pam_ldap_cv_ldap_set_rebind_proc=3 else @@ -12447,7 +12450,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:12451: checking whether to use AUTOMOUNT" >&5 +echo "configure:12454: checking whether to use AUTOMOUNT" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -12472,7 +12475,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:12476: checking whether to use SMBMOUNT" >&5 +echo "configure:12479: checking whether to use SMBMOUNT" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -12509,7 +12512,7 @@ fi # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:12513: checking whether to use PAM" >&5 +echo "configure:12516: checking whether to use PAM" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -12535,7 +12538,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:12539: checking for pam_get_data in -lpam" >&5 +echo "configure:12542: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12543,7 +12546,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12581,7 +12584,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:12585: checking whether to use pam_smbpass" >&5 +echo "configure:12588: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -12619,12 +12622,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12623: checking for $ac_func" >&5 +echo "configure:12626: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12673,7 +12676,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12677: checking for crypt in -lcrypt" >&5 +echo "configure:12680: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12681,7 +12684,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12727,7 +12730,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:12731: checking for a crypt that needs truncated salt" >&5 +echo "configure:12734: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12736,11 +12739,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -12774,7 +12777,7 @@ fi ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:12778: checking whether to use TDB SAM database" >&5 +echo "configure:12781: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -12799,7 +12802,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:12803: checking whether to use NISPLUS SAM database" >&5 +echo "configure:12806: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -12830,7 +12833,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:12834: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12837: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -12855,7 +12858,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12859: checking whether to use syslog logging" >&5 +echo "configure:12862: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -12880,7 +12883,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12884: checking whether to use profiling" >&5 +echo "configure:12887: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12908,7 +12911,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12912: checking whether to support disk-quotas" >&5 +echo "configure:12915: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -12919,13 +12922,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12923: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12926: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12937,7 +12940,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12986,7 +12989,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12990: checking whether to support utmp accounting" >&5 +echo "configure:12993: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -13011,7 +13014,7 @@ fi ################################################# # choose native language(s) of man pages echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13015: checking chosen man pages' language(s)" >&5 +echo "configure:13018: checking chosen man pages' language(s)" >&5 # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" @@ -13042,7 +13045,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13046: checking whether to build the libsmbclient shared library" >&5 +echo "configure:13049: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -13070,14 +13073,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13074: checking how to get filesystem space usage" >&5 +echo "configure:13077: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13081: checking statvfs64 function (SVR4)" >&5 +echo "configure:13084: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13085,7 +13088,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -13132,12 +13135,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:13136: checking statvfs function (SVR4)" >&5 +echo "configure:13139: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13145,7 +13148,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -13170,7 +13173,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:13174: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:13177: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13178,7 +13181,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -13191,7 +13194,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:13195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -13218,7 +13221,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:13222: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:13225: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13226,7 +13229,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -13272,7 +13275,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:13276: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:13279: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13280,7 +13283,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -13290,7 +13293,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -13317,7 +13320,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:13321: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:13324: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13325,7 +13328,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13341,7 +13344,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -13368,7 +13371,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:13372: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:13375: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13376,7 +13379,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13396,7 +13399,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -13429,9 +13432,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:13433: checking if large file support can be enabled" >&5 +echo "configure:13436: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -13509,7 +13512,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:13513: checking whether to support ACLs" >&5 +echo "configure:13516: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -13562,7 +13565,7 @@ EOF ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13566: checking for acl_get_file in -lacl" >&5 +echo "configure:13569: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13570,7 +13573,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13609,13 +13612,13 @@ else fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:13613: checking for ACL support" >&5 +echo "configure:13616: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13623,7 +13626,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -13643,13 +13646,13 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:13647: checking for acl_get_perm_np" >&5 +echo "configure:13650: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13657,7 +13660,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -13704,7 +13707,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:13708: checking whether to build winbind" >&5 +echo "configure:13711: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13800,20 +13803,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:13804: checking whether struct passwd has pw_comment" >&5 +echo "configure:13807: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:13817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -13838,20 +13841,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:13842: checking whether struct passwd has pw_age" >&5 +echo "configure:13845: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:13855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -13890,7 +13893,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13894: checking for poptGetContext in -lpopt" >&5 +echo "configure:13897: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13898,7 +13901,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13933,9 +13936,9 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13937: checking whether to use included popt" >&5 +echo "configure:13940: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then - echo "$ac_t""$srcdir/popt" 1>&6 + echo "$ac_t""yes" 1>&6 BUILD_POPT='$(POPT_OBJS)' FLAGS1="-I$srcdir/popt" else @@ -13956,16 +13959,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13960: checking configure summary" >&5 +echo "configure:13963: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else From 0f2ba3d5132bba442e9c9209efa5213f43e6499d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 30 Jul 2002 04:02:47 +0000 Subject: [PATCH 143/262] Add quotes so we can see 0 length strings. (This used to be commit be3470adeea01a2d0fa2f068159d2cea39b552da) --- source3/param/loadparm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index bb97d72d34d..98e358704db 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1935,7 +1935,7 @@ BOOL lp_add_home(const char *pszHomename, int iDefaultService, ServicePtrs[i]->bBrowseable = sDefault.bBrowseable; DEBUG(3, - ("adding home's share [%s] for user %s at %s\n", pszHomename, + ("adding home's share [%s] for user '%s' at '%s'\n", pszHomename, user, newHomedir)); return (True); From a46793938082f8abed4a3b8e8fa608bb50f5de46 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 30 Jul 2002 04:03:40 +0000 Subject: [PATCH 144/262] These are not critical errors, they should not be a level 0. Andrew Bartlett (This used to be commit 082c0324cde38fadd70934a10849c7d40a34e3b1) --- source3/passdb/pdb_ldap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 581aa48b997..8575d8b30f0 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1281,7 +1281,7 @@ static BOOL ldapsam_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT * us if (entry) { if (!init_sam_from_ldap(ldap_state, user, ldap_struct, entry)) { - DEBUG(0,("ldapsam_getsampwnam: init_sam_from_ldap failed!\n")); + DEBUG(1,("ldapsam_getsampwnam: init_sam_from_ldap failed!\n")); ldap_msgfree(result); ldap_unbind(ldap_struct); return False; @@ -1325,7 +1325,7 @@ static BOOL ldapsam_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT * us if (ldap_count_entries(ldap_struct, result) < 1) { - DEBUG(0, + DEBUG(4, ("We don't find this rid [%i] count=%d\n", rid, ldap_count_entries(ldap_struct, result))); ldap_unbind(ldap_struct); @@ -1336,7 +1336,7 @@ static BOOL ldapsam_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT * us if (entry) { if (!init_sam_from_ldap(ldap_state, user, ldap_struct, entry)) { - DEBUG(0,("ldapsam_getsampwrid: init_sam_from_ldap failed!\n")); + DEBUG(1,("ldapsam_getsampwrid: init_sam_from_ldap failed!\n")); ldap_msgfree(result); ldap_unbind(ldap_struct); return False; From d91cbdac92ca52c96148bc14b109865353728728 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 30 Jul 2002 04:23:59 +0000 Subject: [PATCH 145/262] These pointers should be for the service we just cloned, not the new service as it might actually not be a clone, but a 'found' service. Previously this meant that a second session setup on the same TCP/IP connection for a user would write '' as the home directory. Instead, I want it to update the share to be there current home directory (so that this can be updated without the need to reboot the client for example). Andrew Bartlett (This used to be commit 84c1a5b0f046fa0375563120da117a8e76fb5b8c) --- source3/param/loadparm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 98e358704db..33e57e36e2e 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1914,8 +1914,8 @@ BOOL lp_add_home(const char *pszHomename, int iDefaultService, if (i < 0) return (False); - if (!(*(ServicePtrs[i]->szPath)) - || strequal(ServicePtrs[i]->szPath, lp_pathname(-1))) { + if (!(*(ServicePtrs[iDefaultService]->szPath)) + || strequal(ServicePtrs[iDefaultService]->szPath, lp_pathname(-1))) { pstrcpy(newHomedir, pszHomedir); } else { pstrcpy(newHomedir, lp_pathname(iDefaultService)); From 3130577acb03a06fd8de27ee6c2e4f82bd4b2008 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 30 Jul 2002 04:32:29 +0000 Subject: [PATCH 146/262] Some crash fixes for netshareenum returning zero shares. (This used to be commit a5a0ff8bd7ee4a3586647d14fd750ec6df73efa8) --- source3/libsmb/cli_srvsvc.c | 3 +++ source3/rpcclient/cmd_srvsvc.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/libsmb/cli_srvsvc.c b/source3/libsmb/cli_srvsvc.c index b92b356241c..1bdd19620b4 100644 --- a/source3/libsmb/cli_srvsvc.c +++ b/source3/libsmb/cli_srvsvc.c @@ -116,6 +116,9 @@ WERROR cli_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, ZERO_STRUCTP(ctr); + if (!r.ctr.num_entries) + goto done; + ctr->info_level = info_level; ctr->num_entries = r.ctr.num_entries; diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 43bfb250489..8d416f8db01 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -270,7 +270,7 @@ static NTSTATUS cmd_srvsvc_net_share_enum(struct cli_state *cli, result = cli_srvsvc_net_share_enum( cli, mem_ctx, info_level, &ctr, preferred_len, &hnd); - if (!W_ERROR_IS_OK(result)) + if (!W_ERROR_IS_OK(result) || !ctr.num_entries) goto done; /* Display results */ From 01d9beba6cf2882dc30445b68b3ae54d3bb17679 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 30 Jul 2002 09:21:57 +0000 Subject: [PATCH 147/262] Make some of the charconv code a bit easier to read and work with - when we are dealing with utf8 we may as well specify char** for the pointer, save otherwise casting in the caller. Andrew Bartlett (This used to be commit 46021f85b6da4ba1e7f73ee7408079219d555dde) --- source3/lib/charcnv.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index ea5bb87bc38..6e961366435 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -249,15 +249,15 @@ convert: size_t convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, void const *src, size_t srclen, void **dest) { - void *ob; + void *alloced_string; size_t dest_len; *dest = NULL; - dest_len=convert_string_allocate(from, to, src, srclen, (void **)&ob); + dest_len=convert_string_allocate(from, to, src, srclen, &alloced_string); if (dest_len == -1) return -1; - *dest = talloc_strdup(ctx, (char *)ob); - SAFE_FREE(ob); + *dest = talloc_memdup(ctx, alloced_string, dest_len); + SAFE_FREE(alloced_string); if (*dest == NULL) return -1; return dest_len; @@ -505,12 +505,12 @@ int push_utf8_pstring(void *dest, const char *src) * * @retval The number of bytes occupied by the string in the destination **/ -int push_utf8_talloc(TALLOC_CTX *ctx, void **dest, const char *src) +int push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src) { int src_len = strlen(src)+1; *dest = NULL; - return convert_string_talloc(ctx, CH_UNIX, CH_UTF8, src, src_len, dest); + return convert_string_talloc(ctx, CH_UNIX, CH_UTF8, src, src_len, (void**)dest); } /** @@ -659,11 +659,11 @@ int pull_utf8_fstring(char *dest, const void *src) * * @retval The number of bytes occupied by the string in the destination **/ -int pull_utf8_talloc(TALLOC_CTX *ctx, void **dest, const char *src) +int pull_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src) { int src_len = strlen(src)+1; *dest = NULL; - return convert_string_talloc(ctx, CH_UTF8, CH_UNIX, src, src_len, dest); + return convert_string_talloc(ctx, CH_UTF8, CH_UNIX, src, src_len, (void **)dest); } /** From 02cb8d63bcdf3c55f56d69f17bc905b1047cc573 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 30 Jul 2002 09:26:44 +0000 Subject: [PATCH 148/262] Update a pile of Samba's SID lookup code to ensure: - That we never call winbind recursivly - That we never use an 'algorithmic' RID when we have a fixed uid or gid mapping in either the passdb or the group mapping db. Also, remove restrictions that say 'this domain only'. If we have a mapping configured, allow it to be returned. If we later decide certian mappings are invalid, then we sould put that in the code that actually does the map. Allow 'sid->name' transtations on the fixed 'well known' groups for NT, even if they are not represented by Unix groups yet. Andrew Bartlett (This used to be commit d5bafb224337e393420c2ce9c0a787405314713c) --- source3/passdb/passdb.c | 93 +++++++++++++++++++++++------------------ source3/smbd/uid.c | 74 ++++++++++++++++---------------- 2 files changed, 92 insertions(+), 75 deletions(-) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 3f1425e240f..1c33fda39df 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -719,15 +719,9 @@ BOOL local_lookup_name(const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psi /* check if it's a mapped group */ if (get_group_map_from_ntname(user, &map, MAPPING_WITHOUT_PRIV)) { - if (map.gid!=-1) { - /* yes it's a mapped group to a valid unix group */ - sid_copy(&local_sid, &map.sid); - *psid_name_use = map.sid_name_use; - } - else { - /* it's a correct name but not mapped so it points to nothing*/ - return False; - } + /* yes it's a mapped group */ + sid_copy(&local_sid, &map.sid); + *psid_name_use = map.sid_name_use; } else { /* it's not a mapped group */ grp = getgrnam(user); @@ -807,23 +801,11 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid) BOOL local_sid_to_uid(uid_t *puid, DOM_SID *psid, enum SID_NAME_USE *name_type) { - DOM_SID dom_sid; - uint32 rid; fstring str; SAM_ACCOUNT *sam_user = NULL; *name_type = SID_NAME_UNKNOWN; - sid_copy(&dom_sid, psid); - sid_split_rid(&dom_sid, &rid); - - /* - * We can only convert to a uid if this is our local - * Domain SID (ie. we are the controling authority). - */ - if (!sid_equal(get_global_sam_sid(), &dom_sid)) - return False; - if (NT_STATUS_IS_ERR(pdb_init_sam(&sam_user))) return False; @@ -835,12 +817,38 @@ BOOL local_sid_to_uid(uid_t *puid, DOM_SID *psid, enum SID_NAME_USE *name_type) } DEBUG(10,("local_sid_to_uid: SID %s -> uid (%u) (%s).\n", sid_to_string( str, psid), (unsigned int)*puid, pdb_get_username(sam_user))); - } else { - DEBUG(5,("local_sid_to_uid: SID %s not mapped becouse RID was not found in passdb.\n", sid_to_string( str, psid))); pdb_free_sam(&sam_user); + } else { + + DOM_SID dom_sid; + uint32 rid; + GROUP_MAP map; + + pdb_free_sam(&sam_user); + + if (get_group_map_from_sid(*psid, &map, MAPPING_WITHOUT_PRIV)) { + DEBUG(3, ("local_sid_to_uid: SID '%s' is a group, not a user... \n", sid_to_string(str, psid))); + /* It's a group, not a user... */ + return False; + } + + sid_copy(&dom_sid, psid); + if (!sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) { + DEBUG(3, ("sid_peek_rid failed - sid '%s' is not in our domain\n", sid_to_string(str, psid))); + return False; + } + + if (!pdb_rid_is_user(rid)) { + DEBUG(3, ("local_sid_to_uid: sid '%s' cannot be mapped to a uid algorithmicly becous it is a group\n", sid_to_string(str, psid))); + return False; + } + + *puid = fallback_pdb_user_rid_to_uid(rid); + + DEBUG(5,("local_sid_to_uid: SID %s algorithmicly mapped to %ld mapped becouse SID was not found in passdb.\n", + sid_to_string(str, psid), (signed long int)(*puid))); return False; } - pdb_free_sam(&sam_user); *name_type = SID_NAME_USER; @@ -873,16 +881,11 @@ DOM_SID *local_gid_to_sid(DOM_SID *psid, gid_t gid) BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type) { - DOM_SID dom_sid; - uint32 rid; fstring str; GROUP_MAP map; *name_type = SID_NAME_UNKNOWN; - sid_copy(&dom_sid, psid); - sid_split_rid(&dom_sid, &rid); - /* * We can only convert to a gid if this is our local * Domain SID (ie. we are the controling authority). @@ -890,35 +893,45 @@ BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type) * Or in the Builtin SID too. JFM, 11/30/2001 */ - if (!sid_equal(get_global_sam_sid(), &dom_sid)) - return False; - if (get_group_map_from_sid(*psid, &map, MAPPING_WITHOUT_PRIV)) { /* the SID is in the mapping table but not mapped */ if (map.gid==-1) return False; - if (!sid_peek_check_rid(get_global_sam_sid(), &map.sid, &rid)){ - DEBUG(0,("local_sid_to_gid: sid_peek_check_rid return False! SID: %s\n", - sid_string_static(&map.sid))); - return False; - } *pgid = map.gid; *name_type = map.sid_name_use; - DEBUG(10,("local_sid_to_gid: mapped SID %s (%s) -> gid (%u).\n", sid_to_string( str, psid), + DEBUG(10,("local_sid_to_gid: mapped SID %s (%s) -> gid (%u).\n", + sid_to_string( str, psid), map.nt_name, (unsigned int)*pgid)); } else { + uint32 rid; + SAM_ACCOUNT *sam_user = NULL; + if (NT_STATUS_IS_ERR(pdb_init_sam(&sam_user))) + return False; + + if (pdb_getsampwsid(sam_user, psid)) { + return False; + pdb_free_sam(&sam_user); + } + + pdb_free_sam(&sam_user); + + if (!sid_peek_rid(psid, &rid)) { + DEBUG(2, ("sid_peek_rid failed! what kind of sid is this? '%s'\n", sid_to_string(str, psid))); + return False; + } + if (pdb_rid_is_user(rid)) return False; - + *pgid = pdb_group_rid_to_gid(rid); *name_type = SID_NAME_ALIAS; DEBUG(10,("local_sid_to_gid: SID %s -> gid (%u).\n", sid_to_string( str, psid), (unsigned int)*pgid)); } - + return True; } diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 2dcef54a5be..bf609e62e6b 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -440,44 +440,43 @@ BOOL lookup_name(const char *domain, const char *name, DOM_SID *psid, enum SID_N extern pstring global_myname; extern fstring global_myworkgroup; fstring sid; - BOOL ret = False; + BOOL local_lookup = False; *name_type = SID_NAME_UNKNOWN; /* If we are looking up a domain user, make sure it is for the local machine only */ - switch (lp_server_role()) { - case ROLE_DOMAIN_PDC: - case ROLE_DOMAIN_BDC: + if (strequal(global_myname, domain)) { + local_lookup = True; + } else if (lp_server_role() == ROLE_DOMAIN_PDC || + lp_server_role() == ROLE_DOMAIN_PDC) { if (strequal(domain, global_myworkgroup)) { - ret = local_lookup_name(name, psid, name_type); + local_lookup = True; } - /* No break is deliberate here. JRA. */ - default: - if (ret) { - } else if (strequal(global_myname, domain)) { - ret = local_lookup_name(name, psid, name_type); - } else { - DEBUG(5, ("lookup_name: domain %s is not local\n", domain)); + } + + if (local_lookup) { + if (local_lookup_name(name, psid, name_type)) { + DEBUG(10, + ("lookup_name: (local) [%s]\\[%s] -> SID %s (type %s: %u)\n", + domain, name, sid_to_string(sid,psid), + sid_type_lookup(*name_type), (unsigned int)*name_type)); + return True; + } + } else { + /* Remote */ + if (winbind_lookup_name(domain, name, psid, name_type)) { + + DEBUG(10,("lookup_name (winbindd): [%s]\\[%s] -> SID %s (type %u)\n", + domain, name, sid_to_string(sid, psid), + (unsigned int)*name_type)); + return True; } } - if (ret) { - DEBUG(10, - ("lookup_name: (local) [%s]\\[%s] -> SID %s (type %s: %u)\n", - domain, name, sid_to_string(sid,psid), - sid_type_lookup(*name_type), (unsigned int)*name_type)); - return True; - } else if (winbind_lookup_name(domain, name, psid, name_type)) { - - DEBUG(10,("lookup_name (winbindd): [%s]\\[%s] -> SID %s (type %u)\n", - domain, name, sid_to_string(sid, psid), - (unsigned int)*name_type)); - return True; - } - - DEBUG(10, ("lookup_name: winbind and local lookups for [%s]\\[%s] failed\n", domain, name)); + DEBUG(10, ("lookup_name: %s lookup for [%s]\\[%s] failed\n", + local_lookup ? "local" : "winbind", domain, name)); return False; } @@ -680,16 +679,21 @@ BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype) * First we must look up the name and decide if this is a group sid. */ + /* if we know its local then don't try winbindd */ + if (sid_compare_domain(get_global_sam_sid(), psid) == 0) { + BOOL result; + become_root(); + result = local_sid_to_gid(pgid, psid, sidtype); + unbecome_root(); + return result; + } + if (!winbind_lookup_sid(psid, dom_name, name, &name_type)) { DEBUG(10,("sid_to_gid: winbind lookup for sid %s failed - trying local.\n", sid_to_string(sid_str, psid) )); - if (!local_sid_to_gid(pgid, psid, sidtype)) { - /* this was probably a foreign sid - assume its a group rid - and continue */ - name_type = SID_NAME_DOM_GRP; - } else { - return True; - } + /* this was probably a foreign sid - assume its a group rid + and continue */ + name_type = SID_NAME_DOM_GRP; } /* @@ -700,7 +704,7 @@ BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype) DEBUG(10,("sid_to_gid: winbind lookup succeeded but SID is not a known group (%u)\n", (unsigned int)name_type )); - return local_sid_to_gid(pgid, psid, sidtype); + return False; } *sidtype = name_type; From edb9158f09d488d9f98dffe477808dd3909b693a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 30 Jul 2002 09:59:53 +0000 Subject: [PATCH 149/262] OK! Finally the cascaded VFS patch is in. Testing is very welcome, specially with layered multiple vfs modules. A big thank to Alexander Bokovoy for his work and patience :) Simo. (This used to be commit 56283601afe1836dafe0580532f014e29593c463) --- examples/VFS/Makefile | 44 ++++--- examples/VFS/audit.c | 174 +++++++++----------------- examples/VFS/block/Makefile | 44 ++++--- examples/VFS/block/block.c | 144 ++++++--------------- examples/VFS/recycle.c | 139 +++++---------------- examples/VFS/skel.c | 241 ++++++++++++++---------------------- source3/configure | 4 +- source3/configure.in | 2 +- source3/include/smb.h | 13 +- source3/include/vfs.h | 201 +++++++++++++++++++++++++++++- source3/param/loadparm.c | 4 + source3/smbd/conn.c | 23 +++- source3/smbd/vfs.c | 151 ++++++++++++++++------ 13 files changed, 623 insertions(+), 561 deletions(-) diff --git a/examples/VFS/Makefile b/examples/VFS/Makefile index f93cd0cb2df..c8e8b8c4a59 100644 --- a/examples/VFS/Makefile +++ b/examples/VFS/Makefile @@ -1,37 +1,43 @@ -# -# Makefile for samba-vfs examples -# -# +# Generated automatically from Makefile.in by configure. +MAKEFILE = Makefile.vfs -# Variables +include $(MAKEFILE) -CC = gcc -LIBTOOL = libtool - -SAMBA_SRC = ../../source -SAMBA_INCL = ../../source/include -POPT_INCL = ../../source/popt -UBIQX_SRC = ../../source/ubiqx -SMBWR_SRC = ../../source/smbwrapper -KRB5_SRC = /usr/kerberos/include -CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(POPT_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I$(KRB5_SRC) -Wall -g -VFS_OBJS = audit.so skel.so recycle.so +CC = gcc +LIBTOOL = libtool +CFLAGS = -O -Wall -g -O2 -march=i386 -mcpu=i686 -I/usr/kerberos/include $(VFS_CFLAGS) +CPPFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/kerberos/include $(VFS_CPPFLAGS) +LDFLAGS = -Wl,-rpath,/usr/lib -L/usr/kerberos/lib $(VFS_LDFLAGS) +LDSHFLAGS = -shared +srcdir = /home/sorce/devel/samba/cascaded-vfs/samba/source +FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) # Default target default: $(VFS_OBJS) +# if file doesn't exist try to create one; +# it is possible that some variables will be +# defined correctly +Makefile.vfs: + @echo -ne "VFS_OBJS\t= " > $(MAKEFILE); \ + for i in *.c; do \ + echo -n $$i" " | sed -e 's/\(.*\)\.c\(.*\)/\1\.so\2/g' >> $(MAKEFILE); \ + done; \ + echo -ne "\nVFS_CFLAGS\t= \nVFS_CPPFLAGS\t= \nVFS_LDFLAGS\t= \n" >> $(MAKEFILE) + make + # Pattern rules %.so: %.lo - $(LIBTOOL) $(CC) -shared -o $@ $< $(LDFLAGS) + $(LIBTOOL) $(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $< %.lo: %.c - $(LIBTOOL) $(CC) $(CPPFLAGS) $(CFLAGS) -c $< + $(LIBTOOL) $(CC) $(FLAGS) -c $< # Misc targets clean: rm -rf .libs rm -f core *~ *% *.bak \ - $(VFS_OBJS) $(VFS_OBJS:.so=.o) $(VFS_OBJS:.so=.lo) + $(VFS_OBJS) $(VFS_OBJS:.so=.o) $(VFS_OBJS:.so=.lo) diff --git a/examples/VFS/audit.c b/examples/VFS/audit.c index aad483c295a..92b78c1c32f 100644 --- a/examples/VFS/audit.c +++ b/examples/VFS/audit.c @@ -3,6 +3,7 @@ * facility. * * Copyright (C) Tim Potter, 1999-2000 + * Copyright (C) Alexander Bokovoy, 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,134 +48,79 @@ /* Function prototypes */ -int audit_connect(struct connection_struct *conn, const char *svc, const char *user); -void audit_disconnect(struct connection_struct *conn); -DIR *audit_opendir(struct connection_struct *conn, const char *fname); -int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode); -int audit_rmdir(struct connection_struct *conn, const char *path); -int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode); -int audit_close(struct files_struct *fsp, int fd); -int audit_rename(struct connection_struct *conn, const char *old, const char *new); -int audit_unlink(struct connection_struct *conn, const char *path); -int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode); -int audit_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode); -int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode); -int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode); +static int audit_connect(struct connection_struct *conn, const char *svc, const char *user); +static void audit_disconnect(struct connection_struct *conn); +static DIR *audit_opendir(struct connection_struct *conn, const char *fname); +static int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode); +static int audit_rmdir(struct connection_struct *conn, const char *path); +static int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode); +static int audit_close(struct files_struct *fsp, int fd); +static int audit_rename(struct connection_struct *conn, const char *old, const char *new); +static int audit_unlink(struct connection_struct *conn, const char *path); +static int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode); +static int audit_chmod_acl(struct connection_struct *conn, const char *name, mode_t mode); +static int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode); +static int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode); /* VFS operations */ -extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ +static struct vfs_ops default_vfs_ops; /* For passthrough operation */ +static struct smb_vfs_handle_struct *audit_handle; -struct vfs_ops audit_ops = { +static vfs_op_tuple audit_ops[] = { /* Disk operations */ - audit_connect, - audit_disconnect, - NULL, /* disk free */ + {audit_connect, SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_LOGGER}, + {audit_disconnect, SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_LOGGER}, /* Directory operations */ - audit_opendir, - NULL, /* readdir */ - audit_mkdir, - audit_rmdir, - NULL, /* closedir */ + {audit_opendir, SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_LOGGER}, + {audit_mkdir, SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_LOGGER}, + {audit_rmdir, SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_LOGGER}, /* File operations */ - audit_open, - audit_close, - NULL, /* read */ - NULL, /* write */ - NULL, /* lseek */ - audit_rename, - NULL, /* fsync */ - NULL, /* stat */ - NULL, /* fstat */ - NULL, /* lstat */ - audit_unlink, - audit_chmod, - audit_fchmod, - NULL, /* chown */ - NULL, /* fchown */ - NULL, /* chdir */ - NULL, /* getwd */ - NULL, /* utime */ - NULL, /* ftruncate */ - NULL, /* lock */ - NULL, /* symlink */ - NULL, /* readlink */ - NULL, /* link */ - NULL, /* mknod */ - NULL, /* realpath */ - NULL, /* fget_nt_acl */ - NULL, /* get_nt_acl */ - NULL, /* fset_nt_acl */ - NULL, /* set_nt_acl */ - - audit_chmod_acl, /* chmod_acl */ - audit_fchmod_acl, /* fchmod_acl */ - - NULL, /* sys_acl_get_entry */ - NULL, /* sys_acl_get_tag_type */ - NULL, /* sys_acl_get_permset */ - NULL, /*sys_acl_get_qualifier */ - NULL, /* sys_acl_get_file */ - NULL, /* sys_acl_get_fd */ - NULL, /* sys_acl_clear_perms */ - NULL, /* sys_acl_add_perm */ - NULL, /* sys_acl_to_text */ - NULL, /* sys_acl_init */ - NULL, /* sys_acl_create_entry */ - NULL, /* sys_acl_set_tag_type */ - NULL, /* sys_acl_set_qualifier */ - NULL, /* sys_acl_set_permset */ - NULL, /* sys_acl_valid */ - NULL, /* sys_acl_set_file */ - NULL, /* sys_acl_set_fd */ - NULL, /* sys_acl_delete_def_file */ - NULL, /* sys_acl_get_perm */ - NULL, /* sys_acl_free_text */ - NULL, /* sys_acl_free_acl */ - NULL /* sys_acl_free_qualifier */ + {audit_open, SMB_VFS_OP_OPEN, SMB_VFS_LAYER_LOGGER}, + {audit_close, SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_LOGGER}, + {audit_rename, SMB_VFS_OP_RENAME, SMB_VFS_LAYER_LOGGER}, + {audit_unlink, SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_LOGGER}, + {audit_chmod, SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_LOGGER}, + {audit_fchmod, SMB_VFS_OP_FCHMOD, SMB_VFS_LAYER_LOGGER}, + {audit_chmod_acl, SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_LOGGER}, + {audit_fchmod_acl, SMB_VFS_OP_FCHMOD_ACL, SMB_VFS_LAYER_LOGGER}, + + /* Finish VFS operations definition */ + + {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }; -/* VFS initialisation function. Return initialised vfs_ops structure - back to SAMBA. */ +/* VFS initialisation function. Return vfs_op_tuple array back to SAMBA. */ -struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) +vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, + struct smb_vfs_handle_struct *vfs_handle) { - struct vfs_ops tmp_ops; - *vfs_version = SMB_VFS_INTERFACE_VERSION; - memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); - - tmp_ops.connect = audit_connect; - tmp_ops.disconnect = audit_disconnect; - tmp_ops.opendir = audit_opendir; - tmp_ops.mkdir = audit_mkdir; - tmp_ops.rmdir = audit_rmdir; - tmp_ops.open = audit_open; - tmp_ops.close = audit_close; - tmp_ops.rename = audit_rename; - tmp_ops.unlink = audit_unlink; - tmp_ops.chmod = audit_chmod; - tmp_ops.chmod_acl = audit_chmod_acl; - tmp_ops.fchmod = audit_fchmod; - tmp_ops.fchmod_acl = audit_fchmod_acl; - - memcpy(&audit_ops, &tmp_ops, sizeof(struct vfs_ops)); + memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + audit_handle = vfs_handle; openlog("smbd_audit", LOG_PID, SYSLOG_FACILITY); syslog(SYSLOG_PRIORITY, "VFS_INIT: vfs_ops loaded\n"); - return &audit_ops; + return audit_ops; +} + +/* VFS finalization function. */ +void vfs_done(connection_struct *conn) +{ + syslog(SYSLOG_PRIORITY, "VFS_DONE: vfs module unloaded\n"); } /* Implementation of vfs_ops. Pass everything on to the default operation but log event first. */ -int audit_connect(struct connection_struct *conn, const char *svc, const char *user) +static int audit_connect(struct connection_struct *conn, const char *svc, const char *user) { syslog(SYSLOG_PRIORITY, "connect to service %s by user %s\n", svc, user); @@ -182,13 +128,13 @@ int audit_connect(struct connection_struct *conn, const char *svc, const char *u return default_vfs_ops.connect(conn, svc, user); } -void audit_disconnect(struct connection_struct *conn) +static void audit_disconnect(struct connection_struct *conn) { syslog(SYSLOG_PRIORITY, "disconnected\n"); default_vfs_ops.disconnect(conn); } -DIR *audit_opendir(struct connection_struct *conn, const char *fname) +static DIR *audit_opendir(struct connection_struct *conn, const char *fname) { DIR *result = default_vfs_ops.opendir(conn, fname); @@ -200,7 +146,7 @@ DIR *audit_opendir(struct connection_struct *conn, const char *fname) return result; } -int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode) +static int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode) { int result = default_vfs_ops.mkdir(conn, path, mode); @@ -212,7 +158,7 @@ int audit_mkdir(struct connection_struct *conn, const char *path, mode_t mode) return result; } -int audit_rmdir(struct connection_struct *conn, const char *path) +static int audit_rmdir(struct connection_struct *conn, const char *path) { int result = default_vfs_ops.rmdir(conn, path); @@ -224,7 +170,7 @@ int audit_rmdir(struct connection_struct *conn, const char *path) return result; } -int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode) +static int audit_open(struct connection_struct *conn, const char *fname, int flags, mode_t mode) { int result = default_vfs_ops.open(conn, fname, flags, mode); @@ -237,7 +183,7 @@ int audit_open(struct connection_struct *conn, const char *fname, int flags, mod return result; } -int audit_close(struct files_struct *fsp, int fd) +static int audit_close(struct files_struct *fsp, int fd) { int result = default_vfs_ops.close(fsp, fd); @@ -249,7 +195,7 @@ int audit_close(struct files_struct *fsp, int fd) return result; } -int audit_rename(struct connection_struct *conn, const char *old, const char *new) +static int audit_rename(struct connection_struct *conn, const char *old, const char *new) { int result = default_vfs_ops.rename(conn, old, new); @@ -261,7 +207,7 @@ int audit_rename(struct connection_struct *conn, const char *old, const char *ne return result; } -int audit_unlink(struct connection_struct *conn, const char *path) +static int audit_unlink(struct connection_struct *conn, const char *path) { int result = default_vfs_ops.unlink(conn, path); @@ -273,7 +219,7 @@ int audit_unlink(struct connection_struct *conn, const char *path) return result; } -int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode) +static int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode) { int result = default_vfs_ops.chmod(conn, path, mode); @@ -285,7 +231,7 @@ int audit_chmod(struct connection_struct *conn, const char *path, mode_t mode) return result; } -int audit_chmod_acl(struct connection_struct *conn, const char *path, mode_t mode) +static int audit_chmod_acl(struct connection_struct *conn, const char *path, mode_t mode) { int result = default_vfs_ops.chmod_acl(conn, path, mode); @@ -297,7 +243,7 @@ int audit_chmod_acl(struct connection_struct *conn, const char *path, mode_t mod return result; } -int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode) +static int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode) { int result = default_vfs_ops.fchmod(fsp, fd, mode); @@ -309,7 +255,7 @@ int audit_fchmod(struct files_struct *fsp, int fd, mode_t mode) return result; } -int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode) +static int audit_fchmod_acl(struct files_struct *fsp, int fd, mode_t mode) { int result = default_vfs_ops.fchmod_acl(fsp, fd, mode); diff --git a/examples/VFS/block/Makefile b/examples/VFS/block/Makefile index 44b08681d6d..c8e8b8c4a59 100644 --- a/examples/VFS/block/Makefile +++ b/examples/VFS/block/Makefile @@ -1,37 +1,43 @@ -# -# Makefile for samba-vfs examples -# -# +# Generated automatically from Makefile.in by configure. +MAKEFILE = Makefile.vfs -# Variables +include $(MAKEFILE) -CC = gcc -LIBTOOL = libtool - -SAMBA_SRC = ../../../source -SAMBA_INCL = ${SAMBA_SRC}/include -UBIQX_SRC = ${SAMBA_SRC}/ubiqx -SMBWR_SRC = ${SAMBA_SRC}/smbwrapper -CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g -D_LARGEFILE63_SOURCE -D_GNU_SOURCE -fno-builtin - - -VFS_OBJS = block.so +CC = gcc +LIBTOOL = libtool +CFLAGS = -O -Wall -g -O2 -march=i386 -mcpu=i686 -I/usr/kerberos/include $(VFS_CFLAGS) +CPPFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/kerberos/include $(VFS_CPPFLAGS) +LDFLAGS = -Wl,-rpath,/usr/lib -L/usr/kerberos/lib $(VFS_LDFLAGS) +LDSHFLAGS = -shared +srcdir = /home/sorce/devel/samba/cascaded-vfs/samba/source +FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) # Default target default: $(VFS_OBJS) +# if file doesn't exist try to create one; +# it is possible that some variables will be +# defined correctly +Makefile.vfs: + @echo -ne "VFS_OBJS\t= " > $(MAKEFILE); \ + for i in *.c; do \ + echo -n $$i" " | sed -e 's/\(.*\)\.c\(.*\)/\1\.so\2/g' >> $(MAKEFILE); \ + done; \ + echo -ne "\nVFS_CFLAGS\t= \nVFS_CPPFLAGS\t= \nVFS_LDFLAGS\t= \n" >> $(MAKEFILE) + make + # Pattern rules %.so: %.lo - $(LIBTOOL) $(CC) -shared -o $@ $< $(LDFLAGS) + $(LIBTOOL) $(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $< %.lo: %.c - $(LIBTOOL) $(CC) $(CPPFLAGS) $(CFLAGS) -c $< + $(LIBTOOL) $(CC) $(FLAGS) -c $< # Misc targets clean: rm -rf .libs rm -f core *~ *% *.bak \ - $(VFS_OBJS) $(VFS_OBJS:.so=.o) $(VFS_OBJS:.so=.lo) + $(VFS_OBJS) $(VFS_OBJS:.so=.o) $(VFS_OBJS:.so=.lo) diff --git a/examples/VFS/block/block.c b/examples/VFS/block/block.c index f83ab6e07e0..9478b75f0f1 100644 --- a/examples/VFS/block/block.c +++ b/examples/VFS/block/block.c @@ -3,6 +3,7 @@ * Block access from links to dev mount points specified in PARAMCONF file * * Copyright (C) Ronald Kuetemeier, 2001 + * Copyright (C) Alexander Bokovoy, 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,93 +48,29 @@ -DIR *block_opendir(struct connection_struct *conn, char *fname); -int block_connect(struct connection_struct *conn, const char *service, const char *user); -void block_disconnect(struct connection_struct *conn); +static DIR *block_opendir(connection_struct *conn, char *fname); +static int block_connect(connection_struct *conn, const char *service, const char *user); +static void block_disconnect(connection_struct *conn); +static struct smb_vfs_handle_struct *block_handle; /* VFS operations */ -extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ +static struct vfs_ops default_vfs_ops; /* For passthrough operation */ -struct vfs_ops execute_vfs_ops = { +static vfs_op_tuple block_vfs_ops[] = { /* Disk operations */ - block_connect, - block_disconnect, - NULL, /* disk free */ + {block_connect, SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT}, + {block_disconnect, SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_TRANSPARENT}, /* Directory operations */ - block_opendir, - NULL, /* readdir */ - NULL, /* mkdir */ - NULL, /* rmdir */ - NULL, /* closedir */ - - /* File operations */ - - NULL, /* open */ - NULL, /* close */ - NULL, /* read */ - NULL, /* write */ - NULL, /* lseek */ - NULL, /* rename */ - NULL, /* fsync */ - NULL, /* stat */ - NULL, /* fstat */ - NULL, /* lstat */ - NULL, /* unlink */ - NULL, /* chmod */ - NULL, /* fchmod */ - NULL, /* chown */ - NULL, /* fchown */ - NULL, /* chdir */ - NULL, /* getwd */ - NULL, /* utime */ - NULL, /* ftruncate */ - NULL, /* lock */ - NULL, /* symlink */ - NULL, /* readlink */ - NULL, /* link */ - NULL, /* mknod */ - NULL, /* realpath */ - - /* NT ACL operations */ - - NULL, /* fget_nt_acl */ - NULL, /* get_nt_acl */ - NULL, /* fset_nt_acl */ - NULL, /* set_nt_acl */ - - /* POSIX ACL operations. */ - - NULL, /* chmod_acl */ - NULL, /* fchmod_acl */ - NULL, /* sys_acl_get_entry */ - NULL, /* sys_acl_get_tag_type */ - NULL, /* sys_acl_get_permset */ - NULL, /* sys_acl_get_qualifier */ - NULL, /* sys_acl_get_file */ - NULL, /* sys_acl_get_fd */ - NULL, /* sys_acl_clear_perms */ - NULL, /* sys_acl_add_perm */ - NULL, /* sys_acl_to_text */ - NULL, /* sys_acl_init */ - NULL, /* sys_acl_create_entry */ - NULL, /* sys_acl_set_tag_type */ - NULL, /* sys_acl_set_qualifier */ - NULL, /* sys_acl_set_permset */ - NULL, /* sys_acl_valid */ - NULL, /* sys_acl_set_file */ - NULL, /* sys_acl_set_fd */ - NULL, /* sys_acl_delete_def_file */ - NULL, /* sys_acl_get_perm */ - NULL, /* sys_acl_free_text */ - NULL, /* sys_acl_free_acl */ - NULL /* sys_acl_free_qualifier */ + {block_opendir, SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT}, + + {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }; @@ -145,13 +82,13 @@ extern BOOL pm_process(char *FileName, BOOL (*sfunc)(char *), BOOL(*pfunc)(char //functions -BOOL enter_pblock_mount(char *dir); -BOOL get_section(char *sect); -BOOL get_parameter_value(char *param, char *value); -BOOL load_param(void); -BOOL search(struct stat *stat_buf); -BOOL dir_search(char *link, char *dir); -BOOL enter_pblock_dir(char *dir); +static BOOL enter_pblock_mount(char *dir); +static BOOL get_section(char *sect); +static BOOL get_parameter_value(char *param, char *value); +static BOOL load_param(void); +static BOOL search(struct stat *stat_buf); +static BOOL dir_search(char *link, char *dir); +static BOOL enter_pblock_dir(char *dir); @@ -176,7 +113,7 @@ static struct block_dir *pblock_dir = NULL; * Load the conf file into a table */ -BOOL load_param(void) +static BOOL load_param(void) { if ((pm_process(PARAMCONF,&get_section,&get_parameter_value)) == TRUE) @@ -194,7 +131,7 @@ BOOL load_param(void) * */ -BOOL enter_pblock_mount(char *dir) +static BOOL enter_pblock_mount(char *dir) { struct stat stat_buf; static struct block_dir *tmp_pblock; @@ -242,7 +179,7 @@ BOOL enter_pblock_mount(char *dir) * */ -BOOL enter_pblock_dir(char *dir) +static BOOL enter_pblock_dir(char *dir) { static struct block_dir *tmp_pblock; @@ -285,7 +222,7 @@ BOOL enter_pblock_dir(char *dir) * Function callback for config section names */ -BOOL get_section(char *sect) +static BOOL get_section(char *sect) { return TRUE; } @@ -297,7 +234,7 @@ BOOL get_section(char *sect) * */ -BOOL get_parameter_value(char *param, char *value) +static BOOL get_parameter_value(char *param, char *value) { int i = 0, maxargs = sizeof(params) / sizeof(char *); @@ -327,24 +264,25 @@ BOOL get_parameter_value(char *param, char *value) -/* VFS initialisation function. Return initialised vfs_ops structure +/* VFS initialisation function. Return initialised vfs_op_tuple array back to SAMBA. */ -struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) +vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, + struct smb_vfs_handle_struct *vfs_handle) { - struct vfs_ops tmp_ops; - *vfs_version = SMB_VFS_INTERFACE_VERSION; - memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); + memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + block_handle = vfs_handle; - /* Override the ones we want. */ - tmp_ops.connect = block_connect; - tmp_ops.disconnect = block_disconnect; - tmp_ops.opendir = block_opendir; + return block_vfs_ops; +} - memcpy(&execute_vfs_ops, &tmp_ops, sizeof(struct vfs_ops)); - return(&execute_vfs_ops); + +/* VFS finalization function. */ +void vfs_done(connection_struct *conn) +{ } @@ -352,7 +290,7 @@ struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) * VFS connect and param file loading */ -int block_connect(struct connection_struct *conn, char *service, char *user) +static int block_connect(connection_struct *conn, const char *service, const char *user) { if((load_param()) == FALSE) { @@ -372,7 +310,7 @@ int block_connect(struct connection_struct *conn, char *service, char *user) */ -void block_disconnect(struct connection_struct *conn) +static void block_disconnect(struct connection_struct *conn) { struct block_dir *tmp_pblock = (pblock_mountp == NULL ? pblock_dir : pblock_mountp); @@ -403,7 +341,7 @@ void block_disconnect(struct connection_struct *conn) * VFS opendir */ -DIR *block_opendir(struct connection_struct *conn, char *fname) +static DIR *block_opendir(struct connection_struct *conn, char *fname) { char *dir_name = NULL; @@ -437,7 +375,7 @@ DIR *block_opendir(struct connection_struct *conn, char *fname) * Find mount point to block in list */ -BOOL search(struct stat *stat_buf) +static BOOL search(struct stat *stat_buf) { struct block_dir *tmp_pblock = pblock_mountp; @@ -459,7 +397,7 @@ BOOL search(struct stat *stat_buf) * Find dir in list to block id the starting point is link from a share */ -BOOL dir_search(char *link, char *dir) +static BOOL dir_search(char *link, char *dir) { char buf[PATH_MAX +1], *ext_path; int len = 0; diff --git a/examples/VFS/recycle.c b/examples/VFS/recycle.c index 6a1c98ce54e..ed89e59abf3 100644 --- a/examples/VFS/recycle.c +++ b/examples/VFS/recycle.c @@ -4,6 +4,7 @@ * * Copyright (C) 2001, Brandon Stone, Amherst College, . * Copyright (C) 2002, Jeremy Allison - modified to make a VFS module. + * Copyright (C) 2002, Alexander Bokovoy - cascaded VFS adoption, * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,139 +41,67 @@ /* VFS operations */ -extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ - +static struct vfs_ops default_vfs_ops; /* For passthrough operation */ +static struct smb_vfs_handle_struct *recycle_handle; static int recycle_unlink(connection_struct *, const char *); static int recycle_connect(struct connection_struct *conn, const char *service, const char *user); static void recycle_disconnect(struct connection_struct *conn); -struct vfs_ops recycle_ops = { - +static vfs_op_tuple recycle_ops[] = { + /* Disk operations */ - recycle_connect, /* connect */ - recycle_disconnect, /* disconnect */ - NULL, /* disk free */ - - /* Directory operations */ - - NULL, /* opendir */ - NULL, /* readdir */ - NULL, /* mkdir */ - NULL, /* rmdir */ - NULL, /* closedir */ + {recycle_connect, SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_OPAQUE}, + {recycle_disconnect, SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_OPAQUE}, /* File operations */ - - NULL, /* open */ - NULL, /* close */ - NULL, /* read */ - NULL, /* write */ - NULL, /* lseek */ - NULL, /* rename */ - NULL, /* fsync */ - NULL, /* stat */ - NULL, /* fstat */ - NULL, /* lstat */ - recycle_unlink, - NULL, /* chmod */ - NULL, /* fchmod */ - NULL, /* chown */ - NULL, /* fchown */ - NULL, /* chdir */ - NULL, /* getwd */ - NULL, /* utime */ - NULL, /* ftruncate */ - NULL, /* lock */ - NULL, /* symlink */ - NULL, /* readlink */ - NULL, /* link */ - NULL, /* mknod */ - NULL, /* realpath */ - NULL, /* fget_nt_acl */ - NULL, /* get_nt_acl */ - NULL, /* fset_nt_acl */ - NULL, /* set_nt_acl */ - - NULL, /* chmod_acl */ - NULL, /* fchmod_acl */ - - NULL, /* sys_acl_get_entry */ - NULL, /* sys_acl_get_tag_type */ - NULL, /* sys_acl_get_permset */ - NULL, /* sys_acl_get_qualifier */ - NULL, /* sys_acl_get_file */ - NULL, /* sys_acl_get_fd */ - NULL, /* sys_acl_clear_perms */ - NULL, /* sys_acl_add_perm */ - NULL, /* sys_acl_to_text */ - NULL, /* sys_acl_init */ - NULL, /* sys_acl_create_entry */ - NULL, /* sys_acl_set_tag_type */ - NULL, /* sys_acl_set_qualifier */ - NULL, /* sys_acl_set_permset */ - NULL, /* sys_acl_valid */ - NULL, /* sys_acl_set_file */ - NULL, /* sys_acl_set_fd */ - NULL, /* sys_acl_delete_def_file */ - NULL, /* sys_acl_get_perm */ - NULL, /* sys_acl_free_text */ - NULL, /* sys_acl_free_acl */ - NULL /* sys_acl_free_qualifier */ + + {recycle_unlink, SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_OPAQUE}, + + {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }; -/* VFS initialisation function. Return initialised vfs_ops structure - back to SAMBA. */ +/* VFS initialisation function. Return initialised vfs_op_tuple array back to SAMBA. */ -struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) +vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, + struct smb_vfs_handle_struct *vfs_handle) { - struct vfs_ops tmp_ops; - *vfs_version = SMB_VFS_INTERFACE_VERSION; - memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); - tmp_ops.unlink = recycle_unlink; - tmp_ops.connect = recycle_connect; - tmp_ops.disconnect = recycle_disconnect; - memcpy(&recycle_ops, &tmp_ops, sizeof(struct vfs_ops)); - return &recycle_ops; + memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + /* Remember vfs_id for storing private information at connect */ + recycle_handle = vfs_handle; + + return recycle_ops; +} + +/* VFS finalization function. */ +void vfs_done(connection_struct *conn) +{ + DEBUG(3,("vfs_done_recycle: called for connection %p\n",conn)); } static int recycle_connect(struct connection_struct *conn, const char *service, const char *user) { - pstring opts_str; fstring recycle_bin; - char *p; DEBUG(3,("recycle_connect: called for service %s as user %s\n", service, user)); - pstrcpy(opts_str, (const char *)lp_vfs_options(SNUM(conn))); - if (!*opts_str) { - DEBUG(3,("recycle_connect: No options listed (%s).\n", lp_vfs_options(SNUM(conn)) )); + fstrcpy(recycle_bin, (const char *)lp_parm_string(lp_servicename(SNUM(conn)),"vfs","recycle bin")); + if (!*recycle_bin) { + DEBUG(3,("recycle_connect: No options listed (vfs:recycle bin).\n" )); return 0; /* No options. */ } - p = opts_str; - if (next_token(&p,recycle_bin,"=",sizeof(recycle_bin))) { - if (!strequal("recycle", recycle_bin)) { - DEBUG(3,("recycle_connect: option %s is not recycle\n", recycle_bin )); - return -1; - } - } + DEBUG(3,("recycle_connect: recycle name is %s\n", recycle_bin )); - if (!next_token(&p,recycle_bin," \n",sizeof(recycle_bin))) { - DEBUG(3,("recycle_connect: no option after recycle=\n")); - return -1; - } - - DEBUG(10,("recycle_connect: recycle name is %s\n", recycle_bin )); - - conn->vfs_private = (void *)strdup(recycle_bin); + recycle_handle->data = (void *)strdup(recycle_bin); return 0; } static void recycle_disconnect(struct connection_struct *conn) { - SAFE_FREE(conn->vfs_private); + SAFE_FREE(recycle_handle->data); } static BOOL recycle_XXX_exist(connection_struct *conn, const char *dname, BOOL isdir) @@ -225,8 +154,8 @@ static int recycle_unlink(connection_struct *conn, const char *inname) *recycle_bin = '\0'; pstrcpy(fname, inname); - if (conn->vfs_private) - fstrcpy(recycle_bin, (const char *)conn->vfs_private); + if (recycle_handle->data) + fstrcpy(recycle_bin, (const char *)recycle_handle->data); if(!*recycle_bin) { DEBUG(3, ("recycle bin: share parameter not set, purging %s...\n", fname)); diff --git a/examples/VFS/skel.c b/examples/VFS/skel.c index bb5486e690b..b9376828225 100644 --- a/examples/VFS/skel.c +++ b/examples/VFS/skel.c @@ -3,6 +3,7 @@ * calls to disk functions. * * Copyright (C) Tim Potter, 1999-2000 + * Copyright (C) Alexander Bokovoy, 2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,8 +39,8 @@ #include #include -extern struct vfs_ops default_vfs_ops; /* For passthrough operation */ -extern struct vfs_ops skel_ops; +static struct vfs_ops default_vfs_ops; /* For passthrough operation */ +static struct smb_vfs_handle_struct *skel_handle; /* use skel_handle->data for storing per-instance private data */ static int skel_connect(struct connection_struct *conn, const char *service, const char *user) { @@ -349,172 +350,110 @@ static int skel_sys_acl_free_qualifier(struct connection_struct *conn, void *qua return default_vfs_ops.sys_acl_free_qualifier(conn, qualifier, tagtype); } -/* VFS initialisation - return vfs_ops function pointer structure */ - -struct vfs_ops *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops) -{ - struct vfs_ops tmp_ops; - - DEBUG(3, ("Initialising default vfs hooks\n")); - - *vfs_version = SMB_VFS_INTERFACE_VERSION; - memcpy(&tmp_ops, def_vfs_ops, sizeof(struct vfs_ops)); - - tmp_ops.connect = skel_connect; - tmp_ops.disconnect = skel_disconnect; - tmp_ops.disk_free = skel_disk_free; - - /* Directory operations */ - - tmp_ops.opendir = skel_opendir; - tmp_ops.readdir = skel_readdir; - tmp_ops.mkdir = skel_mkdir; - tmp_ops.rmdir = skel_rmdir; - tmp_ops.closedir = skel_closedir; - - /* File operations */ - - tmp_ops.open = skel_open; - tmp_ops.close = skel_close; - tmp_ops.read = skel_read; - tmp_ops.write = skel_write; - tmp_ops.lseek = skel_lseek; - tmp_ops.rename = skel_rename; - tmp_ops.fsync = skel_fsync; - tmp_ops.stat = skel_stat; - tmp_ops.fstat = skel_fstat; - tmp_ops.lstat = skel_lstat; - tmp_ops.unlink = skel_unlink; - tmp_ops.chmod = skel_chmod; - tmp_ops.fchmod = skel_fchmod; - tmp_ops.chown = skel_chown; - tmp_ops.fchown = skel_fchown; - tmp_ops.chdir = skel_chdir; - tmp_ops.getwd = skel_getwd; - tmp_ops.utime = skel_utime; - tmp_ops.ftruncate = skel_ftruncate; - tmp_ops.lock = skel_lock; - tmp_ops.symlink = skel_symlink; - tmp_ops.readlink = skel_readlink; - tmp_ops.link = skel_link; - tmp_ops.mknod = skel_mknod; - tmp_ops.realpath = skel_realpath; - - tmp_ops.fget_nt_acl = skel_fget_nt_acl; - tmp_ops.get_nt_acl = skel_get_nt_acl; - tmp_ops.fset_nt_acl = skel_fset_nt_acl; - tmp_ops.set_nt_acl = skel_set_nt_acl; - - /* POSIX ACL operations. */ - - tmp_ops.chmod_acl = skel_chmod_acl; - tmp_ops.fchmod_acl = skel_fchmod_acl; - tmp_ops.sys_acl_get_entry = skel_sys_acl_get_entry; - tmp_ops.sys_acl_get_tag_type = skel_sys_acl_get_tag_type; - tmp_ops.sys_acl_get_permset = skel_sys_acl_get_permset; - tmp_ops.sys_acl_get_qualifier = skel_sys_acl_get_qualifier; - tmp_ops.sys_acl_get_file = skel_sys_acl_get_file; - tmp_ops.sys_acl_get_fd = skel_sys_acl_get_fd; - tmp_ops.sys_acl_clear_perms = skel_sys_acl_clear_perms; - tmp_ops.sys_acl_add_perm = skel_sys_acl_add_perm; - tmp_ops.sys_acl_to_text = skel_sys_acl_to_text; - tmp_ops.sys_acl_init = skel_sys_acl_init; - tmp_ops.sys_acl_create_entry = skel_sys_acl_create_entry; - tmp_ops.sys_acl_set_tag_type = skel_sys_acl_set_tag_type; - tmp_ops.sys_acl_set_qualifier = skel_sys_acl_set_qualifier; - tmp_ops.sys_acl_set_permset = skel_sys_acl_set_permset; - tmp_ops.sys_acl_valid = skel_sys_acl_valid; - tmp_ops.sys_acl_set_file = skel_sys_acl_set_file; - tmp_ops.sys_acl_set_fd = skel_sys_acl_set_fd; - tmp_ops.sys_acl_delete_def_file = skel_sys_acl_delete_def_file; - tmp_ops.sys_acl_get_perm = skel_sys_acl_get_perm; - tmp_ops.sys_acl_free_text = skel_sys_acl_free_text; - tmp_ops.sys_acl_free_acl = skel_sys_acl_free_acl; - tmp_ops.sys_acl_free_qualifier = skel_sys_acl_free_qualifier; - - memcpy(&skel_ops, &tmp_ops, sizeof(struct vfs_ops)); - - return &skel_ops; -} /* VFS operations structure */ -struct vfs_ops skel_ops = { +static vfs_op_tuple skel_ops[] = { /* Disk operations */ - skel_connect, - skel_disconnect, - skel_disk_free, + {skel_connect, SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_disconnect, SMB_VFS_OP_DISCONNECT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_disk_free, SMB_VFS_OP_DISK_FREE, SMB_VFS_LAYER_TRANSPARENT}, /* Directory operations */ - skel_opendir, - skel_readdir, - skel_mkdir, - skel_rmdir, - skel_closedir, + {skel_opendir, SMB_VFS_OP_OPENDIR, SMB_VFS_LAYER_TRANSPARENT}, + {skel_readdir, SMB_VFS_OP_READDIR, SMB_VFS_LAYER_TRANSPARENT}, + {skel_mkdir, SMB_VFS_OP_MKDIR, SMB_VFS_LAYER_TRANSPARENT}, + {skel_rmdir, SMB_VFS_OP_RMDIR, SMB_VFS_LAYER_TRANSPARENT}, + {skel_closedir, SMB_VFS_OP_CLOSEDIR, SMB_VFS_LAYER_TRANSPARENT}, /* File operations */ - skel_open, - skel_close, - skel_read, - skel_write, - skel_lseek, - skel_rename, - skel_fsync, - skel_stat, - skel_fstat, - skel_lstat, - skel_unlink, - skel_chmod, - skel_fchmod, - skel_chown, - skel_fchown, - skel_chdir, - skel_getwd, - skel_utime, - skel_ftruncate, - skel_lock, - skel_symlink, - skel_readlink, - skel_link, - skel_mknod, - skel_realpath, + {skel_open, SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT}, + {skel_close, SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_read, SMB_VFS_OP_READ, SMB_VFS_LAYER_TRANSPARENT}, + {skel_write, SMB_VFS_OP_WRITE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_lseek, SMB_VFS_OP_LSEEK, SMB_VFS_LAYER_TRANSPARENT}, + {skel_rename, SMB_VFS_OP_RENAME, SMB_VFS_LAYER_TRANSPARENT}, + {skel_fsync, SMB_VFS_OP_FSYNC, SMB_VFS_LAYER_TRANSPARENT}, + {skel_stat, SMB_VFS_OP_STAT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_fstat, SMB_VFS_OP_FSTAT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_lstat, SMB_VFS_OP_LSTAT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_unlink, SMB_VFS_OP_UNLINK, SMB_VFS_LAYER_TRANSPARENT}, + {skel_chmod, SMB_VFS_OP_CHMOD, SMB_VFS_LAYER_TRANSPARENT}, + {skel_fchmod, SMB_VFS_OP_FCHMOD, SMB_VFS_LAYER_TRANSPARENT}, + {skel_chown, SMB_VFS_OP_CHOWN, SMB_VFS_LAYER_TRANSPARENT}, + {skel_fchown, SMB_VFS_OP_FCHOWN, SMB_VFS_LAYER_TRANSPARENT}, + {skel_chdir, SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_TRANSPARENT}, + {skel_getwd, SMB_VFS_OP_GETWD, SMB_VFS_LAYER_TRANSPARENT}, + {skel_utime, SMB_VFS_OP_UTIME, SMB_VFS_LAYER_TRANSPARENT}, + {skel_ftruncate, SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_lock, SMB_VFS_OP_LOCK, SMB_VFS_LAYER_TRANSPARENT}, + {skel_symlink, SMB_VFS_OP_SYMLINK, SMB_VFS_LAYER_TRANSPARENT}, + {skel_readlink, SMB_VFS_OP_READLINK, SMB_VFS_LAYER_TRANSPARENT}, + {skel_link, SMB_VFS_OP_LINK, SMB_VFS_LAYER_TRANSPARENT}, + {skel_mknod, SMB_VFS_OP_MKNOD, SMB_VFS_LAYER_TRANSPARENT}, + {skel_realpath, SMB_VFS_OP_REALPATH, SMB_VFS_LAYER_TRANSPARENT}, /* NT File ACL operations */ - skel_fget_nt_acl, - skel_get_nt_acl, - skel_fset_nt_acl, - skel_set_nt_acl, + {skel_fget_nt_acl, SMB_VFS_OP_FGET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {skel_get_nt_acl, SMB_VFS_OP_GET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {skel_fset_nt_acl, SMB_VFS_OP_FSET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {skel_set_nt_acl, SMB_VFS_OP_SET_NT_ACL, SMB_VFS_LAYER_TRANSPARENT}, /* POSIX ACL operations */ - skel_chmod_acl, - skel_fchmod_acl, + {skel_chmod_acl, SMB_VFS_OP_CHMOD_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {skel_fchmod_acl, SMB_VFS_OP_FCHMOD_ACL, SMB_VFS_LAYER_TRANSPARENT}, - skel_sys_acl_get_entry, - skel_sys_acl_get_tag_type, - skel_sys_acl_get_permset, - skel_sys_acl_get_qualifier, - skel_sys_acl_get_file, - skel_sys_acl_get_fd, - skel_sys_acl_clear_perms, - skel_sys_acl_add_perm, - skel_sys_acl_to_text, - skel_sys_acl_init, - skel_sys_acl_create_entry, - skel_sys_acl_set_tag_type, - skel_sys_acl_set_qualifier, - skel_sys_acl_set_permset, - skel_sys_acl_valid, - skel_sys_acl_set_file, - skel_sys_acl_set_fd, - skel_sys_acl_delete_def_file, - skel_sys_acl_get_perm, - skel_sys_acl_free_text, - skel_sys_acl_free_acl, - skel_sys_acl_free_qualifier + {skel_sys_acl_get_entry, SMB_VFS_OP_SYS_ACL_GET_ENTRY, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_get_tag_type, SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_get_permset, SMB_VFS_OP_SYS_ACL_GET_PERMSET, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_get_qualifier, SMB_VFS_OP_SYS_ACL_GET_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_get_file, SMB_VFS_OP_SYS_ACL_GET_FILE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_get_fd, SMB_VFS_OP_SYS_ACL_GET_FD, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_clear_perms, SMB_VFS_OP_SYS_ACL_CLEAR_PERMS, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_add_perm, SMB_VFS_OP_SYS_ACL_ADD_PERM, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_to_text, SMB_VFS_OP_SYS_ACL_TO_TEXT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_init, SMB_VFS_OP_SYS_ACL_INIT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_create_entry, SMB_VFS_OP_SYS_ACL_CREATE_ENTRY, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_set_tag_type, SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_set_qualifier, SMB_VFS_OP_SYS_ACL_SET_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_set_permset, SMB_VFS_OP_SYS_ACL_SET_PERMSET, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_valid, SMB_VFS_OP_SYS_ACL_VALID, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_set_file, SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_set_fd, SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_delete_def_file, SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_get_perm, SMB_VFS_OP_SYS_ACL_GET_PERM, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_free_text, SMB_VFS_OP_SYS_ACL_FREE_TEXT, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_free_acl, SMB_VFS_OP_SYS_ACL_FREE_ACL, SMB_VFS_LAYER_TRANSPARENT}, + {skel_sys_acl_free_qualifier, SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT}, + + {NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP} }; + +/* VFS initialisation - return initialized vfs_op_tuple array back to Samba */ + +vfs_op_tuple *vfs_init(int *vfs_version, struct vfs_ops *def_vfs_ops, + struct smb_vfs_handle_struct *vfs_handle) +{ + DEBUG(3, ("Initialising default vfs hooks\n")); + + *vfs_version = SMB_VFS_INTERFACE_VERSION; + memcpy(&default_vfs_ops, def_vfs_ops, sizeof(struct vfs_ops)); + + /* Remember vfs_handle for further allocation and referencing of private + information in vfs_handle->data + */ + skel_handle = vfs_handle; + return skel_ops; +} + +/* VFS finalization function */ +void vfs_done(connection_struct *conn) +{ + DEBUG(3, ("Finalizing default vfs hooks\n")); +} diff --git a/source3/configure b/source3/configure index 7fd759b6fbb..69fc5fc1e3d 100755 --- a/source3/configure +++ b/source3/configure @@ -14085,7 +14085,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/source3/configure.in b/source3/configure.in index 0531675c7d7..db34c266c58 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2797,7 +2797,7 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"], builddir=`pwd` AC_SUBST(builddir) -AC_OUTPUT(include/stamp-h Makefile script/findsmb) +AC_OUTPUT(include/stamp-h Makefile script/findsmb ../examples/VFS/Makefile ../examples/VFS/block/Makefile) ################################################# # Print very concise instructions on building/use diff --git a/source3/include/smb.h b/source3/include/smb.h index 915ab66703c..2911a991f2e 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -444,6 +444,15 @@ typedef struct #include "smb_acls.h" #include "vfs.h" +typedef struct smb_vfs_handle_struct +{ + void *data; + /* Handle on dlopen() call */ + void *handle; + struct smb_vfs_handle_struct *next, *prev; + +} smb_vfs_handle_struct; + typedef struct connection_struct { struct connection_struct *next, *prev; @@ -461,9 +470,7 @@ typedef struct connection_struct char *origpath; struct vfs_ops vfs_ops; /* Filesystem operations */ - /* Handle on dlopen() call */ - void *dl_handle; - void *vfs_private; + struct smb_vfs_handle_struct *vfs_private; char *user; /* name of user who *opened* this connection */ uid_t uid; /* uid of user who *opened* this connection */ diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 2f9fedf77d3..1b1a13d7c12 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -1,7 +1,8 @@ /* Unix SMB/CIFS implementation. VFS structures and parameters - Copyright (C) Tim Potter 1999 + Copyright (C) Tim Potter 1999 + Copyright (C) Alexander Bokovoy 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,6 +17,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + This work was sponsored by Optifacio Software Services, Inc. */ #ifndef _VFS_H @@ -40,7 +43,48 @@ /* Changed to version 2 for CIFS UNIX extensions (mknod and link added). JRA. */ /* Changed to version 3 for POSIX acl extensions. JRA. */ -#define SMB_VFS_INTERFACE_VERSION 3 +/* Changed to version 4 for cascaded VFS interface. Alexander Bokovoy. */ +#define SMB_VFS_INTERFACE_VERSION 5 + + +/* Version of supported cascaded interface backward copmatibility. + (version 4 corresponds to SMB_VFS_INTERFACE_VERSION 4) + It is used in vfs_init_custom() to detect VFS modules which conform to cascaded + VFS interface but implement elder version than current version of Samba uses. + This allows to use old modules with new VFS interface as far as combined VFS operation + set is coherent (will be in most cases). +*/ +#define SMB_VFS_INTERFACE_CASCADED 4 + +/* + Each VFS module must provide following global functions: + vfs_init -- initialization function + vfs_done -- finalization function + + vfs_init must return proper initialized vfs_op_tuple[] array + which describes all operations this module claims to intercept. This function + is called whenever module is loaded into smbd process using sys_dlopen(). + + vfs_init must store somewhere vfs_handle reference if module wants to store per-instance + private information for further usage. vfs_handle->data should be used to + store such information. Do not try to change other fields in this structure + or results likely to be unpredictable. + + vfs_done must perform finalization of the module. In particular, + this function must free vfs_ops structure returned to module from smb_vfs_get_opaque_ops() + function if it is used (see below). This function is called whenever module + is unloaded from smbd process using sys_dlclose(). + + Prototypes: + vfs_op_tuple *vfs_init(int *vfs_version, const struct vfs_ops *def_vfs_ops, + struct smb_vfs_handle_struct *vfs_handle); + void vfs_done(connection_struct *conn); + + All intercepted VFS operations must be declared as static functions inside module source + in order to keep smbd namespace unpolluted. See source of skel, audit, and recycle bin + example VFS modules for more details. + +*/ /* VFS operations structure */ @@ -135,4 +179,157 @@ struct vfs_options { char *value; }; +/* + Available VFS operations. These values must be in sync with vfs_ops struct. + In particular, if new operations are added to vfs_ops, appropriate constants + should be added to vfs_op_type so that order of them kept same as in vfs_ops. +*/ + +typedef enum _vfs_op_type { + + SMB_VFS_OP_NOOP = -1, + + /* Disk operations */ + + SMB_VFS_OP_CONNECT = 0, + SMB_VFS_OP_DISCONNECT, + SMB_VFS_OP_DISK_FREE, + + /* Directory operations */ + + SMB_VFS_OP_OPENDIR, + SMB_VFS_OP_READDIR, + SMB_VFS_OP_MKDIR, + SMB_VFS_OP_RMDIR, + SMB_VFS_OP_CLOSEDIR, + + /* File operations */ + + SMB_VFS_OP_OPEN, + SMB_VFS_OP_CLOSE, + SMB_VFS_OP_READ, + SMB_VFS_OP_WRITE, + SMB_VFS_OP_LSEEK, + SMB_VFS_OP_RENAME, + SMB_VFS_OP_FSYNC, + SMB_VFS_OP_STAT, + SMB_VFS_OP_FSTAT, + SMB_VFS_OP_LSTAT, + SMB_VFS_OP_UNLINK, + SMB_VFS_OP_CHMOD, + SMB_VFS_OP_FCHMOD, + SMB_VFS_OP_CHOWN, + SMB_VFS_OP_FCHOWN, + SMB_VFS_OP_CHDIR, + SMB_VFS_OP_GETWD, + SMB_VFS_OP_UTIME, + SMB_VFS_OP_FTRUNCATE, + SMB_VFS_OP_LOCK, + SMB_VFS_OP_SYMLINK, + SMB_VFS_OP_READLINK, + SMB_VFS_OP_LINK, + SMB_VFS_OP_MKNOD, + SMB_VFS_OP_REALPATH, + + /* NT ACL operations. */ + + SMB_VFS_OP_FGET_NT_ACL, + SMB_VFS_OP_GET_NT_ACL, + SMB_VFS_OP_FSET_NT_ACL, + SMB_VFS_OP_SET_NT_ACL, + + /* POSIX ACL operations. */ + + SMB_VFS_OP_CHMOD_ACL, + SMB_VFS_OP_FCHMOD_ACL, + + SMB_VFS_OP_SYS_ACL_GET_ENTRY, + SMB_VFS_OP_SYS_ACL_GET_TAG_TYPE, + SMB_VFS_OP_SYS_ACL_GET_PERMSET, + SMB_VFS_OP_SYS_ACL_GET_QUALIFIER, + SMB_VFS_OP_SYS_ACL_GET_FILE, + SMB_VFS_OP_SYS_ACL_GET_FD, + SMB_VFS_OP_SYS_ACL_CLEAR_PERMS, + SMB_VFS_OP_SYS_ACL_ADD_PERM, + SMB_VFS_OP_SYS_ACL_TO_TEXT, + SMB_VFS_OP_SYS_ACL_INIT, + SMB_VFS_OP_SYS_ACL_CREATE_ENTRY, + SMB_VFS_OP_SYS_ACL_SET_TAG_TYPE, + SMB_VFS_OP_SYS_ACL_SET_QUALIFIER, + SMB_VFS_OP_SYS_ACL_SET_PERMSET, + SMB_VFS_OP_SYS_ACL_VALID, + SMB_VFS_OP_SYS_ACL_SET_FILE, + SMB_VFS_OP_SYS_ACL_SET_FD, + SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, + SMB_VFS_OP_SYS_ACL_GET_PERM, + SMB_VFS_OP_SYS_ACL_FREE_TEXT, + SMB_VFS_OP_SYS_ACL_FREE_ACL, + SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, + + /* This should always be last enum value */ + + SMB_VFS_OP_LAST +} vfs_op_type; + +/* + Possible VFS operation layers (per-operation) + + These values are used by VFS subsystem when building vfs_ops for connection + from multiple VFS modules. Internally, Samba differentiates only opaque and + transparent layers at this process. Other types are used for providing better + diagnosing facilities. + + Most modules will provide transparent layers. Opaque layer is for modules + which implement actual file system calls (like DB-based VFS). For example, + default POSIX VFS which is built in into Samba is an opaque VFS module. + + Other layer types (audit, splitter, scanner) were designed to provide different + degree of transparency and for diagnosing VFS module behaviour. + + Each module can implement several layers at the same time provided that only + one layer is used per each operation. + +*/ + +typedef enum _vfs_op_layer { + SMB_VFS_LAYER_NOOP = -1, /* - For using in VFS module to indicate end of array */ + /* of operations description */ + SMB_VFS_LAYER_OPAQUE = 0, /* - Final level, does not call anything beyond itself */ + SMB_VFS_LAYER_TRANSPARENT, /* - Normal operation, calls underlying layer after */ + /* possibly changing passed data */ + SMB_VFS_LAYER_LOGGER, /* - Logs data, calls underlying layer, logging does not */ + /* use Samba VFS */ + SMB_VFS_LAYER_SPLITTER, /* - Splits operation, calls underlying layer _and_ own facility, */ + /* then combines result */ + SMB_VFS_LAYER_SCANNER /* - Checks data and possibly initiates additional */ + /* file activity like logging to files _inside_ samba VFS */ +} vfs_op_layer; + +/* + VFS operation description. Each VFS module initialization function returns to VFS subsystem + an array of vfs_op_tuple which describes all operations this module is willing to intercept. + VFS subsystem initializes then vfs_ops using this information and passes it + to next VFS module as underlying vfs_ops and to connection after all VFS modules are initialized. +*/ + +typedef struct _vfs_op_tuple { + void* op; + vfs_op_type type; + vfs_op_layer layer; +} vfs_op_tuple; + +/* + Return vfs_ops filled with current opaque VFS operations. This function is designed to + be called from VFS module initialization function for those modules which needs 'direct' VFS + access (loggers or initiators of file operations other than connection asks for). + + Returned vfs_ops must be cleaned up in VFS module's finalizer function (vfs_done_) + using safe_free(). + + Prototype: + struct vfs_ops *smb_vfs_get_opaque_ops(); + + This prototype will be available via include/proto.h +*/ + #endif /* _VFS_H */ diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 33e57e36e2e..0cb9a48622b 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -313,6 +313,7 @@ typedef struct char *fstype; char *szVfsObjectFile; char *szVfsOptions; + char *szVfsPath; int iMinPrintSpace; int iMaxPrintJobs; int iWriteCacheSize; @@ -432,6 +433,7 @@ static service sDefault = { NULL, /* fstype */ NULL, /* vfs object */ NULL, /* vfs options */ + NULL, /* vfs path */ 0, /* iMinPrintSpace */ 1000, /* iMaxPrintJobs */ 0, /* iWriteCacheSize */ @@ -1024,6 +1026,7 @@ static struct parm_struct parm_table[] = { {"vfs object", P_STRING, P_LOCAL, &sDefault.szVfsObjectFile, handle_vfs_object, NULL, FLAG_SHARE}, {"vfs options", P_STRING, P_LOCAL, &sDefault.szVfsOptions, NULL, NULL, FLAG_SHARE}, + {"vfs path", P_STRING, P_LOCAL, &sDefault.szVfsPath, NULL, NULL, FLAG_SHARE}, {"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, FLAG_SHARE}, @@ -1651,6 +1654,7 @@ FN_LOCAL_LIST(lp_printer_admin, printer_admin) FN_LOCAL_STRING(lp_fstype, fstype) FN_LOCAL_STRING(lp_vfsobj, szVfsObjectFile) FN_LOCAL_STRING(lp_vfs_options, szVfsOptions) +FN_LOCAL_STRING(lp_vfs_path, szVfsPath) static FN_LOCAL_STRING(lp_volume, volume) FN_LOCAL_STRING(lp_mangled_map, szMangledMap) FN_LOCAL_STRING(lp_veto_files, szVetoFiles) diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index c0aa4470160..3b6dd61e1e1 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -2,6 +2,7 @@ Unix SMB/CIFS implementation. Manage connections_struct structures Copyright (C) Andrew Tridgell 1998 + Copyright (C) Alexander Bokovoy 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -162,11 +163,25 @@ BOOL conn_idle_all(time_t t, int deadtime) void conn_free(connection_struct *conn) { + smb_vfs_handle_struct *handle, *thandle; + void (*done_fptr)(connection_struct *conn); + /* Free vfs_connection_struct */ - - if (conn->dl_handle != NULL) { - /* Close dlopen() handle */ - sys_dlclose(conn->dl_handle); + handle = conn->vfs_private; + while(handle) { + /* Close dlopen() handle */ + done_fptr = (void (*)(connection_struct *))sys_dlsym(handle->handle, "vfs_done"); + + if (done_fptr == NULL) { + DEBUG(3, ("No vfs_done() symbol found in module with handle %p, ignoring\n", handle->handle)); + } else { + done_fptr(conn); + } + sys_dlclose(handle->handle); + DLIST_REMOVE(conn->vfs_private, handle); + thandle = handle->next; + SAFE_FREE(handle); + handle = thandle; } DLIST_REMOVE(Connections, conn); diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 5e1dc68bdb4..f8d6f391d83 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -3,6 +3,7 @@ Version 1.9. VFS initialisation and support functions Copyright (C) Tim Potter 1999 + Copyright (C) Alexander Bokovoy 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +18,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + This work was sponsored by Optifacio Software Services, Inc. */ #include "includes.h" @@ -28,6 +31,12 @@ struct vfs_syminfo { void *fptr; }; +/* + Opaque (final) vfs operations. This is a combination of first-met opaque vfs operations + across all currently processed modules. */ + +static vfs_op_tuple vfs_opaque_ops[SMB_VFS_OP_LAST]; + /* Default vfs hooks. WARNING: The order of these initialisers is very important. They must be in the same order as defined in vfs.h. Change at your own peril. */ @@ -117,58 +126,75 @@ static struct vfs_ops default_vfs_ops = { initialise default vfs hooks ****************************************************************************/ -static BOOL vfs_init_default(connection_struct *conn) +static void vfs_init_default(connection_struct *conn) { DEBUG(3, ("Initialising default vfs hooks\n")); memcpy(&conn->vfs_ops, &default_vfs_ops, sizeof(struct vfs_ops)); - return True; + conn->vfs_private = NULL; } /**************************************************************************** initialise custom vfs hooks ****************************************************************************/ -static BOOL vfs_init_custom(connection_struct *conn) +static BOOL vfs_init_custom(connection_struct *conn, const char *vfs_object) { int vfs_version = -1; - struct vfs_ops *ops, *(*init_fptr)(int *, struct vfs_ops *); + vfs_op_tuple *ops, *(*init_fptr)(int *, const struct vfs_ops *, struct smb_vfs_handle_struct *); + int i; - DEBUG(3, ("Initialising custom vfs hooks from %s\n", lp_vfsobj(SNUM(conn)))); + DEBUG(3, ("Initialising custom vfs hooks from %s\n", vfs_object)); /* Open object file */ - if ((conn->dl_handle = sys_dlopen(lp_vfsobj(SNUM(conn)), RTLD_NOW | RTLD_GLOBAL)) == NULL) { - DEBUG(0, ("Error opening %s: %s\n", lp_vfsobj(SNUM(conn)), sys_dlerror())); + if ((conn->vfs_private->handle = sys_dlopen(vfs_object, RTLD_NOW)) == NULL) { + DEBUG(0, ("Error opening %s: %s\n", vfs_object, sys_dlerror())); return False; } /* Get handle on vfs_init() symbol */ - init_fptr = (struct vfs_ops *(*)(int *, struct vfs_ops *))sys_dlsym(conn->dl_handle, "vfs_init"); + init_fptr = (vfs_op_tuple *(*)(int *, const struct vfs_ops *, struct smb_vfs_handle_struct *))sys_dlsym(conn->vfs_private->handle, "vfs_init"); if (init_fptr == NULL) { - DEBUG(0, ("No vfs_init() symbol found in %s\n", lp_vfsobj(SNUM(conn)))); + DEBUG(0, ("No vfs_init() symbol found in %s\n", vfs_object)); return False; } /* Initialise vfs_ops structure */ - conn->vfs_ops = default_vfs_ops; - - if ((ops = init_fptr(&vfs_version, &default_vfs_ops)) == NULL) { - DEBUG(0, ("vfs_init function from %s failed\n", lp_vfsobj(SNUM(conn)))); - return False; - } - - if (vfs_version != SMB_VFS_INTERFACE_VERSION) { - DEBUG(0, ("vfs_init returned wrong interface version info (was %d, should be %d)\n", - vfs_version, SMB_VFS_INTERFACE_VERSION )); - return False; - } - - if (ops != &conn->vfs_ops) { - memcpy(&conn->vfs_ops, ops, sizeof(struct vfs_ops)); + if ((ops = init_fptr(&vfs_version, &conn->vfs_ops, conn->vfs_private)) == NULL) { + DEBUG(0, ("vfs_init() function from %s failed\n", vfs_object)); + return False; + } + + if ((vfs_version < SMB_VFS_INTERFACE_CASCADED)) { + DEBUG(0, ("vfs_init() returned wrong interface version info (was %d, should be no less than %d)\n", + vfs_version, SMB_VFS_INTERFACE_VERSION )); + return False; + } + + if ((vfs_version < SMB_VFS_INTERFACE_VERSION)) { + DEBUG(0, ("Warning: vfs_init() states that module confirms interface version #%d, current interface version is #%d.\n\ +Proceeding in compatibility mode, new operations (since version #%d) will fallback to default ones.\n", + vfs_version, SMB_VFS_INTERFACE_VERSION, vfs_version )); + return False; + } + + for(i=0; ops[i].op != NULL; i++) { + DEBUG(3, ("Checking operation #%d (type %d, layer %d)\n", i, ops[i].type, ops[i].layer)); + if(ops[i].layer == SMB_VFS_LAYER_OPAQUE) { + /* Check whether this operation was already made opaque by different module */ + if(vfs_opaque_ops[ops[i].type].op == ((void**)&default_vfs_ops)[ops[i].type]) { + /* No, it isn't overloaded yet. Overload. */ + DEBUG(3, ("Making operation type %d opaque [module %s]\n", ops[i].type, vfs_object)); + vfs_opaque_ops[ops[i].type] = ops[i]; + } + } + /* Change current VFS disposition*/ + DEBUG(3, ("Accepting operation type %d from module %s\n", ops[i].type, vfs_object)); + ((void**)&conn->vfs_ops)[ops[i].type] = ops[i].op; } return True; @@ -180,21 +206,70 @@ static BOOL vfs_init_custom(connection_struct *conn) BOOL smbd_vfs_init(connection_struct *conn) { - if (*lp_vfsobj(SNUM(conn))) { - - /* Loadable object file */ - - if (!vfs_init_custom(conn)) { - DEBUG(0, ("smbd_vfs_init: vfs_init_custom failed\n")); - return False; - } - - return True; - } - + char **vfs_objects, *vfsobj, *vfs_module, *vfs_path; + int nobj, i; + struct smb_vfs_handle_struct *handle; + /* Normal share - initialise with disk access functions */ - - return vfs_init_default(conn); + vfs_init_default(conn); + + /* Override VFS functions if 'vfs object' was specified*/ + if (*lp_vfsobj(SNUM(conn))) { + vfsobj = NULL; + for(i=0; ivfs_private = NULL; + for(i=nobj-1; i>=0; i--) { + handle = (struct smb_vfs_handle_struct *) smb_xmalloc(sizeof(smb_vfs_handle_struct)); + /* Loadable object file */ + handle->handle = NULL; + DLIST_ADD(conn->vfs_private, handle) + vfs_module = NULL; + if (vfs_path) { + asprintf(&vfs_module, "%s/%s", vfs_path, vfs_objects[i]); + } else { + asprintf(&vfs_module, "%s", vfs_objects[i]); + } + if (!vfs_init_custom(conn, vfs_module)) { + DEBUG(0, ("smbd_vfs_init: vfs_init_custom failed for %s\n", vfs_module)); + string_free(&vfsobj); + SAFE_FREE(vfs_module); + return False; + } + SAFE_FREE(vfs_module); + } + } + string_free(&vfsobj); + return True; + } + } + return True; +} + +/******************************************************************* + Create vfs_ops reflecting current vfs_opaque_ops +*******************************************************************/ +struct vfs_ops *smb_vfs_get_opaque_ops() +{ + int i; + struct vfs_ops *ops; + + ops = smb_xmalloc(sizeof(struct vfs_ops)); + + for(i=0; i Date: Tue, 30 Jul 2002 11:21:42 +0000 Subject: [PATCH 150/262] - if we are in ADS mode then avoid an expensive netbios lookup to find the servers netbios name when we don't need it. This also fixes ADS mode when the DC has netbios disabled. - if the password server is specified as an IP then actually use that IP, don't do a lookup for the servers name :) (This used to be commit 72042e94ef0f6841afcfa48eafb9809545860725) --- source3/auth/auth_domain.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 0f084dc1de0..9134a3fc632 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -60,22 +60,31 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, return NT_STATUS_NO_LOGON_SERVERS; } - if (!name_status_find("*", 0x20, 0x20, to_ip, remote_machine)) { + if (lp_security() == SEC_ADS) { + /* if in ADS mode then we know that port 445 + will work and *SMBSERVER will be recognised + anyway. This avoids an expensive netbios + lookup. */ + fstrcpy(remote_machine, "*SMBSERVER"); + } else if (!name_status_find("*", 0x20, 0x20, to_ip, remote_machine)) { DEBUG(0, ("connect_to_domain_password_server: Can't " "resolve name for IP %s\n", server)); return NT_STATUS_NO_LOGON_SERVERS; } + + /* we know the IP - smb.conf specified it! */ + dest_ip = to_ip; } else { fstrcpy(remote_machine, server); + strupper(remote_machine); + if (!resolve_name(remote_machine, &dest_ip, 0x20)) { + DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", + remote_machine)); + return NT_STATUS_NO_LOGON_SERVERS; + } } standard_sub_basic(current_user_info.smb_name, remote_machine, sizeof(remote_machine)); - strupper(remote_machine); - - if(!resolve_name( remote_machine, &dest_ip, 0x20)) { - DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", remote_machine)); - return NT_STATUS_NO_LOGON_SERVERS; - } if (ismyip(dest_ip)) { DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n", From da44215ebb365adfdc82931b44cc43e2a663fb31 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 11:30:13 +0000 Subject: [PATCH 151/262] removed a gratuitous standard_sub_basic() on the 'password server' field. This has got to be pointless. (This used to be commit fd02adab54b66a19c1b81b8ae91e66713691b060) --- source3/auth/auth_domain.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 9134a3fc632..50bad0bd307 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -84,8 +84,6 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, } } - standard_sub_basic(current_user_info.smb_name, remote_machine, sizeof(remote_machine)); - if (ismyip(dest_ip)) { DEBUG(1,("connect_to_domain_password_server: Password server loop - not using password server %s\n", remote_machine)); From 0bd3a76f673de93dac4fa18a60612bc888c05df4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 12:42:41 +0000 Subject: [PATCH 152/262] 2nd try at a fix for netbiosless connections to a ADS DC. This also make the code a fair bit cleaner as it splits up the ADS and RPC cases, which really are very different. (This used to be commit 5a11c432afebe84b17820396476f48a6a6f6411b) --- source3/auth/auth_domain.c | 121 +++++++++++++++++++++++++++---------- 1 file changed, 90 insertions(+), 31 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 50bad0bd307..d0b5b4db7f9 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -29,6 +29,87 @@ BOOL global_machine_password_needs_changing = False; extern pstring global_myname; extern userdom_struct current_user_info; + +/* + resolve the name of a DC in ways appropriate for an ADS domain mode + an ADS domain may not have Netbios enabled at all, so this is + quite different from the RPC case + Note that we ignore the 'server' parameter here. That has the effect of using + the 'ADS server' smb.conf parameter, which is what we really want anyway + */ +static NTSTATUS ads_resolve_dc(const char *server, + fstring remote_machine, + struct in_addr *dest_ip) +{ + ADS_STRUCT *ads; + ads = ads_init_simple(); + if (!ads) { + return NT_STATUS_NO_LOGON_SERVERS; + } + +#ifdef HAVE_ADS + /* a full ads_connect() is actually overkill, as we don't srictly need + to do the SASL auth in order to get the info we need, but libads + doesn't offer a better way right now */ + if (!ADS_ERR_OK(ads_connect(ads))) { + return NT_STATUS_NO_LOGON_SERVERS; + } +#endif + + fstrcpy(remote_machine, ads->ldap_server_name); + strupper(remote_machine); + *dest_ip = *interpret_addr2(ads->ldap_server); + ads_destroy(&ads); + + if (!*remote_machine) { + return NT_STATUS_NO_LOGON_SERVERS; + } + + DEBUG(4,("ads_resolve_dc: using server='%s' IP=%s\n", + remote_machine, inet_ntoa(*dest_ip))); + + return NT_STATUS_OK; +} + +/* + resolve the name of a DC in ways appropriate for RPC domain mode + this relies on the server supporting netbios and port 137 not being + firewalled + */ +static NTSTATUS rpc_resolve_dc(const char *server, + fstring remote_machine, + struct in_addr *dest_ip) +{ + if (is_ipaddress(server)) { + struct in_addr to_ip = *interpret_addr2(server); + + /* we need to know the machines netbios name - this is a lousy + way to find it, but until we have a RPC call that does this + it will have to do */ + if (!name_status_find("*", 0x20, 0x20, to_ip, remote_machine)) { + DEBUG(2, ("connect_to_domain_password_server: Can't " + "resolve name for IP %s\n", server)); + return NT_STATUS_NO_LOGON_SERVERS; + } + + *dest_ip = to_ip; + return NT_STATUS_OK; + } + + fstrcpy(remote_machine, server); + strupper(remote_machine); + if (!resolve_name(remote_machine, dest_ip, 0x20)) { + DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", + remote_machine)); + return NT_STATUS_NO_LOGON_SERVERS; + } + + DEBUG(4,("rpc_resolve_dc: using server='%s' IP=%s\n", + remote_machine, inet_ntoa(*dest_ip))); + + return NT_STATUS_OK; +} + /** * Connect to a remote server for domain security authenticaion. * @@ -50,38 +131,16 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, fstring remote_machine; NTSTATUS result; - if (is_ipaddress(server)) { - struct in_addr to_ip; - - /* we shouldn't have 255.255.255.255 forthe IP address of - a password server anyways */ - if ((to_ip.s_addr=inet_addr(server)) == 0xFFFFFFFF) { - DEBUG (0,("connect_to_domain_password_server: inet_addr(%s) returned 0xFFFFFFFF!\n", server)); - return NT_STATUS_NO_LOGON_SERVERS; - } - - if (lp_security() == SEC_ADS) { - /* if in ADS mode then we know that port 445 - will work and *SMBSERVER will be recognised - anyway. This avoids an expensive netbios - lookup. */ - fstrcpy(remote_machine, "*SMBSERVER"); - } else if (!name_status_find("*", 0x20, 0x20, to_ip, remote_machine)) { - DEBUG(0, ("connect_to_domain_password_server: Can't " - "resolve name for IP %s\n", server)); - return NT_STATUS_NO_LOGON_SERVERS; - } - - /* we know the IP - smb.conf specified it! */ - dest_ip = to_ip; + if (lp_security() == SEC_ADS) { + result = ads_resolve_dc(server, remote_machine, &dest_ip); } else { - fstrcpy(remote_machine, server); - strupper(remote_machine); - if (!resolve_name(remote_machine, &dest_ip, 0x20)) { - DEBUG(1,("connect_to_domain_password_server: Can't resolve address for %s\n", - remote_machine)); - return NT_STATUS_NO_LOGON_SERVERS; - } + result = rpc_resolve_dc(server, remote_machine, &dest_ip); + } + + if (!NT_STATUS_IS_OK(result)) { + DEBUG(2,("connect_to_domain_password_server: unable to resolve DC: %s\n", + nt_errstr(result))); + return result; } if (ismyip(dest_ip)) { From 2edcc96c11c1f5c9294f1730973e7582b3a3acbd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 13:27:42 +0000 Subject: [PATCH 153/262] a couple more minor tweaks. This now allows us to operate in ADS mode without any 'realm =' or 'ads server =' options at all, as long as DNS is working right. (This used to be commit d3fecdd04241ed7b9248e52415693cd54a1faecf) --- source3/auth/auth_domain.c | 7 +++---- source3/libads/ads_struct.c | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index d0b5b4db7f9..f74f1bb9e89 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -37,8 +37,7 @@ extern userdom_struct current_user_info; Note that we ignore the 'server' parameter here. That has the effect of using the 'ADS server' smb.conf parameter, which is what we really want anyway */ -static NTSTATUS ads_resolve_dc(const char *server, - fstring remote_machine, +static NTSTATUS ads_resolve_dc(fstring remote_machine, struct in_addr *dest_ip) { ADS_STRUCT *ads; @@ -132,7 +131,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, NTSTATUS result; if (lp_security() == SEC_ADS) { - result = ads_resolve_dc(server, remote_machine, &dest_ip); + result = ads_resolve_dc(remote_machine, &dest_ip); } else { result = rpc_resolve_dc(server, remote_machine, &dest_ip); } @@ -366,7 +365,7 @@ static NTSTATUS domain_client_validate(TALLOC_CTX *mem_ctx, while (!NT_STATUS_IS_OK(nt_status) && next_token(&server,remote_machine,LIST_SEP,sizeof(remote_machine))) { - if(strequal(remote_machine, "*")) { + if(lp_security() != SEC_ADS && strequal(remote_machine, "*")) { nt_status = find_connect_pdc(&cli, domain, setup_creds_as, sec_chan, trust_passwd, last_change_time); } else { nt_status = connect_to_domain_password_server(&cli, remote_machine, setup_creds_as, sec_chan, trust_passwd); diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 638dc0b22e5..0be79673a00 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -148,6 +148,12 @@ ADS_STRUCT *ads_init(const char *realm, SAFE_FREE(ads->realm); } } + + if (!ads->realm && strchr_m(ads->workgroup, '.')) { + /* the smb.conf has specified the realm in 'workgroup =' */ + ads->realm = strdup(ads->workgroup); + } + if (!ads->bind_path && ads->realm) { ads->bind_path = ads_build_dn(ads->realm); } From 28f4463c8b6608dce02311ea7271fc983aa76d56 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 14:34:02 +0000 Subject: [PATCH 154/262] always include the (void) for void fns ... (This used to be commit deff1f96232b328fb5f5bb49a23eb4cda11fd330) --- source3/smbd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index f8d6f391d83..a2291eba08f 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -259,7 +259,7 @@ BOOL smbd_vfs_init(connection_struct *conn) /******************************************************************* Create vfs_ops reflecting current vfs_opaque_ops *******************************************************************/ -struct vfs_ops *smb_vfs_get_opaque_ops() +struct vfs_ops *smb_vfs_get_opaque_ops(void) { int i; struct vfs_ops *ops; From 9edc1cd4cfd3c02cfb1b867f8450384c446e8b60 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 15:03:14 +0000 Subject: [PATCH 155/262] this fixes plaintext passwords with win2000 there were 2 bugs: 1) we were sending a null challenge when we should have sent an empty challenge 2) the password can be in unicode if unicode is negotiated. This means our client code was wrong too :( (This used to be commit 1a6dfddf6788b30fc81794b1bfe749693183b2c1) --- source3/libsmb/cliconnect.c | 5 ++--- source3/smbd/negprot.c | 6 ++++-- source3/smbd/sesssetup.c | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index d29a6115fb1..93cf3d95db7 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -206,12 +206,11 @@ static BOOL cli_session_setup_plaintext(struct cli_state *cli, char *user, SSVAL(cli->outbuf,smb_vwv3,2); SSVAL(cli->outbuf,smb_vwv4,cli->pid); SIVAL(cli->outbuf,smb_vwv5,cli->sesskey); - SSVAL(cli->outbuf,smb_vwv7,passlen); SSVAL(cli->outbuf,smb_vwv8,0); SIVAL(cli->outbuf,smb_vwv11,capabilities); p = smb_buf(cli->outbuf); - memcpy(p, pword, passlen); - p += passlen; + p += clistr_push(cli, p, pword, -1, STR_TERMINATE); /* password */ + SSVAL(cli->outbuf,smb_vwv7,PTR_DIFF(p, smb_buf(cli->outbuf))); p += clistr_push(cli, p, user, -1, STR_TERMINATE); /* username */ p += clistr_push(cli, p, workgroup, -1, STR_TERMINATE); /* workgroup */ p += clistr_push(cli, p, "Unix", -1, STR_TERMINATE); diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index abe44aac8c5..d8aea624be3 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -288,10 +288,12 @@ static int reply_nt1(char *inbuf, char *outbuf) if (!negotiate_spnego) { /* Create a token value and add it to the outgoing packet. */ if (global_encrypted_passwords_negotiated) { + /* note that we do not send a challenge at all if + we are using plaintext */ get_challenge(p); + SSVALS(outbuf,smb_vwv16+1,8); + p += 8; } - SSVALS(outbuf,smb_vwv16+1,8); - p += 8; p += srvstr_push(outbuf, p, global_myworkgroup, -1, STR_UNICODE|STR_TERMINATE|STR_NOALIGN); DEBUG(3,("not using SPNEGO\n")); diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 867b00ff5cc..9d05e3f98a5 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -699,9 +699,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, lm_resp = data_blob(p, passlen1); nt_resp = data_blob(p+passlen1, passlen2); } else { - plaintext_password = data_blob(p, passlen1+1); - /* Ensure null termination */ - plaintext_password.data[passlen1] = 0; + pstring pass; + srvstr_pull_buf(inbuf, pass, smb_buf(inbuf), + sizeof(pass), STR_TERMINATE); + plaintext_password = data_blob(pass, strlen(pass)); } p += passlen1 + passlen2; From 55c978d85ea9b2fbd3eeb597d4b383399c5106a7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Jul 2002 15:34:10 +0000 Subject: [PATCH 156/262] net ads info now reports the IP of the LDAP server as well as its name - very useful in scripts (This used to be commit fc0d5479b575c1f495b9251413eed18ec1e37e02) --- source3/auth/auth_domain.c | 10 ++++++---- source3/include/ads.h | 1 + source3/libads/ads_struct.c | 6 ++++++ source3/utils/net_ads.c | 1 + 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index f74f1bb9e89..327d49144fd 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -46,6 +46,8 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, return NT_STATUS_NO_LOGON_SERVERS; } + DEBUG(4,("ads_resolve_dc: realm=%s\n", ads->realm)); + #ifdef HAVE_ADS /* a full ads_connect() is actually overkill, as we don't srictly need to do the SASL auth in order to get the info we need, but libads @@ -57,10 +59,10 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, fstrcpy(remote_machine, ads->ldap_server_name); strupper(remote_machine); - *dest_ip = *interpret_addr2(ads->ldap_server); + *dest_ip = ads->ldap_ip; ads_destroy(&ads); - if (!*remote_machine) { + if (!*remote_machine || is_zero_ip(*dest_ip)) { return NT_STATUS_NO_LOGON_SERVERS; } @@ -166,8 +168,8 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, return NT_STATUS_NO_LOGON_SERVERS; /* Attempt connection */ - result = cli_full_connection(cli, global_myname, server, - &dest_ip, 0, "IPC$", "IPC", "", "", "", 0); + result = cli_full_connection(cli, global_myname, remote_machine, + &dest_ip, 0, "IPC$", "IPC", "", "", ""); if (!NT_STATUS_IS_OK(result)) { release_server_mutex(); diff --git a/source3/include/ads.h b/source3/include/ads.h index b3e18f18b8d..78d2fcf4b52 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -17,6 +17,7 @@ typedef struct { char *password; char *user_name; char *server_realm; + struct in_addr ldap_ip; } ADS_STRUCT; typedef struct { diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index 0be79673a00..af0b5d41431 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -162,6 +162,7 @@ ADS_STRUCT *ads_init(const char *realm, ads->ldap_server = strdup(lp_ads_server()); } if (!ads->ldap_server || !ads->ldap_server[0]) { + SAFE_FREE(ads->ldap_server); ads->ldap_server = find_ldap_server(ads); } } @@ -170,6 +171,11 @@ ADS_STRUCT *ads_init(const char *realm, ads->kdc_server = ads->ldap_server? strdup(ads->ldap_server) : NULL; } + if (ads->ldap_server) { + /* its very useful knowing the IP of the ldap server */ + ads->ldap_ip = *interpret_addr2(ads->ldap_server); + } + return ads; } diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index fa3eac6bd39..a449395641b 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -67,6 +67,7 @@ static int net_ads_info(int argc, const char **argv) } d_printf("LDAP server: %s\n", ads->ldap_server); + d_printf("LDAP server IP: %s\n", inet_ntoa(ads->ldap_ip)); d_printf("LDAP server name: %s\n", ads->ldap_server_name); d_printf("Realm: %s\n", ads->realm); d_printf("Bind Path: %s\n", ads->bind_path); From 89d46eeb33c2d8e2b9b5a06ebe3a369675ae3657 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 30 Jul 2002 17:23:07 +0000 Subject: [PATCH 157/262] Add LSA RPC 0x2E, lsa_query_info2. Only level implemented is 0x0c, which is netbios and dns domain info. Also add code to set/fetch the domain GUID from secrets.tdb (although set is not yet called by anyone). (This used to be commit 31d7168530ccce2c5e9e7f96464b47f4d9771a25) --- source3/include/rpc_lsa.h | 38 +++++++++++ source3/include/secrets.h | 4 ++ source3/passdb/secrets.c | 32 ++++++++++ source3/rpc_parse/parse_lsa.c | 110 +++++++++++++++++++++++++++++++- source3/rpc_server/srv_lsa.c | 37 ++++++++++- source3/rpc_server/srv_lsa_nt.c | 97 +++++++++++++++++++++++++++- 6 files changed, 313 insertions(+), 5 deletions(-) diff --git a/source3/include/rpc_lsa.h b/source3/include/rpc_lsa.h index 8e42ac7d2cb..39f3e47dc85 100644 --- a/source3/include/rpc_lsa.h +++ b/source3/include/rpc_lsa.h @@ -73,6 +73,7 @@ #define LSA_RETRPRIVDATA 0x2b #define LSA_OPENPOLICY2 0x2c #define LSA_UNK_GET_CONNUSER 0x2d /* LsaGetConnectedCredentials ? */ +#define LSA_QUERYINFO2 0x2e /* XXXX these are here to get a compile! */ #define LSA_LOOKUPRIDS 0xFD @@ -261,6 +262,43 @@ typedef struct lsa_r_query_info } LSA_R_QUERY_INFO; +/* LSA_DNS_DOM_INFO - DNS domain info - info class 12*/ +typedef struct lsa_dns_dom_info +{ + UNIHDR hdr_nb_dom_name; /* netbios domain name */ + UNIHDR hdr_dns_dom_name; + UNIHDR hdr_forest_name; + + GUID dom_guid; /* domain GUID */ + + UNISTR2 uni_nb_dom_name; + UNISTR2 uni_dns_dom_name; + UNISTR2 uni_forest_name; + + uint32 ptr_dom_sid; + DOM_SID2 dom_sid; /* domain SID */ +} LSA_DNS_DOM_INFO; + +typedef union lsa_info2_union +{ + LSA_DNS_DOM_INFO dns_dom_info; +} LSA_INFO2_UNION; + +/* LSA_Q_QUERY_INFO2 - LSA query info */ +typedef struct lsa_q_query_info2 +{ + POLICY_HND pol; /* policy handle */ + uint16 info_class; /* info class */ +} LSA_Q_QUERY_INFO2; + +typedef struct lsa_r_query_info2 +{ + uint32 ptr; /* pointer to info struct */ + uint16 info_class; + LSA_INFO2_UNION info; /* so far the only one */ + NTSTATUS status; +} LSA_R_QUERY_INFO2; + /* LSA_Q_ENUM_TRUST_DOM - LSA enumerate trusted domains */ typedef struct lsa_enum_trust_dom_info { diff --git a/source3/include/secrets.h b/source3/include/secrets.h index 8a5a573bcc0..183b29d7a8a 100644 --- a/source3/include/secrets.h +++ b/source3/include/secrets.h @@ -35,6 +35,10 @@ #define SECRETS_DOMAIN_SID "SECRETS/SID" #define SECRETS_SAM_SID "SAM/SID" +/* The domain GUID and server GUID (NOT the same) are also not secret */ +#define SECRETS_DOMAIN_GUID "SECRETS/DOMGUID" +#define SECRETS_SERVER_GUID "SECRETS/GUID" + #define SECRETS_LDAP_BIND_PW "SECRETS/LDAP_BIND_PW" /* Authenticated user info is stored in secrets.tdb under these keys */ diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index f9676825740..e06452d398e 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -128,6 +128,38 @@ BOOL secrets_fetch_domain_sid(char *domain, DOM_SID *sid) return True; } +BOOL secrets_store_domain_guid(char *domain, GUID *guid) +{ + fstring key; + + slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); + strupper(key); + return secrets_store(key, guid, sizeof(GUID)); +} + +BOOL secrets_fetch_domain_guid(char *domain, GUID *guid) +{ + GUID *dyn_guid; + fstring key; + size_t size; + + slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); + strupper(key); + dyn_guid = (GUID *)secrets_fetch(key, &size); + + if (dyn_guid == NULL) + return False; + + if (size != sizeof(GUID)) + { + SAFE_FREE(dyn_guid); + return False; + } + + *guid = *dyn_guid; + SAFE_FREE(dyn_guid); + return True; +} /** * Form a key for fetching the machine trust account password diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index a6aecb79672..d0536dab013 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -3,8 +3,9 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Andrew Bartlett 2002. + * Copyright (C) Paul Ashton 1997, + * Copyright (C) Andrew Bartlett 2002, + * Copyright (C) Jim McDonough 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2117,3 +2118,108 @@ BOOL policy_handle_is_valid(const POLICY_HND *hnd) ZERO_STRUCT(zero_pol); return ((memcmp(&zero_pol, hnd, sizeof(POLICY_HND)) == 0) ? False : True ); } + +/******************************************************************* + Reads or writes an LSA_DNS_DOM_INFO structure. +********************************************************************/ + +BOOL lsa_io_dns_dom_info(char *desc, LSA_DNS_DOM_INFO *info, + prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_dns_dom_info"); + depth++; + + if(!prs_align(ps)) + return False; + if(!smb_io_unihdr("nb_name", &info->hdr_nb_dom_name, ps, depth)) + return False; + if(!smb_io_unihdr("dns_name", &info->hdr_dns_dom_name, ps, depth)) + return False; + if(!smb_io_unihdr("forest", &info->hdr_forest_name, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + if (!prs_uint8s(False, "dom_guid", ps, depth, info->dom_guid.info, GUID_SIZE)) + return False; + + if(!prs_align(ps)) + return False; + if(!prs_uint32("dom_sid", ps, depth, &info->ptr_dom_sid)) + return False; + + if(!smb_io_unistr2("nb_name", &info->uni_nb_dom_name, + info->hdr_nb_dom_name.buffer, ps, depth)) + return False; + if(!smb_io_unistr2("dns_name", &info->uni_dns_dom_name, + info->hdr_dns_dom_name.buffer, ps, depth)) + return False; + if(!smb_io_unistr2("forest", &info->uni_forest_name, + info->hdr_forest_name.buffer, ps, depth)) + return False; + + if(!smb_io_dom_sid2("dom_sid", &info->dom_sid, ps, depth)) + return False; + + return True; + +} + +/******************************************************************* + Reads or writes an LSA_Q_QUERY_DNSDOMINFO structure. +********************************************************************/ + +BOOL lsa_io_q_query_info2(char *desc, LSA_Q_QUERY_INFO2 *q_c, + prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_q_query_info2"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("pol", &q_c->pol, ps, depth)) + return False; + + if(!prs_uint16("info_class", ps, depth, &q_c->info_class)) + return False; + + return True; +} + +/******************************************************************* + Reads or writes an LSA_R_QUERY_DNSDOMINFO structure. +********************************************************************/ + +BOOL lsa_io_r_query_info2(char *desc, LSA_R_QUERY_INFO2 *r_c, + prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "lsa_io_r_query_info2"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr", ps, depth, &r_c->ptr)) + return False; + if(!prs_uint16("info_class", ps, depth, &r_c->info_class)) + return False; + switch(r_c->info_class) { + case 0x000c: + if (!lsa_io_dns_dom_info("info12", &r_c->info.dns_dom_info, + ps, depth)) + return False; + break; + default: + DEBUG(0,("lsa_io_r_query_info2: unknown info class %d\n", + r_c->info_class)); + return False; + } + + if(!prs_align(ps)) + return False; + if(!prs_ntstatus("status", ps, depth, &r_c->status)) + return False; + + return True; +} diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index e5a4d3b46d5..e3495576c99 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -3,8 +3,9 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Jeremy Allison 2001. + * Copyright (C) Paul Ashton 1997, + * Copyright (C) Jeremy Allison 2001, + * Copyright (C) Jim McDonough 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -609,6 +610,37 @@ static BOOL api_lsa_query_secobj(pipes_struct *p) return True; } +/*************************************************************************** + api_lsa_query_dnsdomainfo + ***************************************************************************/ + +static BOOL api_lsa_query_info2(pipes_struct *p) +{ + LSA_Q_QUERY_INFO2 q_u; + LSA_R_QUERY_INFO2 r_u; + + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if(!lsa_io_q_query_info2("", &q_u, data, 0)) { + DEBUG(0,("api_lsa_query_info2: failed to unmarshall LSA_Q_QUERY_INFO2.\n")); + return False; + } + + r_u.status = _lsa_query_info2(p, &q_u, &r_u); + + if (!lsa_io_r_query_info2("", &r_u, rdata, 0)) { + DEBUG(0,("api_lsa_query_info2: failed to marshall LSA_R_QUERY_INFO2.\n")); + return False; + } + + return True; +} + + /*************************************************************************** \PIPE\ntlsa commands ***************************************************************************/ @@ -634,6 +666,7 @@ static struct api_struct api_lsa_cmds[] = { "LSA_ADDPRIVS" , LSA_ADDPRIVS , api_lsa_addprivs }, { "LSA_REMOVEPRIVS" , LSA_REMOVEPRIVS , api_lsa_removeprivs }, { "LSA_QUERYSECOBJ" , LSA_QUERYSECOBJ , api_lsa_query_secobj }, + { "LSA_QUERYINFO2" , LSA_QUERYINFO2 , api_lsa_query_info2 }, { NULL , 0 , NULL } }; diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index d072061a5f6..f28441886a5 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -5,7 +5,8 @@ * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, * Copyright (C) Paul Ashton 1997, * Copyright (C) Jeremy Allison 2001, - * Copyright (C) Rafal Szczesniak 2002. + * Copyright (C) Rafal Szczesniak 2002, + * Copyright (C) Jim McDonough 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -341,6 +342,48 @@ static NTSTATUS lsa_get_generic_sd(TALLOC_CTX *mem_ctx, SEC_DESC **sd, size_t *s return NT_STATUS_OK; } +/*************************************************************************** + init_dns_dom_info. + ***************************************************************************/ +static void init_dns_dom_info(LSA_DNS_DOM_INFO *r_l, char *nb_name, + char *dns_name, char *forest_name, + GUID *dom_guid, DOM_SID *dom_sid) +{ + if (nb_name && *nb_name) { + init_uni_hdr(&r_l->hdr_nb_dom_name, strlen(nb_name)); + init_unistr2(&r_l->uni_nb_dom_name, nb_name, + strlen(nb_name)); + r_l->hdr_nb_dom_name.uni_max_len += 2; + r_l->uni_nb_dom_name.uni_max_len += 1; + } + + if (dns_name && *dns_name) { + init_uni_hdr(&r_l->hdr_dns_dom_name, strlen(dns_name)); + init_unistr2(&r_l->uni_dns_dom_name, dns_name, + strlen(dns_name)); + r_l->hdr_dns_dom_name.uni_max_len += 2; + r_l->uni_dns_dom_name.uni_max_len += 1; + } + + if (forest_name && *forest_name) { + init_uni_hdr(&r_l->hdr_forest_name, strlen(forest_name)); + init_unistr2(&r_l->uni_forest_name, forest_name, + strlen(forest_name)); + r_l->hdr_forest_name.uni_max_len += 2; + r_l->uni_forest_name.uni_max_len += 1; + } + + /* how do we init the guid ? probably should write an init fn */ + if (dom_guid) { + memcpy(&r_l->dom_guid, dom_guid, sizeof(GUID)); + } + + if (dom_sid) { + r_l->ptr_dom_sid = 1; + init_dom_sid2(&r_l->dom_sid, dom_sid); + } +} + /*************************************************************************** _lsa_open_policy2. ***************************************************************************/ @@ -1166,3 +1209,55 @@ NTSTATUS _lsa_query_secobj(pipes_struct *p, LSA_Q_QUERY_SEC_OBJ *q_u, LSA_R_QUER } +NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_INFO2 *r_u) +{ + struct lsa_info *handle; + char *nb_name = NULL; + char *dns_name = NULL; + char *forest_name = NULL; + DOM_SID *sid = NULL; + GUID guid; + + ZERO_STRUCT(guid); + r_u->status = NT_STATUS_OK; + + if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle)) + return NT_STATUS_INVALID_HANDLE; + + switch (q_u->info_class) { + case 0x0c: + /* check if the user have enough rights */ + if (!(handle->access & POLICY_VIEW_LOCAL_INFORMATION)) + return NT_STATUS_ACCESS_DENIED; + + /* Request PolicyPrimaryDomainInformation. */ + switch (lp_server_role()) { + case ROLE_DOMAIN_PDC: + case ROLE_DOMAIN_BDC: + nb_name = global_myworkgroup; + /* ugly temp hack for these next two */ + dns_name = lp_realm(); + forest_name = lp_realm(); + sid = get_global_sam_sid(); + secrets_fetch_domain_guid(global_myworkgroup, + &guid); + break; + default: + return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; + } + init_dns_dom_info(&r_u->info.dns_dom_info, nb_name, dns_name, + forest_name,&guid,sid); + break; + default: + DEBUG(0,("_lsa_query_info2: unknown info level in Lsa Query: %d\n", q_u->info_class)); + r_u->status = NT_STATUS_INVALID_INFO_CLASS; + break; + } + + if (NT_STATUS_IS_OK(r_u->status)) { + r_u->ptr = 0x1; + r_u->info_class = q_u->info_class; + } + + return r_u->status; +} From d0fe79b9ee16afae0bf7d306b7916d7aef0f59c8 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 30 Jul 2002 17:38:27 +0000 Subject: [PATCH 158/262] Fix the build for now.. Tridge, please look at this. Did you mean to take out the last parm? (This used to be commit f70886df942e8b37fecb503b2d87f39f19c9bdab) --- source3/auth/auth_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 327d49144fd..72c216581ef 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -169,7 +169,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, /* Attempt connection */ result = cli_full_connection(cli, global_myname, remote_machine, - &dest_ip, 0, "IPC$", "IPC", "", "", ""); + &dest_ip, 0, "IPC$", "IPC", "", "", "",0); if (!NT_STATUS_IS_OK(result)) { release_server_mutex(); From 533839e75ef37e91adc3d3554825720caacc5117 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Wed, 31 Jul 2002 01:02:03 +0000 Subject: [PATCH 159/262] Remove VFS module build so RPMs can build for now. (This used to be commit 0c1e759cd3ee70f509fe7ccd30f986f24ad20464) --- packaging/Caldera/OpenLinux/samba3.spec.tmpl | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packaging/Caldera/OpenLinux/samba3.spec.tmpl b/packaging/Caldera/OpenLinux/samba3.spec.tmpl index 23ebcd879ec..701dd350734 100644 --- a/packaging/Caldera/OpenLinux/samba3.spec.tmpl +++ b/packaging/Caldera/OpenLinux/samba3.spec.tmpl @@ -254,15 +254,15 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ make all nsswitch/libnss_wins.so nsswitch/libnss_winbind.so torture nsswitch/pam_winbind.so everything (cd tdb; make tdbdump tdbtest tdbtorture tdbtool) -cd ../examples/VFS -CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ - --prefix='$(DESTDIR)/usr' \ - --localstatedir='$(DESTDIR)/var' \ - --libdir='$(DESTDIR)%{EtcSamba}' \ - --sbindir='$(DESTDIR)/usr/sbin' -make -cd block -make +#cd ../examples/VFS +#CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \ +# --prefix='$(DESTDIR)/usr' \ +# --localstatedir='$(DESTDIR)/var' \ +# --libdir='$(DESTDIR)%{EtcSamba}' \ +# --sbindir='$(DESTDIR)/usr/sbin' +#make +#cd block +#make %Install %{mkDESTDIR} @@ -305,10 +305,10 @@ do install -m 755 source/tdb/$i $DESTDIR/usr/sbin done # Add VFS Modules -for i in audit.so recycle.so block/block.so -do - install -m755 $i $DESTDIR/lib/samba -done +#for i in audit.so recycle.so block/block.so +#do +# install -m755 $i $DESTDIR/lib/samba +#done #mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/sbin From a5b6fbdf6086d0cf7772a2abde80a66739f26d11 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 01:44:37 +0000 Subject: [PATCH 160/262] make sure that 'net ads info' gives info on the server we specify, not our smb.conf setup. (This used to be commit cffa881092e48db10a712575a8671f695e8ef813) --- source3/utils/net_ads.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index a449395641b..ef4de3d76f9 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -59,6 +59,10 @@ static int net_ads_info(int argc, const char **argv) ADS_STRUCT *ads; ads = ads_init(NULL, NULL, opt_host, NULL, NULL); + + /* we want this servers realm, not our realm */ + SAFE_FREE(ads->realm); + ads_connect(ads); if (!ads) { From 81b69dc79cccd575d33b62ddf7941c5b3c44fdfe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 02:00:30 +0000 Subject: [PATCH 161/262] the ads_connect() here doesn't need to actually succeed, as its only needed to find the DC IP. Just don't check its return value! (This used to be commit ab144cd8af1622894d446ce48dde99babeb30bd6) --- source3/auth/auth_domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 72c216581ef..b37ce2cc91e 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -52,9 +52,7 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, /* a full ads_connect() is actually overkill, as we don't srictly need to do the SASL auth in order to get the info we need, but libads doesn't offer a better way right now */ - if (!ADS_ERR_OK(ads_connect(ads))) { - return NT_STATUS_NO_LOGON_SERVERS; - } + ads_connect(ads); #endif fstrcpy(remote_machine, ads->ldap_server_name); From 4516a14dbbc03f2ae2ce3c4d4e22e11e24a8a42f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 04:56:16 +0000 Subject: [PATCH 162/262] added support for smbd listening on port 445 and 139. It now listens on both by default, and you can specify a list of ports to listen on either with "smb ports = " in smb.conf or using the -p option to smbd. this is needed for proper netbiosless operation. (This used to be commit 5dee0a7b5e0fcb298a9d36661c80e60d8b9bcc3a) --- source3/include/smb.h | 4 +- source3/lib/util_sock.c | 2 +- source3/param/loadparm.c | 4 ++ source3/smbd/server.c | 123 +++++++++++++++++++++++++-------------- 4 files changed, 87 insertions(+), 46 deletions(-) diff --git a/source3/include/smb.h b/source3/include/smb.h index 2911a991f2e..263dd67c548 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -38,7 +38,9 @@ #define NMB_PORT 137 #define DGRAM_PORT 138 -#define SMB_PORT 139 +#define SMB_PORT1 445 +#define SMB_PORT2 139 +#define SMB_PORTS "445 139" #define False (0) #define True (1) diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 4f1f2a1470a..5e2b7c5ed97 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -708,7 +708,7 @@ int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL reb /* now we've got a socket - we need to bind it */ if( bind( res, (struct sockaddr *)&sock, sizeof(sock) ) == -1 ) { - if( DEBUGLVL(dlevel) && (port == SMB_PORT || port == NMB_PORT) ) { + if( DEBUGLVL(dlevel) && (port == SMB_PORT1 || port == SMB_PORT2 || port == NMB_PORT) ) { dbgtext( "bind failed on port %d ", port ); dbgtext( "socket_addr = %s.\n", inet_ntoa( sock.sin_addr ) ); dbgtext( "Error = %s\n", strerror(errno) ); diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0cb9a48622b..d329d7c0ce2 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -87,6 +87,7 @@ static BOOL defaults_saved = False; */ typedef struct { + char *smb_ports; char *dos_charset; char *unix_charset; char *display_charset; @@ -778,6 +779,7 @@ static struct parm_struct parm_table[] = { {"Protocol Options", P_SEP, P_SEPARATOR}, + {"smb ports", P_STRING, P_GLOBAL, &Globals.smb_ports, NULL, NULL, 0}, {"protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, {"large readwrite", P_BOOL, P_GLOBAL, &Globals.bLargeReadwrite, NULL, NULL, 0}, {"max protocol", P_ENUM, P_GLOBAL, &Globals.maxprotocol, NULL, enum_protocol, 0}, @@ -1369,6 +1371,7 @@ static void init_globals(void) Globals.bUseSpnego = True; + string_set(&Globals.smb_ports, SMB_PORTS); } static TALLOC_CTX *lp_talloc; @@ -1457,6 +1460,7 @@ static char *lp_string(const char *s) #define FN_LOCAL_INTEGER(fn_name,val) \ int fn_name(int i) {return(LP_SNUM_OK(i)? ServicePtrs[(i)]->val : sDefault.val);} +FN_GLOBAL_STRING(lp_smb_ports, &Globals.smb_ports) FN_GLOBAL_STRING(lp_dos_charset, &Globals.dos_charset) FN_GLOBAL_STRING(lp_unix_charset, &Globals.unix_charset) FN_GLOBAL_STRING(lp_display_charset, &Globals.display_charset) diff --git a/source3/smbd/server.c b/source3/smbd/server.c index fdc59f12c09..1eef3d98e8f 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -151,13 +151,15 @@ static void msg_exit_server(int msg_type, pid_t src, void *buf, size_t len) Open the socket communication. ****************************************************************************/ -static BOOL open_sockets_smbd(BOOL is_daemon,int port) +static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports) { int num_interfaces = iface_count(); + int num_sockets = 0; int fd_listenset[FD_SETSIZE]; fd_set listen_set; int s; int i; + char *ports; if (!is_daemon) { return open_sockets_inetd(); @@ -176,73 +178,106 @@ static BOOL open_sockets_smbd(BOOL is_daemon,int port) /* Stop zombies */ CatchChild(); - - + FD_ZERO(&listen_set); - if(lp_interfaces() && lp_bind_interfaces_only()) { + /* use a reasonable default set of ports - listing on 445 and 139 */ + if (!smb_ports) { + ports = lp_smb_ports(); + if (!ports || !*ports) { + ports = SMB_PORTS; + } + ports = strdup(ports); + } else { + ports = strdup(smb_ports); + } + + if (lp_interfaces() && lp_bind_interfaces_only()) { /* We have been given an interfaces line, and been told to only bind to those interfaces. Create a socket per interface and bind to only these. */ - if(num_interfaces > FD_SETSIZE) { - DEBUG(0,("open_sockets_smbd: Too many interfaces specified to bind to. Number was %d \ -max can be %d\n", - num_interfaces, FD_SETSIZE)); - return False; - } - /* Now open a listen socket for each of the interfaces. */ for(i = 0; i < num_interfaces; i++) { struct in_addr *ifip = iface_n_ip(i); - + fstring tok; + char *ptr; + if(ifip == NULL) { DEBUG(0,("open_sockets_smbd: interface %d has NULL IP address !\n", i)); continue; } - s = fd_listenset[i] = open_socket_in(SOCK_STREAM, port, 0, ifip->s_addr, True); - if(s == -1) - return False; - /* ready to listen */ - set_socket_options(s,"SO_KEEPALIVE"); - set_socket_options(s,user_socket_options); + for (ptr=ports; next_token(&ptr, tok, NULL, sizeof(tok)); ) { + unsigned port = atoi(tok); + if (port == 0) continue; + s = fd_listenset[num_sockets] = open_socket_in(SOCK_STREAM, port, 0, ifip->s_addr, True); + if(s == -1) + return False; + + /* ready to listen */ + set_socket_options(s,"SO_KEEPALIVE"); + set_socket_options(s,user_socket_options); - if (listen(s, 5) == -1) { - DEBUG(0,("listen: %s\n",strerror(errno))); - close(s); - return False; + if (listen(s, 5) == -1) { + DEBUG(0,("listen: %s\n",strerror(errno))); + close(s); + return False; + } + FD_SET(s,&listen_set); + + num_sockets++; + if (num_sockets >= FD_SETSIZE) { + DEBUG(0,("open_sockets_smbd: Too many sockets to bind to\n")); + return False; + } } - FD_SET(s,&listen_set); } } else { /* Just bind to 0.0.0.0 - accept connections from anywhere. */ + + fstring tok; + char *ptr; + num_interfaces = 1; - /* open an incoming socket */ - s = open_socket_in(SOCK_STREAM, port, 0, - interpret_addr(lp_socket_address()),True); - if (s == -1) - return(False); + for (ptr=ports; next_token(&ptr, tok, NULL, sizeof(tok)); ) { + unsigned port = atoi(tok); + if (port == 0) continue; + /* open an incoming socket */ + s = open_socket_in(SOCK_STREAM, port, 0, + interpret_addr(lp_socket_address()),True); + if (s == -1) + return(False); - /* ready to listen */ - set_socket_options(s,"SO_KEEPALIVE"); - set_socket_options(s,user_socket_options); + /* ready to listen */ + set_socket_options(s,"SO_KEEPALIVE"); + set_socket_options(s,user_socket_options); + + if (listen(s, 5) == -1) { + DEBUG(0,("open_sockets_smbd: listen: %s\n", + strerror(errno))); + close(s); + return False; + } - if (listen(s, 5) == -1) { - DEBUG(0,("open_sockets_smbd: listen: %s\n", - strerror(errno))); - close(s); - return False; + fd_listenset[num_sockets] = s; + FD_SET(s,&listen_set); + + num_sockets++; + + if (num_sockets >= FD_SETSIZE) { + DEBUG(0,("open_sockets_smbd: Too many sockets to bind to\n")); + return False; + } } - - fd_listenset[0] = s; - FD_SET(s,&listen_set); } + SAFE_FREE(ports); + /* Listen to messages */ message_register(MSG_SMB_SAM_SYNC, msg_sam_sync); @@ -293,7 +328,7 @@ max can be %d\n", socklen_t in_addrlen = sizeof(addr); s = -1; - for(i = 0; i < num_interfaces; i++) { + for(i = 0; i < num_sockets; i++) { if(FD_ISSET(fd_listenset[i],&lfds)) { s = fd_listenset[i]; /* Clear this so we don't look @@ -318,7 +353,7 @@ max can be %d\n", /* Child code ... */ /* close the listening socket(s) */ - for(i = 0; i < num_interfaces; i++) + for(i = 0; i < num_sockets; i++) close(fd_listenset[i]); /* close our standard file @@ -609,7 +644,7 @@ static void usage(char *pname) BOOL is_daemon = False; BOOL interactive = False; BOOL specified_logfile = False; - int port = SMB_PORT; + char *ports = NULL; int opt; pstring logfile; @@ -664,7 +699,7 @@ static void usage(char *pname) break; case 'p': - port = atoi(optarg); + ports = optarg; break; case 'h': @@ -837,7 +872,7 @@ static void usage(char *pname) start_background_queue(); */ - if (!open_sockets_smbd(is_daemon,port)) + if (!open_sockets_smbd(is_daemon,ports)) exit(1); /* From ce344ad4b7b5eef057364dfdde4ee2764d210e39 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 05:38:53 +0000 Subject: [PATCH 163/262] fixed a net crash bug if we can't find a DC in a 'net rpc' command (This used to be commit ced5dc4e05badfb07cbae7a2880825b9bad4e68d) --- source3/utils/net_rpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index a13a8c5e22a..9b3248cf633 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -132,6 +132,10 @@ static int run_rpc_command(struct cli_state *cli_arg, const char *pipe_name, int else cli = cli_arg; + if (!cli) { + return -1; + } + domain_sid = net_get_remote_domain_sid(cli); /* Create mem_ctx */ From dcff12797e3e27abd378c9a7e7c0d036860a86ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 05:41:51 +0000 Subject: [PATCH 164/262] added 'disable netbios = yes/no' option, default is no When this option is disabled we should not do *any* netbios operations. You should also not start nmbd at all. I have put initial checks in at the major points we do netbios operations in smbd but there are bound to be more needed. Right now I've disabled all netbios name queries, all WINS lookups and node status queries in smbd and winbindd. I've been testing this option and the most noticable thing is how much more responsive things are! wthout those damn netbios timeouts things certainly are much slicker. (This used to be commit 12e7953bf2497eeb7c0bc6585d9fe58b3aabc240) --- source3/libsmb/namequery.c | 33 +++++++++++++++++++++++++++++++-- source3/param/loadparm.c | 3 +++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index e2ddfd82809..ae58c3a0629 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -170,6 +170,11 @@ BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr t int sock; BOOL result = False; + if (lp_disable_netbios()) { + DEBUG(5,("name_status_find(%s#%02x): netbios is disabled\n", q_name, q_type)); + return False; + } + DEBUG(10, ("name_status_find: looking up %s#%02x at %s\n", q_name, q_type, inet_ntoa(to_ip))); @@ -273,6 +278,11 @@ struct in_addr *name_query(int fd,const char *name,int name_type, struct nmb_packet *nmb = &p.packet.nmb; struct in_addr *ip_list = NULL; + if (lp_disable_netbios()) { + DEBUG(5,("name_query(%s#%02x): netbios is disabled\n", name, name_type)); + return NULL; + } + if (timed_out) { *timed_out = False; } @@ -556,6 +566,11 @@ BOOL name_resolve_bcast(const char *name, int name_type, int sock, i; int num_interfaces = iface_count(); + if (lp_disable_netbios()) { + DEBUG(5,("name_resolve_bcast(%s#%02x): netbios is disabled\n", name, name_type)); + return False; + } + *return_ip_list = NULL; *return_count = 0; @@ -602,6 +617,11 @@ BOOL resolve_wins(const char *name, int name_type, char **wins_tags; struct in_addr src_ip; + if (lp_disable_netbios()) { + DEBUG(5,("resolve_wins(%s#%02x): netbios is disabled\n", name, name_type)); + return False; + } + *return_iplist = NULL; *return_count = 0; @@ -935,6 +955,11 @@ BOOL find_master_ip(const char *group, struct in_addr *master_ip) struct in_addr *ip_list = NULL; int count = 0; + if (lp_disable_netbios()) { + DEBUG(5,("find_master_ip(%s): netbios is disabled\n", group)); + return False; + } + if (internal_resolve_name(group, 0x1D, &ip_list, &count)) { *master_ip = ip_list[0]; SAFE_FREE(ip_list); @@ -957,10 +982,14 @@ BOOL find_master_ip(const char *group, struct in_addr *master_ip) BOOL lookup_dc_name(const char *srcname, const char *domain, struct in_addr *dc_ip, char *ret_name) { -#if !defined(I_HATE_WINDOWS_REPLY_CODE) - +#if !defined(I_HATE_WINDOWS_REPLY_CODE) fstring dc_name; BOOL ret; + + if (lp_disable_netbios()) { + DEBUG(5,("lookup_dc_name(%s): netbios is disabled\n", domain)); + return False; + } /* * Due to the fact win WinNT *sucks* we must do a node status diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index d329d7c0ce2..40f59076dae 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -257,6 +257,7 @@ typedef struct BOOL bHostnameLookups; BOOL bUseSpnego; BOOL bUnixExtensions; + BOOL bDisableNetbios; int restrict_anonymous; } global; @@ -788,6 +789,7 @@ static struct parm_struct parm_table[] = { {"read bmpx", P_BOOL, P_GLOBAL, &Globals.bReadbmpx, NULL, NULL, 0}, {"read raw", P_BOOL, P_GLOBAL, &Globals.bReadRaw, NULL, NULL, 0}, {"write raw", P_BOOL, P_GLOBAL, &Globals.bWriteRaw, NULL, NULL, 0}, + {"disable netbios", P_BOOL, P_GLOBAL, &Globals.bDisableNetbios, NULL, NULL, 0}, {"nt pipe support", P_BOOL, P_GLOBAL, &Globals.bNTPipeSupport, NULL, NULL, 0}, {"nt acl support", P_BOOL, P_LOCAL, &sDefault.bNTAclSupport, NULL, NULL, FLAG_GLOBAL | FLAG_SHARE }, @@ -1543,6 +1545,7 @@ FN_GLOBAL_STRING(lp_add_share_cmd, &Globals.szAddShareCommand) FN_GLOBAL_STRING(lp_change_share_cmd, &Globals.szChangeShareCommand) FN_GLOBAL_STRING(lp_delete_share_cmd, &Globals.szDeleteShareCommand) +FN_GLOBAL_BOOL(lp_disable_netbios, &Globals.bDisableNetbios) FN_GLOBAL_BOOL(lp_ms_add_printer_wizard, &Globals.bMsAddPrinterWizard) FN_GLOBAL_BOOL(lp_dns_proxy, &Globals.bDNSproxy) FN_GLOBAL_BOOL(lp_wins_support, &Globals.bWINSsupport) From ab0b4e6f581d583c8572a6ba351536eacc240db1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 09:32:45 +0000 Subject: [PATCH 165/262] make sure we zero the unusued elements in a SID when parsing (This used to be commit aa5beb63f1b1133c4ad28118ddd33e21198d79bb) --- source3/lib/util_sid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 5dd1d75c701..ad09f912346 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -365,6 +365,9 @@ BOOL sid_parse(char *inbuf, size_t len, DOM_SID *sid) { int i; if (len < 8) return False; + + ZERO_STRUCTP(sid); + sid->sid_rev_num = CVAL(inbuf, 0); sid->num_auths = CVAL(inbuf, 1); memcpy(sid->id_auth, inbuf+2, 6); From 76fb289cd8adef41bb6df38605ef9efcf39ac77d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 09:34:00 +0000 Subject: [PATCH 166/262] fixed multi-line strings for portability (This used to be commit 9f9e0cbd2c9920b730286f8bf560dc3415c29aa6) --- source3/passdb/secrets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index e06452d398e..943fa4713b2 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -515,7 +515,7 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num (*domains)[idx - start_idx] = dom; - DEBUG(18, ("Secret record is in required range.\n + DEBUG(18, ("Secret record is in required range.\n \ start_idx = %d, max_num_domains = %d. Added to returned array.\n", start_idx, max_num_domains)); @@ -531,7 +531,7 @@ NTSTATUS secrets_get_trusted_domains(TALLOC_CTX* ctx, int* enum_ctx, int max_num status = NT_STATUS_OK; } } else { - DEBUG(18, ("Secret is outside the required range.\n + DEBUG(18, ("Secret is outside the required range.\n \ start_idx = %d, max_num_domains = %d. Not added to returned array\n", start_idx, max_num_domains)); } From d7f77b5a65362cb2c8d6e9fa15787967be558121 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 09:36:05 +0000 Subject: [PATCH 167/262] support netbiosless search for the DC using ADS in the winbindd AUTH code. (This used to be commit 3929532e3bfb98b925d73d331c8cbb319fdc8b9a) --- source3/nsswitch/winbindd_cm.c | 170 +++++++++++++++++++++------------ 1 file changed, 111 insertions(+), 59 deletions(-) diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 02162bbd23f..3175860a79a 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -90,12 +90,113 @@ struct get_dc_name_cache { struct get_dc_name_cache *prev, *next; }; + +/* + find the DC for a domain using methods appropriate for a ADS domain +*/ +static BOOL cm_ads_find_dc(const char *domain, struct in_addr *dc_ip, fstring srv_name) +{ + ADS_STRUCT *ads; + ads = ads_init_simple(); + if (!ads) { + return False; + } + + DEBUG(4,("cm_ads_find_dc: realm=%s\n", ads->realm)); + +#ifdef HAVE_ADS + /* a full ads_connect() is actually overkill, as we don't srictly need + to do the SASL auth in order to get the info we need, but libads + doesn't offer a better way right now */ + ads_connect(ads); +#endif + + fstrcpy(srv_name, ads->ldap_server_name); + strupper(srv_name); + *dc_ip = ads->ldap_ip; + ads_destroy(&ads); + + if (!*srv_name || is_zero_ip(*dc_ip)) { + return False; + } + + DEBUG(4,("cm_ads_find_dc: using server='%s' IP=%s\n", + srv_name, inet_ntoa(*dc_ip))); + + return True; +} + +/* + find the DC for a domain using methods appropriate for a RPC domain +*/ +static BOOL cm_rpc_find_dc(const char *domain, struct in_addr *dc_ip, fstring srv_name) +{ + struct in_addr *ip_list = NULL; + int count, i; + + /* Lookup domain controller name. Try the real PDC first to avoid + SAM sync delays */ + if (!get_dc_list(True, domain, &ip_list, &count)) { + if (!get_dc_list(False, domain, &ip_list, &count)) { + DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); + return False; + } + } + + /* Pick a nice close server */ + /* Look for DC on local net */ + for (i = 0; i < count; i++) { + if (!is_local_net(ip_list[i])) + continue; + + if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { + *dc_ip = ip_list[i]; + SAFE_FREE(ip_list); + return True; + } + zero_ip(&ip_list[i]); + } + + /* + * Secondly try and contact a random PDC/BDC. + */ + + i = (sys_random() % count); + + if (!is_zero_ip(ip_list[i]) && + name_status_find(domain, 0x1c, 0x20, + ip_list[i], srv_name)) { + *dc_ip = ip_list[i]; + SAFE_FREE(ip_list); + return True; + } + zero_ip(&ip_list[i]); /* Tried and failed. */ + + /* Finally return first DC that we can contact using a node + status */ + for (i = 0; i < count; i++) { + if (is_zero_ip(ip_list[i])) + continue; + + if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { + *dc_ip = ip_list[i]; + SAFE_FREE(ip_list); + return True; + } + } + + SAFE_FREE(ip_list); + + return False; +} + + static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out) { static struct get_dc_name_cache *get_dc_name_cache; struct get_dc_name_cache *dcc; - struct in_addr *ip_list, dc_ip; - int count, i; + struct in_addr dc_ip; + BOOL ret; /* Check the cache for previous lookups */ @@ -144,66 +245,19 @@ static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr DLIST_ADD(get_dc_name_cache, dcc); - /* Lookup domain controller name. Try the real PDC first to avoid - SAM sync delays */ - if (!get_dc_list(True, domain, &ip_list, &count)) { - if (!get_dc_list(False, domain, &ip_list, &count)) { - DEBUG(3, ("Could not look up dc's for domain %s\n", domain)); - return False; - } + zero_ip(&dc_ip); + + if (lp_security() == SEC_ADS) { + ret = cm_ads_find_dc(domain, &dc_ip, srv_name); + } else { + ret = cm_rpc_find_dc(domain, &dc_ip, srv_name); } - /* Pick a nice close server */ - /* Look for DC on local net */ - - for (i = 0; i < count; i++) { - if (!is_local_net(ip_list[i])) - continue; - - if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { - dc_ip = ip_list[i]; - goto done; - } - zero_ip(&ip_list[i]); + if (!ret) { + return False; } - /* - * Secondly try and contact a random PDC/BDC. - */ - - i = (sys_random() % count); - - if (!is_zero_ip(ip_list[i]) && - name_status_find(domain, 0x1c, 0x20, - ip_list[i], srv_name)) { - dc_ip = ip_list[i]; - goto done; - } - zero_ip(&ip_list[i]); /* Tried and failed. */ - - /* Finally return first DC that we can contact */ - - for (i = 0; i < count; i++) { - if (is_zero_ip(ip_list[i])) - continue; - - if (name_status_find(domain, 0x1c, 0x20, ip_list[i], srv_name)) { - dc_ip = ip_list[i]; - goto done; - } - } - - /* No-one to talk to )-: */ - return False; /* Boo-hoo */ - - done: - /* We have the netbios name and IP address of a domain controller. - Ideally we should sent a SAMLOGON request to determine whether - the DC is alive and kicking. If we can catch a dead DC before - performing a cli_connect() we can avoid a 30-second timeout. */ - /* We have a name so make the cache entry positive now */ - fstrcpy(dcc->srv_name, srv_name); DEBUG(3, ("cm_get_dc_name: Returning DC %s (%s) for domain %s\n", srv_name, @@ -211,8 +265,6 @@ static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr *ip_out = dc_ip; - SAFE_FREE(ip_list); - return True; } From c3c5347601651dc0f46763d068f4c524390318ca Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 10:07:35 +0000 Subject: [PATCH 168/262] Only allow 'security=ads' when we HAVE_ADS. Andrew Bartlett (This used to be commit f77335b6f86c736e72b66eab6a2aee046ddbee41) --- source3/param/loadparm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 40f59076dae..d649b421c9d 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -551,7 +551,9 @@ static struct enum_list enum_security[] = { {SEC_USER, "USER"}, {SEC_SERVER, "SERVER"}, {SEC_DOMAIN, "DOMAIN"}, +#ifdef HAVE_ADS {SEC_ADS, "ADS"}, +#endif {-1, NULL} }; From 2dfdf744c05f883d658257cfb3bafb40c32bf8b9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 10:11:03 +0000 Subject: [PATCH 169/262] fix debug, at idra's suggestion. Andrew Bartlett (This used to be commit bc17b91c2f1a1df58614b67bff94f228be6b9bb2) --- source3/smbd/uid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index bf609e62e6b..a5083ce75d0 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -689,7 +689,7 @@ BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype) } if (!winbind_lookup_sid(psid, dom_name, name, &name_type)) { - DEBUG(10,("sid_to_gid: winbind lookup for sid %s failed - trying local.\n", + DEBUG(10,("sid_to_gid: winbind lookup for sid %s failed.\n", sid_to_string(sid_str, psid) )); /* this was probably a foreign sid - assume its a group rid and continue */ From 6be547fc6b1982a32aff0e2e58e6d1b4524e2598 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 10:12:52 +0000 Subject: [PATCH 170/262] Don't accidenity mess with the wrong domain's sids. (This used to be commit 0e2207c9c1ce573098f764e85a65c17cc1f1d284) --- source3/passdb/passdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 1c33fda39df..f1328cbc311 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -918,8 +918,8 @@ BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type) pdb_free_sam(&sam_user); - if (!sid_peek_rid(psid, &rid)) { - DEBUG(2, ("sid_peek_rid failed! what kind of sid is this? '%s'\n", sid_to_string(str, psid))); + if (!sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) { + DEBUG(3, ("sid_peek_rid failed - sid '%s' is not in our domain\n", sid_to_string(str, psid))); return False; } From f5a85fe24759b076ffd39583b0db24aa92693100 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 31 Jul 2002 10:47:26 +0000 Subject: [PATCH 171/262] fixed the length checking for plaintext passwords (thanks to andrewb for spotting this) (This used to be commit d4c905e5a0a67c8e01a4fcf78aa992a3b7beff02) --- source3/smbd/sesssetup.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 9d05e3f98a5..71ca7dda52a 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -634,6 +634,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, return ERROR_DOS(ERRDOS,ERRbuftoosmall); } + if (passlen1 > smb_buflen(inbuf)) { + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); + } + if (doencrypt) { lm_resp = data_blob(smb_buf(inbuf), passlen1); } else { @@ -694,14 +698,19 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, if ((doencrypt) && (passlen1 != 0) && (passlen1 != 24)) { doencrypt = False; } + + /* check for nasty tricks */ + if (passlen1 > smb_buflen(inbuf) || passlen2 > smb_buflen(inbuf)) { + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); + } if (doencrypt) { lm_resp = data_blob(p, passlen1); nt_resp = data_blob(p+passlen1, passlen2); } else { pstring pass; - srvstr_pull_buf(inbuf, pass, smb_buf(inbuf), - sizeof(pass), STR_TERMINATE); + srvstr_pull(inbuf, pass, smb_buf(inbuf), + sizeof(pass), passlen1, STR_TERMINATE); plaintext_password = data_blob(pass, strlen(pass)); } From 2307a6f50469b08054fad714ede98ca86fe30dcf Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 11:57:56 +0000 Subject: [PATCH 172/262] Rework parinioa to ensure we never get passwords longer than MAX_PASS_LEN, nor longer than the buffer they claim to be in. Many thanks to tridge for explaining the macros. Andrew Bartlett (This used to be commit 3efd462bf2f1ed50c108c2b8ddecc461d002745d) --- source3/smbd/sesssetup.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 71ca7dda52a..deab1015f5d 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -630,14 +630,10 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, if (Protocol < PROTOCOL_NT1) { uint16 passlen1 = SVAL(inbuf,smb_vwv7); - if (passlen1 > MAX_PASS_LEN) { - return ERROR_DOS(ERRDOS,ERRbuftoosmall); - } - - if (passlen1 > smb_buflen(inbuf)) { + if ((passlen1 > MAX_PASS_LEN) || (passlen1 > smb_bufrem(inbuf, smb_buf(inbuf)))) { return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } - + if (doencrypt) { lm_resp = data_blob(smb_buf(inbuf), passlen1); } else { @@ -669,13 +665,6 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, } } - if (passlen1 > MAX_PASS_LEN) { - return ERROR_DOS(ERRDOS,ERRbuftoosmall); - } - - passlen1 = MIN(passlen1, MAX_PASS_LEN); - passlen2 = MIN(passlen2, MAX_PASS_LEN); - if (!doencrypt) { /* both Win95 and WinNT stuff up the password lengths for non-encrypting systems. Uggh. @@ -693,17 +682,21 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, passlen2 = 0; } + /* check for nasty tricks */ + if (passlen1 > MAX_PASS_LEN || passlen1 > smb_bufrem(inbuf, p)) { + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); + } + + if (passlen2 > MAX_PASS_LEN || passlen2 > smb_bufrem(inbuf, p+passlen1)) { + return ERROR_NT(NT_STATUS_INVALID_PARAMETER); + } + /* Save the lanman2 password and the NT md4 password. */ if ((doencrypt) && (passlen1 != 0) && (passlen1 != 24)) { doencrypt = False; } - /* check for nasty tricks */ - if (passlen1 > smb_buflen(inbuf) || passlen2 > smb_buflen(inbuf)) { - return ERROR_NT(NT_STATUS_INVALID_PARAMETER); - } - if (doencrypt) { lm_resp = data_blob(p, passlen1); nt_resp = data_blob(p+passlen1, passlen2); From 2d67a683b735d50f411a4bee9ee5ec17e9a60015 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 12:05:30 +0000 Subject: [PATCH 173/262] Winbind updates! This updates the 'winbind' authentication module and winbind's 'PAM' (actually netlogon) code to allow smbd to cache connections to the DC. This is particulary relevent when we need mutex locks already - there is no parallelism to be gained anyway. The winbind code authenticates the user, and if successful, passes back the 'info3' struct describing the user. smbd then interprets that in exactly the same way as an 'ntdomain' logon. Also, add parinoia to winbind about null termination. Andrew Bartlett (This used to be commit 167f122b670d4ef67d78e6f79a2bae3f6e8d67df) --- source3/auth/auth_winbind.c | 70 +++++++++++----- source3/nsswitch/winbindd.c | 3 + source3/nsswitch/winbindd_group.c | 6 ++ source3/nsswitch/winbindd_nss.h | 12 ++- source3/nsswitch/winbindd_pam.c | 135 +++++++++++++++++++++++------- source3/nsswitch/winbindd_sid.c | 15 ++++ source3/nsswitch/winbindd_user.c | 3 + source3/nsswitch/winbindd_wins.c | 6 ++ source3/rpc_parse/parse_net.c | 2 +- 9 files changed, 201 insertions(+), 51 deletions(-) diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c index 671e198bf59..5bdccd39f3e 100644 --- a/source3/auth/auth_winbind.c +++ b/source3/auth/auth_winbind.c @@ -32,6 +32,30 @@ NSS_STATUS winbindd_request(int req_type, struct winbindd_request *request, struct winbindd_response *response); +NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response *response, NET_USER_INFO_3 *info3) +{ + uint8 *info3_ndr; + size_t len = response->length - sizeof(response); + prs_struct ps; + if (len > 0) { + info3_ndr = response->extra_data; + if (!prs_init(&ps, len, mem_ctx, UNMARSHALL)) { + return NT_STATUS_NO_MEMORY; + } + prs_append_data(&ps, info3_ndr, len); + ps.data_offset = 0; + if (!net_io_user_info3("", info3, &ps, 1, 3)) { + DEBUG(2, ("get_info3_from_ndr: could not parse info3 struct!\n")); + return NT_STATUS_UNSUCCESSFUL; + } + prs_mem_free(&ps); + + return NT_STATUS_OK; + } else { + DEBUG(2, ("get_info3_from_ndr: No info3 struct found!\n")); + return NT_STATUS_UNSUCCESSFUL; + } +} /* Authenticate a user with a challenge/response */ @@ -44,11 +68,11 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, struct winbindd_request request; struct winbindd_response response; NSS_STATUS result; - struct passwd *pw; NTSTATUS nt_status; + NET_USER_INFO_3 info3; if (!user_info) { - return NT_STATUS_UNSUCCESSFUL; + return NT_STATUS_INVALID_PARAMETER; } if (!auth_context) { @@ -62,11 +86,14 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, ZERO_STRUCT(request); ZERO_STRUCT(response); - snprintf(request.data.auth_crap.user, sizeof(request.data.auth_crap.user), - "%s\\%s", user_info->domain.str, user_info->smb_name.str); + request.data.auth_crap.flags = WINBIND_PAM_INFO3_NDR; - fstrcpy(request.data.auth_crap.user, user_info->smb_name.str); - fstrcpy(request.data.auth_crap.domain, user_info->domain.str); + push_utf8_fstring(request.data.auth_crap.user, + user_info->smb_name.str); + push_utf8_fstring(request.data.auth_crap.domain, + user_info->domain.str); + push_utf8_fstring(request.data.auth_crap.workstation, + user_info->wksta_name.str); memcpy(request.data.auth_crap.chal, auth_context->challenge.data, sizeof(request.data.auth_crap.chal)); @@ -76,27 +103,28 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, sizeof(request.data.auth_crap.nt_resp)); memcpy(request.data.auth_crap.lm_resp, user_info->lm_resp.data, - sizeof(request.data.auth_crap.lm_resp_len)); - memcpy(request.data.auth_crap.nt_resp, user_info->nt_resp.data, request.data.auth_crap.lm_resp_len); + memcpy(request.data.auth_crap.nt_resp, user_info->nt_resp.data, + request.data.auth_crap.nt_resp_len); result = winbindd_request(WINBINDD_PAM_AUTH_CRAP, &request, &response); - if (result == NSS_STATUS_SUCCESS) { - - pw = Get_Pwnam(user_info->internal_username.str); - - if (pw) { - if (make_server_info_pw(server_info, pw)) { - nt_status = NT_STATUS_OK; - } else { - nt_status = NT_STATUS_NO_MEMORY; + nt_status = NT_STATUS(response.data.auth.nt_status); + + if (result == NSS_STATUS_SUCCESS && response.extra_data) { + if (NT_STATUS_IS_OK(nt_status)) { + if (NT_STATUS_IS_OK(nt_status = get_info3_from_ndr(mem_ctx, &response, &info3))) { + nt_status = + make_server_info_info3(mem_ctx, + user_info->internal_username.str, + user_info->smb_name.str, + user_info->domain.str, + server_info, + &info3); } - } else { - nt_status = NT_STATUS_NO_SUCH_USER; } - } else { - nt_status = NT_STATUS_LOGON_FAILURE; + } else if (NT_STATUS_IS_OK(nt_status)) { + nt_status = NT_STATUS_UNSUCCESSFUL; } return nt_status; diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index fbeb6b6347f..047ea1accca 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -375,6 +375,9 @@ void winbind_process_packet(struct winbindd_cli_state *state) { /* Process request */ + /* Ensure null termination of entire request */ + state->request.domain[sizeof(state->request.domain)-1]='\0'; + state->pid = state->request.pid; process_request(state); diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 20563ba7bd7..abb6b9da757 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -196,6 +196,9 @@ enum winbindd_result winbindd_getgrnam(struct winbindd_cli_state *state) gid_t gid; int gr_mem_len; + /* Ensure null termination */ + state->request.data.groupname[sizeof(state->request.data.groupname)-1]='\0'; + DEBUG(3, ("[%5d]: getgrnam %s\n", state->pid, state->request.data.groupname)); @@ -783,6 +786,9 @@ enum winbindd_result winbindd_getgroups(struct winbindd_cli_state *state) int i; TALLOC_CTX *mem_ctx; + /* Ensure null termination */ + state->request.data.username[sizeof(state->request.data.username)-1]='\0'; + DEBUG(3, ("[%5d]: getgroups %s\n", state->pid, state->request.data.username)); diff --git a/source3/nsswitch/winbindd_nss.h b/source3/nsswitch/winbindd_nss.h index 0f0e40a2eca..9eea94e7c0d 100644 --- a/source3/nsswitch/winbindd_nss.h +++ b/source3/nsswitch/winbindd_nss.h @@ -36,7 +36,7 @@ /* Update this when you change the interface. */ -#define WINBIND_INTERFACE_VERSION 4 +#define WINBIND_INTERFACE_VERSION 5 /* Socket commands */ @@ -107,6 +107,12 @@ enum winbindd_cmd { WINBINDD_NUM_CMDS }; +#define WINBIND_PAM_INFO3_NDR 0x0001 +#define WINBIND_PAM_INFO3_TEXT 0x0002 +#define WINBIND_PAM_NTKEY 0x0004 +#define WINBIND_PAM_LMKEY 0x0008 +#define WINBIND_PAM_CONTACT_TRUSTDOM 0x0010 + /* Winbind request structure */ struct winbindd_request { @@ -132,6 +138,8 @@ struct winbindd_request { uint16 lm_resp_len; fstring nt_resp; uint16 nt_resp_len; + fstring workstation; + uint32 flags; } auth_crap; struct { fstring user; @@ -216,6 +224,8 @@ struct winbindd_response { fstring nt_status_string; fstring error_string; int pam_error; + char nt_session_key[16]; + char first_8_lm_hash[8]; } auth; } data; diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index a73b2ccd29e..a8b508a49c6 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -23,17 +23,41 @@ */ #include "winbindd.h" - #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND + +static NTSTATUS append_info3_as_ndr(TALLOC_CTX *mem_ctx, + struct winbindd_cli_state *state, + NET_USER_INFO_3 *info3) +{ + prs_struct ps; + uint32 size; + if (!prs_init(&ps, 256 /* Random, non-zero number */, mem_ctx, MARSHALL)) { + return NT_STATUS_NO_MEMORY; + } + if (!net_io_user_info3("", info3, &ps, 1, 3)) { + prs_mem_free(&ps); + return NT_STATUS_UNSUCCESSFUL; + } + + size = prs_data_size(&ps); + state->response.extra_data = memdup(prs_data_p(&ps), size); + if (!state->response.extra_data) { + prs_mem_free(&ps); + return NT_STATUS_NO_MEMORY; + } + state->response.length += size; + prs_mem_free(&ps); + return NT_STATUS_OK; +} + /* Return a password structure from a username. */ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) { NTSTATUS result; fstring name_domain, name_user; - int passlen; unsigned char trust_passwd[16]; time_t last_change_time; uint32 smb_uid_low; @@ -46,6 +70,12 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) extern pstring global_myname; + /* Ensure null termination */ + state->request.data.auth.user[sizeof(state->request.data.auth.user)-1]='\0'; + + /* Ensure null termination */ + state->request.data.auth.pass[sizeof(state->request.data.auth.pass)-1]='\0'; + DEBUG(3, ("[%5d]: pam auth %s\n", state->pid, state->request.data.auth.user)); @@ -64,8 +94,6 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) goto done; } - passlen = strlen(state->request.data.auth.pass); - { unsigned char local_lm_response[24]; unsigned char local_nt_response[24]; @@ -140,34 +168,67 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) NET_USER_INFO_3 info3; struct cli_state *cli = NULL; TALLOC_CTX *mem_ctx = NULL; - const char *domain = NULL; + char *user = NULL; + char *domain = NULL; + char *contact_domain; + char *workstation; DATA_BLOB lm_resp, nt_resp; extern pstring global_myname; - DEBUG(3, ("[%5d]: pam auth crap domain: %s user: %s\n", state->pid, - state->request.data.auth_crap.domain, state->request.data.auth_crap.user)); + /* Ensure null termination */ + state->request.data.auth_crap.user[sizeof(state->request.data.auth_crap.user)-1]='\0'; - if (!(mem_ctx = talloc_init_named("winbind pam auth crap for %s", state->request.data.auth.user))) { + /* Ensure null termination */ + state->request.data.auth_crap.domain[sizeof(state->request.data.auth_crap.domain)-1]='\0'; + + if (!(mem_ctx = talloc_init_named("winbind pam auth crap for (utf8) %s", state->request.data.auth.user))) { DEBUG(0, ("winbindd_pam_auth_crap: could not talloc_init()!\n")); result = NT_STATUS_NO_MEMORY; goto done; } + if (pull_utf8_talloc(mem_ctx, &user, state->request.data.auth_crap.user) < 0) { + DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n")); + } + if (*state->request.data.auth_crap.domain) { - domain = talloc_strdup(mem_ctx, state->request.data.auth_crap.domain); + if (pull_utf8_talloc(mem_ctx, &domain, state->request.data.auth_crap.domain) < 0) { + DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n")); + } } else if (lp_winbind_use_default_domain()) { - domain = talloc_strdup(mem_ctx, lp_workgroup()); + domain = lp_workgroup(); } else { - DEBUG(5,("no domain specified with username (%s) - failing auth\n", state->request.data.auth.user)); + DEBUG(5,("no domain specified with username (%s) - failing auth\n", + user)); result = NT_STATUS_INVALID_PARAMETER; goto done; } - if (!domain) { - DEBUG(0,("winbindd_pam_auth_crap: talloc_strdup failed!\n")); - result = NT_STATUS_NO_MEMORY; + DEBUG(3, ("[%5d]: pam auth crap domain: %s user: %s\n", state->pid, + domain, user)); + + if (lp_allow_trusted_domains() && (state->request.data.auth_crap.flags & WINBIND_PAM_CONTACT_TRUSTDOM)) { + contact_domain = domain; + } else { + contact_domain = lp_workgroup(); + } + + if (*state->request.data.auth_crap.workstation) { + if (pull_utf8_talloc(mem_ctx, &workstation, state->request.data.auth_crap.workstation) < 0) { + DEBUG(0, ("winbindd_pam_auth_crap: pull_utf8_talloc failed!\n")); + } + } else { + workstation = global_myname; + } + + if (state->request.data.auth_crap.lm_resp_len > sizeof(state->request.data.auth_crap.lm_resp) + || state->request.data.auth_crap.nt_resp_len > sizeof(state->request.data.auth_crap.nt_resp)) { + DEBUG(0, ("winbindd_pam_auth_crap: invalid password length %u/%u\n", + state->request.data.auth_crap.lm_resp_len, + state->request.data.auth_crap.nt_resp_len)); + result = NT_STATUS_INVALID_PARAMETER; goto done; } @@ -175,13 +236,15 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) nt_resp = data_blob_talloc(mem_ctx, state->request.data.auth_crap.nt_resp, state->request.data.auth_crap.nt_resp_len); /* - * Get the machine account password for our primary domain + * Get the machine account password for the domain to contact. + * This is either our own domain for a workstation, or possibly + * any domain for a PDC with trusted domains. */ - if (!secrets_fetch_trust_account_password( - lp_workgroup(), trust_passwd, &last_change_time)) { + if (!secrets_fetch_trust_account_password ( + contact_domain, trust_passwd, &last_change_time)) { DEBUG(0, ("winbindd_pam_auth: could not fetch trust account " - "password for domain %s\n", lp_workgroup())); + "password for domain %s\n", contact_domain)); result = NT_STATUS_CANT_ACCESS_DOMAIN_INFO; goto done; } @@ -189,7 +252,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) ZERO_STRUCT(info3); /* Don't shut this down - it belongs to the connection cache code */ - result = cm_get_netlogon_cli(lp_workgroup(), trust_passwd, &cli); + result = cm_get_netlogon_cli(contact_domain, trust_passwd, &cli); if (!NT_STATUS_IS_OK(result)) { DEBUG(3, ("could not open handle to NETLOGON pipe (error: %s)\n", nt_errstr(result))); @@ -197,27 +260,43 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) } result = cli_netlogon_sam_network_logon(cli, mem_ctx, - state->request.data.auth_crap.user, domain, - global_myname, state->request.data.auth_crap.chal, + user, domain, + workstation, state->request.data.auth_crap.chal, lm_resp, nt_resp, &info3); if (NT_STATUS_IS_OK(result)) { uni_group_cache_store_netlogon(mem_ctx, &info3); + if (state->request.data.auth_crap.flags & WINBIND_PAM_INFO3_NDR) { + result = append_info3_as_ndr(mem_ctx, state, &info3); + } + +#if 0 + /* we don't currently do this stuff right */ + if (state->request.data.auth_crap.flags & WINBIND_PAM_NTKEY) { + SMB_ASSERT(sizeof(state->response.data.auth.nt_session_key) == sizeof(info3.user_sess_key)); + memcpy(state->response.data.auth.nt_session_key, info3.user_sess_key, sizeof(state->response.data.auth.nt_session_key) /* 16 */); + } + if (state->request.data.auth_crap.flags & WINBIND_PAM_LMKEY) { + SMB_ASSERT(sizeof(state->response.data.auth.nt_session_key) <= sizeof(info3.user_sess_key)); + memcpy(state->response.data.auth.first_8_lm_hash, info3.padding, sizeof(state->response.data.auth.nt_session_key) /* 16 */); + } +#endif } done: state->response.data.auth.nt_status = NT_STATUS_V(result); - fstrcpy(state->response.data.auth.nt_status_string, nt_errstr(result)); - fstrcpy(state->response.data.auth.error_string, nt_errstr(result)); + push_utf8_fstring(state->response.data.auth.nt_status_string, nt_errstr(result)); + push_utf8_fstring(state->response.data.auth.error_string, nt_errstr(result)); state->response.data.auth.pam_error = nt_status_to_pam(result); - DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n", - state->request.data.auth_crap.domain, - state->request.data.auth_crap.user, - state->response.data.auth.nt_status_string, - state->response.data.auth.pam_error)); + DEBUG(NT_STATUS_IS_OK(result) ? 5 : 2, + ("NTLM CRAP authenticaion for user [%s]\\[%s] returned %s (PAM: %d)\n", + domain, + user, + state->response.data.auth.nt_status_string, + state->response.data.auth.pam_error)); if (mem_ctx) talloc_destroy(mem_ctx); diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c index 372898a08a4..44f857d6be0 100644 --- a/source3/nsswitch/winbindd_sid.c +++ b/source3/nsswitch/winbindd_sid.c @@ -36,6 +36,9 @@ enum winbindd_result winbindd_lookupsid(struct winbindd_cli_state *state) fstring name; fstring dom_name; + /* Ensure null termination */ + state->request.data.sid[sizeof(state->request.data.sid)-1]='\0'; + DEBUG(3, ("[%5d]: lookupsid %s\n", state->pid, state->request.data.sid)); @@ -79,6 +82,12 @@ enum winbindd_result winbindd_lookupname(struct winbindd_cli_state *state) DOM_SID sid; struct winbindd_domain *domain; + /* Ensure null termination */ + state->request.data.sid[sizeof(state->request.data.name.dom_name)-1]='\0'; + + /* Ensure null termination */ + state->request.data.sid[sizeof(state->request.data.name.name)-1]='\0'; + DEBUG(3, ("[%5d]: lookupname %s%s%s\n", state->pid, state->request.data.name.dom_name, lp_winbind_separator(), @@ -112,6 +121,9 @@ enum winbindd_result winbindd_sid_to_uid(struct winbindd_cli_state *state) { DOM_SID sid; + /* Ensure null termination */ + state->request.data.sid[sizeof(state->request.data.sid)-1]='\0'; + DEBUG(3, ("[%5d]: sid to uid %s\n", state->pid, state->request.data.sid)); @@ -139,6 +151,9 @@ enum winbindd_result winbindd_sid_to_gid(struct winbindd_cli_state *state) { DOM_SID sid; + /* Ensure null termination */ + state->request.data.sid[sizeof(state->request.data.sid)-1]='\0'; + DEBUG(3, ("[%5d]: sid to gid %s\n", state->pid, state->request.data.sid)); diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c index 55593d6ae57..4f57fd2c722 100644 --- a/source3/nsswitch/winbindd_user.c +++ b/source3/nsswitch/winbindd_user.c @@ -103,6 +103,9 @@ enum winbindd_result winbindd_getpwnam(struct winbindd_cli_state *state) struct winbindd_domain *domain; TALLOC_CTX *mem_ctx; + /* Ensure null termination */ + state->request.data.username[sizeof(state->request.data.username)-1]='\0'; + DEBUG(3, ("[%5d]: getpwnam %s\n", state->pid, state->request.data.username)); diff --git a/source3/nsswitch/winbindd_wins.c b/source3/nsswitch/winbindd_wins.c index 8f9a7414bdc..8ddd5dc10df 100644 --- a/source3/nsswitch/winbindd_wins.c +++ b/source3/nsswitch/winbindd_wins.c @@ -122,6 +122,9 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) int i, count, maxlen, size; struct node_status *status; + /* Ensure null termination */ + state->request.data.winsreq[sizeof(state->request.data.winsreq)-1]='\0'; + DEBUG(3, ("[%5d]: wins_byip %s\n", state->pid, state->request.data.winsreq)); @@ -166,6 +169,9 @@ enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) fstring response; char * addr; + /* Ensure null termination */ + state->request.data.winsreq[sizeof(state->request.data.winsreq)-1]='\0'; + DEBUG(3, ("[%5d]: wins_byname %s\n", state->pid, state->request.data.winsreq)); diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index 46fdce63ff4..da49a6531d0 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -1335,7 +1335,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr, ********************************************************************/ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps, - int depth, uint16 validation_level) + int depth, uint16 validation_level) { int i; From 640e1dd4465c099aaafeb5fda8326788c19510f6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 12:17:32 +0000 Subject: [PATCH 174/262] Let everybody enjoy my new toy - make it the default! Authenticaions will now attempt to use winbind, and only fall back to 'ntdomain' (the old security=domain) code if that fails (for any reason, including wrong password). I'll fix up the authenticaion code to better handle the different types of failures in the near future. Andrew Bartlett (This used to be commit 78f0d4337bd263d26d7b349eaf8148e863c62f69) --- source3/auth/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/auth/auth.c b/source3/auth/auth.c index dca9c6c3c48..d43afc71e14 100644 --- a/source3/auth/auth.c +++ b/source3/auth/auth.c @@ -395,7 +395,7 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) { case SEC_DOMAIN: DEBUG(5,("Making default auth method list for security=domain\n")); - auth_method_list = str_list_make("guest sam ntdomain", NULL); + auth_method_list = str_list_make("guest sam winbind ntdomain", NULL); break; case SEC_SERVER: DEBUG(5,("Making default auth method list for security=server\n")); @@ -421,7 +421,7 @@ NTSTATUS make_auth_context_subsystem(struct auth_context **auth_context) break; case SEC_ADS: DEBUG(5,("Making default auth method list for security=ADS\n")); - auth_method_list = str_list_make("guest sam ads ntdomain", NULL); + auth_method_list = str_list_make("guest sam ads winbind ntdomain", NULL); break; default: DEBUG(5,("Unknown auth method!\n")); From 70eaa4233f8b76204ecc1c7f6bea59dee21d00e0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 31 Jul 2002 12:53:56 +0000 Subject: [PATCH 175/262] Add the current working document on the interface to the tree that we have *somthing* in the directory. (Stops cvs update -P eating it). This is the combined effort of many from #samba-technical, kai, metze, ctrlsoft, idra and abartlet in particular. It will no doubt change :-) Andrew Bartlett (This used to be commit 40fc43296def1f5ac3c23aba8b283a91f1d10239) --- source3/sam/SAM-interface_handles.txt | 123 ++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 source3/sam/SAM-interface_handles.txt diff --git a/source3/sam/SAM-interface_handles.txt b/source3/sam/SAM-interface_handles.txt new file mode 100644 index 00000000000..1c164bd198b --- /dev/null +++ b/source3/sam/SAM-interface_handles.txt @@ -0,0 +1,123 @@ +SAM API + +NTSTATUS sam_get_sec_obj(NT_USER_TOKEN *access, DOM_SID *sid, SEC_DESC **sd) +NTSTATUS sam_set_sec_obj(NT_USER_TOKEN *access, DOM_SID *sid, SEC_DESC *sd) + +NTSTATUS sam_lookup_name(NT_USER_TOKEN *access, DOM_SID *domain, char *name, DOM_SID **sid, uint32 *type) +NTSTATUS sam_lookup_sid(NT_USER_TOKEN *access, DOM_SID *sid, char **name, uint32 *type) + + +Domain API + +NTSTATUS sam_update_domain(SAM_DOMAIN_HANDLE *domain) + +NTSTATUS sam_enum_domains(NT_USER_TOKEN *access, int32 *domain_count, DOM_SID **domains, char **domain_names) +NTSTATUS sam_lookup_domain(NT_USER_TOKEN *access, char *domain, DOM_SID **domainsid) + +NTSTATUS sam_get_domain_by_sid(NT_USER_TOKEN *access, uint32 access_desired, DOM_SID *domainsid, SAM_DOMAIN_HANDLE **domain) + + +User API + +NTSTATUS sam_create_user(NT_USER_TOKEN *access, uint32 access_desired, SAM_USER_HANDLE **user) +NTSTATUS sam_add_user(SAM_USER_HANDLE *user) +NTSTATUS sam_update_user(SAM_USER_HANDLE *user) +NTSTATUS sam_delete_user(SAM_USER_HANDLE * user) + +NTSTATUS sam_enum_users(NT_USER_TOKEN *access, DOM_SID *domain, int32 *user_count, SAM_USER_ENUM **users) + +NTSTATUS sam_get_user_by_sid(NT_USER_TOKEN *access, uint32 access_desired, DOM_SID *usersid, SAM_USER_HANDLE **user) +NTSTATUS sam_get_user_by_name(NT_USER_TOKEN *access, uint32 access_desired, char *domain, char *name, SAM_USER_HANDLE **user) + + +Group API + +NTSTATUS sam_create_group(NT_USER_TOKEN *access, uint32 access_desired, uint32 typ, SAM_GROUP_HANDLE **group) +NTSTATUS sam_add_group(SAM_GROUP_HANDLE *samgroup) +NTSTATUS sam_update_group(SAM_GROUP_HANDLE *samgroup) +NTSTATUS sam_delete_group(SAM_GROUP_HANDLE *groupsid) + +NTSTATUS sam_enum_groups(NT_USER_TOKEN *access, DOM_SID *domainsid, uint32 typ, uint32 *groups_count, SAM_GROUP_ENUM **groups) + +NTSTATUS sam_get_group_by_sid(NT_USER_TOKEN *access, uint32 access_desired, DOM_SID *groupsid, SAM_GROUP_HANDLE **group) +NTSTATUS sam_get_group_by_name(NT_USER_TOKEN *access, uint32 access_desired, char *domain, char *name, SAM_GROUP_HANDLE **group) + +NTSTATUS sam_add_member_to_group(SAM_GROUP_HANDLE *group, SAM_GROUP_MEMBER *member) +NTSTATUS sam_delete_member_from_group(SAM_GROUP_HANDLE *group, SAM_GROUP_MEMBER *member) +NTSTATUS sam_enum_groupmembers(SAM_GROUP_HANLDE *group, uint32 *members_count, SAM_GROUP_MEMBER **members) + +NTSTATUS sam_get_groups_of_user(SAM_USER_HANDLE *user, uint32 typ, uint32 *group_count, SAM_GROUP_ENUM **groups) + + + +structures + +typedef _SAM_GROUP_MEMBER { + DOM_SID sid; + BOOL group; /* specifies if it is a group or a user */ + +} SAM_GROUP_MEMBER + +typedef struct sam_user_enum { + DOM_SID sid; + char *username; + char *full_name; + char *user_desc; + uint16 acc_ctrl; +} SAM_USER_ENUM; + +typedef struct sam_group_enum { + DOM_SID sid; + char *groupname; + char *comment; +} SAM_GROUP_ENUM + +NTSTATUS sam_get_domain_sid(SAM_DOMAIN_HANDLE *domain, DOM_SID **sid) +NTSTATUS sam_get_domain_num_users(SAM_DOMAIN_HANDLE *domain, uint32 *num_users) +NTSTATUS sam_get_domain_num_groups(SAM_DOMAIN_HANDLE *domain, uint32 *num_groups) +NTSTATUS sam_get_domain_num_aliases(SAM_DOMAIN_HANDLE *domain, uint32 *num_aliases) +NTSTATUS sam_{get,set}_domain_name(SAM_DOMAIN_HANDLE *domain, char **domain_name) +NTSTATUS sam_{get,set}_domain_server(SAM_DOMAIN_HANDLE *domain, char **server_name) +NTSTATUS sam_{get,set}_domain_max_pwdage(SAM_DOMAIN_HANDLE *domain, NTTIME *max_passwordage) +NTSTATUS sam_{get,set}_domain_min_pwdage(SAM_DOMAIN_HANDLE *domain, NTTIME *min_passwordage) +NTSTATUS sam_{get,set}_domain_lockout_duration(SAM_DOMAIN_HANDLE *domain, NTTIME *lockout_duration) +NTSTATUS sam_{get,set}_domain_reset_count(SAM_DOMAIN_HANDLE *domain, NTTIME *reset_lockout_count) +NTSTATUS sam_{get,set}_domain_min_pwdlength(SAM_DOMAIN_HANDLE *domain, uint16 *min_passwordlength) +NTSTATUS sam_{get,set}_domain_pwd_history(SAM_DOMAIN_HANDLE *domain, uin16 *password_history) +NTSTATUS sam_{get,set}_domain_lockout_count(SAM_DOMAIN_HANDLE *domain, uint16 *lockout_count) +NTSTATUS sam_{get,set}_domain_force_logoff(SAM_DOMAIN_HANDLE *domain, BOOL *force_logoff) +NTSTATUS sam_{get,set}_domain_login_pwdchange(SAM_DOMAIN_HANDLE *domain, BOOL *login_pwdchange) + +NTSTATUS sam_get_user_sid(SAM_USER_HANDLE *user, DOM_SID **sid) +NTSTATUS sam_{get,set}_user_pgroup(SAM_USER_HANDLE *user, DOM_SID **pgroup) +NTSTATUS sam_{get,set}_user_name(SAM_USER_HANDLE *user, char **username) +NTSTATUS sam_{get,set}_user_fullname(SAM_USER_HANDLE *user, char** fullname) +NTSTATUS sam_{get,set}_user_description(SAM_USER_HANDLE *user, char **description) +NTSTATUS sam_{get,set}_user_home_dir(SAM_USER_HANDLE *user, char **home_dir) +NTSTATUS sam_{get,set}_user_dir_drive(SAM_USER_HANDLE *user, char **dir_drive) +NTSTATUS sam_{get,set}_user_logon_script(SAM_USER_HANDLE *user, char **logon_script) +NTSTATUS sam_{get,set}_user_profile_path(SAM_USER_HANDLE *user, char **profile_path) +NTSTATUS sam_{get,set}_user_workstations(SAM_USER_HANDLE *user, char **workstations) +NTSTATUS sam_{get,set}_user_munged_dial(SAM_USER_HANDLE *user, char **munged_dial) +NTSTATUS sam_{get,set}_user_lm_pwd(SAM_USER_HANDLE *user, DATA_BLOB *lm_pwd) +NTSTATUS sam_{get,set}_user_nt_pwd(SAM_USER_HANDLE *user, DATA_BLOB *nt_pwd) +NTSTATUS sam_{get,set}_user_plain_pwd(SAM_USER_HANDLE *user, DATA_BLOB *plaintext_pwd) +NTSTATUS sam_{get,set}_user_acct_ctrl(SAM_USER_HANDLE *user, uint16 *acct_ctrl) +NTSTATUS sam_{get,set}_user_logon_divs(SAM_USER_HANDLE *user, uint16 *logon_divs) +NTSTATUS sam_{get,set}_user_hours(SAM_USER_HANDLE *user, uint32 *hours_len, uint8 **hours) +NTSTATUS sam_{get,set}_user_logon_time(SAM_USER_HANDLE *user, NTTIME *logon_time) +NTSTATUS sam_{get,set}_user_logoff_time(SAM_USER_HANDLE *user, NTTIME *logoff_time) +NTSTATUS sam_{get,set}_user_kickoff_time(SAM_USER_HANDLE *user, NTTIME kickoff_time) +NTSTATUS sam_{get,set}_user_pwd_last_set(SAM_USER_HANDLE *user, NTTIME pwd_last_set) +NTSTATUS sam_{get,set}_user_pwd_can_change(SAM_USER_HANDLE *user, NTTIME pwd_can_change) +NTSTATUS sam_{get,set}_user_pwd_must_change(SAM_USER_HANDLE *user, NTTIME pwd_must_change) +NTSTATUS sam_{get,set}_user_unknown_1(SAM_USER_HANDLE *user, char **unknown_1) +NTSTATUS sam_{get,set}_user_unknown_2(SAM_USER_HANDLE *user, uint32 *unknown_2) +NTSTATUS sam_{get,set}_user_unknown_3(SAM_USER_HANDLE *user, uint32 *unknown_3) +NTSTATUS sam_{get,set}_user_unknown_4(SAM_USER_HANDLE *user, uint32 *unknown_4) + +NTSTATUS sam_get_group_sid(SAM_GROUP_HANDLE *group, DOM_SID **sid) +NTSTATUS sam_get_group_typ(SAM_GROUP_HANDLE *group, uint32 *typ) +NTSTATUS sam_{get,set}_group_name(SAM_GROUP_HANDLE *group, char **group_name) +NTSTATUS sam_{get,set}_group_comment(SAM_GROUP_HANDLE *group, char **comment) +NTSTATUS sam_{get,set}_group_priv_set(SAM_GROUP_HANDLE *group, PRIVILEGE_SET *priv_set) \ No newline at end of file From 255288df65bf2ebcc5909fc0cb70bc80a7c67343 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 31 Jul 2002 13:16:14 +0000 Subject: [PATCH 176/262] forgot to change the makefile system, sorry (This used to be commit 3e6a11f56a3878e75c4354db214971208d911be3) --- examples/VFS/{Makefile => Makefile.in} | 11 +++++------ examples/VFS/block/{Makefile => Makefile.in} | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) rename examples/VFS/{Makefile => Makefile.in} (68%) rename examples/VFS/block/{Makefile => Makefile.in} (68%) diff --git a/examples/VFS/Makefile b/examples/VFS/Makefile.in similarity index 68% rename from examples/VFS/Makefile rename to examples/VFS/Makefile.in index c8e8b8c4a59..3126dfa3b83 100644 --- a/examples/VFS/Makefile +++ b/examples/VFS/Makefile.in @@ -1,15 +1,14 @@ -# Generated automatically from Makefile.in by configure. MAKEFILE = Makefile.vfs include $(MAKEFILE) -CC = gcc +CC = @CC@ LIBTOOL = libtool -CFLAGS = -O -Wall -g -O2 -march=i386 -mcpu=i686 -I/usr/kerberos/include $(VFS_CFLAGS) -CPPFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/kerberos/include $(VFS_CPPFLAGS) -LDFLAGS = -Wl,-rpath,/usr/lib -L/usr/kerberos/lib $(VFS_LDFLAGS) +CFLAGS = @CFLAGS@ $(VFS_CFLAGS) +CPPFLAGS = @CPPFLAGS@ $(VFS_CPPFLAGS) +LDFLAGS = @LDFLAGS@ $(VFS_LDFLAGS) LDSHFLAGS = -shared -srcdir = /home/sorce/devel/samba/cascaded-vfs/samba/source +srcdir = @builddir@ FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) # Default target diff --git a/examples/VFS/block/Makefile b/examples/VFS/block/Makefile.in similarity index 68% rename from examples/VFS/block/Makefile rename to examples/VFS/block/Makefile.in index c8e8b8c4a59..3126dfa3b83 100644 --- a/examples/VFS/block/Makefile +++ b/examples/VFS/block/Makefile.in @@ -1,15 +1,14 @@ -# Generated automatically from Makefile.in by configure. MAKEFILE = Makefile.vfs include $(MAKEFILE) -CC = gcc +CC = @CC@ LIBTOOL = libtool -CFLAGS = -O -Wall -g -O2 -march=i386 -mcpu=i686 -I/usr/kerberos/include $(VFS_CFLAGS) -CPPFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/kerberos/include $(VFS_CPPFLAGS) -LDFLAGS = -Wl,-rpath,/usr/lib -L/usr/kerberos/lib $(VFS_LDFLAGS) +CFLAGS = @CFLAGS@ $(VFS_CFLAGS) +CPPFLAGS = @CPPFLAGS@ $(VFS_CPPFLAGS) +LDFLAGS = @LDFLAGS@ $(VFS_LDFLAGS) LDSHFLAGS = -shared -srcdir = /home/sorce/devel/samba/cascaded-vfs/samba/source +srcdir = @builddir@ FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) # Default target From c4d68a29c97ba14a9df6dbcc73d0edc6f21bd0f4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 31 Jul 2002 14:56:40 +0000 Subject: [PATCH 177/262] merge from SAMBA_2_2 (This used to be commit 72d36c9b2596cda6c3c25c18ddb4c58d55519ff8) --- examples/misc/modify_samba_config.pl | 154 +++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100755 examples/misc/modify_samba_config.pl diff --git a/examples/misc/modify_samba_config.pl b/examples/misc/modify_samba_config.pl new file mode 100755 index 00000000000..eb997f9b0c8 --- /dev/null +++ b/examples/misc/modify_samba_config.pl @@ -0,0 +1,154 @@ +#!/usr/bin/perl + +## +## Simple example of how to implement a '[add|delete] share command' for +## use with the Windows NT Server Manager. See smb.conf(5) for details +## on the '[add|delete] share command' +## +## Author : Gerald (Jerry) Carter +## + +use POSIX qw(tmpnam); + +## +## local variables +## +my $delete_mode = undef; +my $add_mode = undef; +my $tmp_file_name = undef; + + +## check for correct parameters +if ($#ARGV == 1) { + $delete_mode = 1; +} +elsif ($#ARGV == 3) { + $add_mode = 1; +} +else { + print "Usage: $0 configfile share [path] [comment]\n"; + exit -1; +} + +## first param is always the config file +open (CONFIGFILE, "$ARGV[0]") || die "Unable to open $ARGV[0] for reading!\n"; + +## FIXME!! Right now we throw away all comments in the file. +while () { + + chomp($_); + + ## eat leading whitespace + $_ =~ s/^\s*//; + + ## eat trailing whitespace + $_ =~ s/\s*$//; + + + ## throw away comments + next if (($_ =~ /^#/) || ($_ =~ /^;/)); + + ## set the current section name for storing the hash + if ($_ =~ /^\[.*\]$/) { + + $_ = substr($_, 1, length($_)-2); + + if ( length($_) ) { + $section = $_; + } + else { + print "Bad Section Name - no closing ]\n"; + exit -1; + } + + next; + } + + ## check for a param = value + if ($_ =~ /=/) { + ($param, $value) = split (/=/, $_); + $param =~ s/./\l$&/g; + $param =~ s/\s+//g; + $value =~ s/^\s+//; + + $config{$section}{$param} = $value; + + next; + } + + ## should have a hash of hashes indexed by section name +} +close (CONFIGFILE); + +## +## We have the smb.conf in our hash of hashes now. +## Add or delete +## +if ($add_mode) { + $config{$ARGV[1]}{'path'} = $ARGV[2]; + $config{$ARGV[1]}{'comment'} = $ARGV[3]; +} +elsif ($delete_mode) { + delete $config{$ARGV[1]}; +} + +## +## Print the resulting configuration +## +#do { +# $tmp_file_name = tmpnam(); +# print "Using temporary file - $tmp_file_name\n"; +#} while (!sysopen(TMP, $tmp_file_name, O_RDWR|O_CREAT|O_EXCL)); +$tmp_file_name = tmpnam(); +open (TMP, ">$tmp_file_name") || die "Unable to open temporary file for writing!\n"; + +PrintConfigFile(TMP); + +## now overwrite the original config file +close (TMP); +system ("cp -pf $ARGV[0] $ARGV[0].bak"); +system ("cp -pf $tmp_file_name $ARGV[0]"); +unlink $tmp_file_name; + + +exit 0; + + + + + +####################################################################################### +## PrintConfigFile() +## +sub PrintConfigFile { + my ($output) = @_; + + ## print the file back out, beginning with the global section + print $output "#\n# Generated by $0\n#\n"; + + PrintSection ($output, 'global', $config{'global'}); + + foreach $section (keys %config) { + + if ("$section" ne "global") { + print $output "## Section - [$section]\n"; + PrintSection ($output, $section, $config{$section}); + } + } + + print $output "#\n# end of generated smb.conf\n#\n"; +} + +####################################################################################### +## PrintSection() +## +sub PrintSection { + my ($outfile, $name, $section) = @_; + + print $outfile "[$name]\n"; + foreach $param (keys %$section) { + print $outfile "\t$param".' 'x(25-length($param)). " = $$section{$param}\n"; + } + print $outfile "\n"; + +} From a4e3bdbbeec2071fc1a629db6426e3fd4951f7ce Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 1 Aug 2002 03:38:21 +0000 Subject: [PATCH 178/262] make sure we null terminate plaintext passwords (This used to be commit cf2abf677ed9942d841ef61ffb2565244c8979ac) --- source3/smbd/sesssetup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index deab1015f5d..a00554e6389 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -704,7 +704,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, pstring pass; srvstr_pull(inbuf, pass, smb_buf(inbuf), sizeof(pass), passlen1, STR_TERMINATE); - plaintext_password = data_blob(pass, strlen(pass)); + plaintext_password = data_blob(pass, strlen(pass)+1); } p += passlen1 + passlen2; From dcb4aec62757f63a252e0116b874d712681f85fd Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 1 Aug 2002 23:14:48 +0000 Subject: [PATCH 179/262] Fixed compiler warning. (This used to be commit 81322f4d63095d828be7983eb4b47775abe8d33f) --- source3/smbd/conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index 3b6dd61e1e1..d70e50f8995 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -164,7 +164,7 @@ BOOL conn_idle_all(time_t t, int deadtime) void conn_free(connection_struct *conn) { smb_vfs_handle_struct *handle, *thandle; - void (*done_fptr)(connection_struct *conn); + void (*done_fptr)(connection_struct *the_conn); /* Free vfs_connection_struct */ handle = conn->vfs_private; From 0efda5cc2160f5b0b8b6cc5d1d4a29539239239e Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 2 Aug 2002 03:57:40 +0000 Subject: [PATCH 180/262] Merge of print notify fixes from APPLIANCE_HEAD. (This used to be commit 7bf9ca6ca36fa319a57eab05567d49a003237bb5) --- source3/printing/notify.c | 11 +++++------ source3/smbd/connection.c | 5 +++++ source3/utils/smbcontrol.c | 17 +++++++++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 21e28d0ca71..1b2b7805e58 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -65,18 +65,17 @@ again: /* Send message */ - tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); + tdb = conn_tdb_ctx(); if (!tdb) { DEBUG(3, ("Failed to open connections database in send_spoolss_notify2_msg\n")); - return; + goto done; } + + message_send_all(tdb, MSG_PRINTER_NOTIFY2, buf, buflen, False, NULL); - message_send_all(tdb, MSG_PRINTER_NOTIFY2, buf, - buflen, False, NULL); - +done: SAFE_FREE(buf); - tdb_close(tdb); } static void send_notify_field_values(const char *printer_name, uint32 type, diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index c9815dbf8c0..b53ef9fb3fc 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -29,6 +29,11 @@ static TDB_CONTEXT *tdb; TDB_CONTEXT *conn_tdb_ctx(void) { + if (!tdb) { + tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, + O_RDWR | O_CREAT, 0644); + } + return tdb; } diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 65519e8888f..300e5479e5a 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -223,6 +223,23 @@ static void register_all(void) message_register(MSG_POOL_USAGE, pool_usage_cb); } +/* This guy is here so we can link printing/notify.c to the smbcontrol + binary without having to pull in tons of other crap. */ + +TDB_CONTEXT *conn_tdb_ctx(void) +{ + static TDB_CONTEXT *tdb; + + if (tdb) + return tdb; + + tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); + + if (!tdb) + DEBUG(3, ("Failed to open connections database in send_spoolss_notify2_msg\n")); + + return tdb; +} /**************************************************************************** do command From 81a4862ae71795817cbe47edac615474ef26f0c9 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 2 Aug 2002 05:28:54 +0000 Subject: [PATCH 181/262] Broke out unpacking of a username/password stored in a Python dictionary into a separate function. (This used to be commit 10889241d5f5813f499501a45edccc4acd3e9f74) --- source3/python/py_common.c | 104 ++++++++++++++++++++++--------- source3/python/py_common_proto.h | 2 + 2 files changed, 76 insertions(+), 30 deletions(-) diff --git a/source3/python/py_common.c b/source3/python/py_common.c index 890422536e0..a65206e0223 100644 --- a/source3/python/py_common.c +++ b/source3/python/py_common.c @@ -126,6 +126,77 @@ PyObject *py_setup_logging(PyObject *self, PyObject *args, PyObject *kw) return Py_None; } +/* Parse credentials from a python dictionary. The dictionary can + only have the keys "username", "domain" and "password". Return + True for valid credentials in which case the username, domain and + password are set to pointers to their values from the dicationary. + If returns False, the errstr is set to point at some mallocated + memory describing the error. */ + +BOOL py_parse_creds(PyObject *creds, char **username, char **domain, + char **password, char **errstr) +{ + /* Initialise anonymous credentials */ + + *username = ""; + *domain = ""; + *password = ""; + + if (creds && PyDict_Size(creds) > 0) { + PyObject *username_obj, *password_obj, *domain_obj; + + /* Check for presence of required fields */ + + username_obj = PyDict_GetItemString(creds, "username"); + domain_obj = PyDict_GetItemString(creds, "domain"); + password_obj = PyDict_GetItemString(creds, "password"); + + if (!username_obj) { + *errstr = strdup("no username field in credential"); + return False; + } + + if (!domain_obj) { + *errstr = strdup("no domain field in credential"); + return False; + } + + if (!password_obj) { + *errstr = strdup("no password field in credential"); + return False; + } + + /* Look for any other fields */ + + /* Check type of required fields */ + + if (!PyString_Check(username_obj)) { + *errstr = strdup("username field is not string type"); + return False; + } + + if (!PyString_Check(domain_obj)) { + *errstr = strdup("domain field is not string type"); + return False; + } + + if (!PyString_Check(password_obj)) { + *errstr = strdup("password field is not string type"); + return False; + } + + /* Assign values */ + + *username = PyString_AsString(username_obj); + *domain = PyString_AsString(domain_obj); + *password = PyString_AsString(password_obj); + } + + *errstr = NULL; + + return True; +} + /* Return a cli_state to a RPC pipe on the given server. Use the credentials passed if not NULL. If an error occurs errstr is set to a string describing the error and NULL is returned. If set, errstr must @@ -134,41 +205,14 @@ PyObject *py_setup_logging(PyObject *self, PyObject *args, PyObject *kw) struct cli_state *open_pipe_creds(char *server, PyObject *creds, char *pipe_name, char **errstr) { - char *username = "", *password = "", *domain = ""; + char *username, *password, *domain; struct cli_state *cli; NTSTATUS result; /* Extract credentials from the python dictionary */ - if (creds && PyDict_Size(creds) > 0) { - PyObject *username_obj, *password_obj, *domain_obj; - - /* Check credentials passed are valid. This means the - username, domain and password keys must exist and be - string objects. */ - - username_obj = PyDict_GetItemString(creds, "username"); - domain_obj = PyDict_GetItemString(creds, "domain"); - password_obj = PyDict_GetItemString(creds, "password"); - - if (!username_obj || !domain_obj || !password_obj) { - creds_error: - *errstr = strdup("invalid credentials"); - return NULL; - } - - if (!PyString_Check(username_obj) || - !PyString_Check(domain_obj) || - !PyString_Check(password_obj)) - goto creds_error; - - username = PyString_AsString(username_obj); - domain = PyString_AsString(domain_obj); - password = PyString_AsString(password_obj); - - if (!username || !domain || !password) - goto creds_error; - } + if (!py_parse_creds(creds, &username, &password, &domain, errstr)) + return NULL; /* Now try to connect */ diff --git a/source3/python/py_common_proto.h b/source3/python/py_common_proto.h index 143ea2947c3..89f0f35fc93 100644 --- a/source3/python/py_common_proto.h +++ b/source3/python/py_common_proto.h @@ -12,6 +12,8 @@ void py_samba_init(void); PyObject *get_debuglevel(PyObject *self, PyObject *args); PyObject *set_debuglevel(PyObject *self, PyObject *args); PyObject *py_setup_logging(PyObject *self, PyObject *args, PyObject *kw); +BOOL py_parse_creds(PyObject *creds, char **username, char **domain, + char **password, char **errstr); struct cli_state *open_pipe_creds(char *server, PyObject *creds, char *pipe_name, char **errstr); BOOL get_level_value(PyObject *dict, uint32 *level); From 598d62bd53732559a8a4ea8137b1b9635a1c5ebd Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 2 Aug 2002 05:35:09 +0000 Subject: [PATCH 182/262] Added connect, session_request, session_setup and tconx methods. (This used to be commit 76eacaa28546d65b9ddb7ff356f0bd2aaf2f86d8) --- source3/python/py_smb.c | 159 ++++++++++++++++++++++++++++++++++------ 1 file changed, 138 insertions(+), 21 deletions(-) diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c index c206e6ba9b4..77d7bb32fce 100644 --- a/source3/python/py_smb.c +++ b/source3/python/py_smb.c @@ -20,23 +20,6 @@ #include "python/py_smb.h" -/* - * Exceptions raised by this module - */ - -PyObject *smb_ntstatus; /* This exception is raised when a RPC call - returns a status code other than - NT_STATUS_OK */ - - -/* - * Method dispatch tables - */ - -static PyMethodDef smb_methods[] = { - { NULL } -}; - /* Create a new cli_state python object */ PyObject *new_cli_state_object(struct cli_state *cli) @@ -50,6 +33,143 @@ PyObject *new_cli_state_object(struct cli_state *cli) return (PyObject*)o; } +static PyObject *py_smb_connect(PyObject *self, PyObject *args, PyObject *kw) +{ + static char *kwlist[] = { "server", NULL }; + struct cli_state *cli; + char *server; + struct in_addr ip; + + if (!PyArg_ParseTupleAndKeywords(args, kw, "s", kwlist, &server)) + return NULL; + + if (!(cli = cli_initialise(NULL))) + return NULL; + + ZERO_STRUCT(ip); + + if (!cli_connect(cli, server, &ip)) + return NULL; + + return new_cli_state_object(cli); +} + +static PyObject *py_smb_session_request(PyObject *self, PyObject *args, + PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { "called", "calling", NULL }; + char *calling_name = NULL, *called_name; + struct nmb_name calling, called; + extern pstring global_myname; + BOOL result; + + if (!PyArg_ParseTupleAndKeywords(args, kw, "s|s", kwlist, &called_name, + &calling_name)) + return NULL; + + if (!calling_name) + calling_name = global_myname; + + make_nmb_name(&calling, calling_name, 0x00); + make_nmb_name(&called, called_name, 0x20); + + result = cli_session_request(cli->cli, &calling, &called); + + return Py_BuildValue("i", result); +} + +static PyObject *py_smb_negprot(PyObject *self, PyObject *args, PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { NULL }; + BOOL result; + + if (!PyArg_ParseTupleAndKeywords(args, kw, "", kwlist)) + return NULL; + + result = cli_negprot(cli->cli); + + return Py_BuildValue("i", result); +} + +static PyObject *py_smb_session_setup(PyObject *self, PyObject *args, + PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { "creds" }; + PyObject *creds; + char *username, *domain, *password, *errstr; + BOOL result; + + if (!PyArg_ParseTupleAndKeywords(args, kw, "O", kwlist, &creds)) + return NULL; + + if (!py_parse_creds(creds, &username, &domain, &password, &errstr)) { + free(errstr); + return NULL; + } + + result = cli_session_setup( + cli->cli, username, password, strlen(password) + 1, + password, strlen(password) + 1, domain); + + return Py_BuildValue("i", result); +} + +static PyObject *py_smb_tconx(PyObject *self, PyObject *args, PyObject *kw) +{ + cli_state_object *cli = (cli_state_object *)self; + static char *kwlist[] = { "service", "creds" }; + PyObject *creds; + char *service, *username, *domain, *password, *errstr; + BOOL result; + + if (!PyArg_ParseTupleAndKeywords(args, kw, "sO", kwlist, &service, + &creds)) + return NULL; + + if (!py_parse_creds(creds, &username, &domain, &password, &errstr)) { + free(errstr); + return NULL; + } + + result = cli_send_tconX( + cli->cli, service, strequal(service, "IPC$") ? "IPC" : "?????", + password, strlen(password) + 1); + + return Py_BuildValue("i", result); +} + +static PyMethodDef smb_hnd_methods[] = { + + { "session_request", (PyCFunction)py_smb_session_request, + METH_VARARGS | METH_KEYWORDS, "Request a session" }, + + { "negprot", (PyCFunction)py_smb_negprot, + METH_VARARGS | METH_KEYWORDS, "Protocol negotiation" }, + + { "session_setup", (PyCFunction)py_smb_session_setup, + METH_VARARGS | METH_KEYWORDS, "Session setup" }, + + { "tconx", (PyCFunction)py_smb_tconx, + METH_VARARGS | METH_KEYWORDS, "Tree connect" }, + + { NULL } +}; + +/* + * Method dispatch tables + */ + +static PyMethodDef smb_methods[] = { + + { "connect", (PyCFunction)py_smb_connect, METH_VARARGS | METH_KEYWORDS, + "Connect to a host" }, + + { NULL } +}; + static void py_cli_state_dealloc(PyObject* self) { PyObject_Del(self); @@ -57,7 +177,7 @@ static void py_cli_state_dealloc(PyObject* self) static PyObject *py_cli_state_getattr(PyObject *self, char *attrname) { - return Py_FindMethod(smb_methods, self, attrname); + return Py_FindMethod(smb_hnd_methods, self, attrname); } PyTypeObject cli_state_type = { @@ -91,9 +211,6 @@ void initsmb(void) module = Py_InitModule("smb", smb_methods); dict = PyModule_GetDict(module); - smb_ntstatus = PyErr_NewException("smb.ntstatus", NULL, NULL); - PyDict_SetItemString(dict, "ntstatus", smb_ntstatus); - /* Initialise policy handle object */ cli_state_type.ob_type = &PyType_Type; From e9360f1a45d46a7def3e74c46d170eb843e1fb9e Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 2 Aug 2002 07:20:56 +0000 Subject: [PATCH 183/262] Moved rpc client routines from libsmb back to rpc_client where they belong. (This used to be commit cb946b5dadf3cfd21bf584437c6a8e9425f6d5a7) --- source3/Makefile.in | 9 +- source3/libsmb/cli_reg.c | 102 - source3/libsmb/cli_samr.c | 1404 --------- source3/libsmb/cli_spoolss.c | 2156 ------------- source3/libsmb/cli_srvsvc.c | 445 --- source3/libsmb/cli_wkssvc.c | 93 - source3/{libsmb => rpc_client}/cli_dfs.c | 0 source3/{libsmb => rpc_client}/cli_lsarpc.c | 0 source3/{libsmb => rpc_client}/cli_netlogon.c | 0 source3/rpc_client/cli_reg.c | 1124 +------ source3/rpc_client/cli_samr.c | 1954 +++++++----- source3/rpc_client/cli_spoolss.c | 2772 ++++++++++++----- .../cli_spoolss_notify.c | 0 source3/rpc_client/cli_srvsvc.c | 735 ++--- source3/rpc_client/cli_wkssvc.c | 122 +- source3/rpc_client/msrpc_spoolss.c | 812 ----- 16 files changed, 3846 insertions(+), 7882 deletions(-) delete mode 100644 source3/libsmb/cli_reg.c delete mode 100644 source3/libsmb/cli_samr.c delete mode 100644 source3/libsmb/cli_spoolss.c delete mode 100644 source3/libsmb/cli_srvsvc.c delete mode 100644 source3/libsmb/cli_wkssvc.c rename source3/{libsmb => rpc_client}/cli_dfs.c (100%) rename source3/{libsmb => rpc_client}/cli_lsarpc.c (100%) rename source3/{libsmb => rpc_client}/cli_netlogon.c (100%) rename source3/{libsmb => rpc_client}/cli_spoolss_notify.c (100%) delete mode 100644 source3/rpc_client/msrpc_spoolss.c diff --git a/source3/Makefile.in b/source3/Makefile.in index fd49d7265be..74576c449a2 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -168,10 +168,11 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \ libsmb/passchange.o libsmb/unexpected.o libsmb/doserr.o \ $(RPC_PARSE_OBJ1) -LIBMSRPC_OBJ = libsmb/cli_lsarpc.o libsmb/cli_samr.o \ - libsmb/cli_netlogon.o libsmb/cli_srvsvc.o libsmb/cli_wkssvc.o \ - libsmb/cli_dfs.o libsmb/cli_reg.o \ - rpc_client/cli_pipe.o libsmb/cli_spoolss.o libsmb/cli_spoolss_notify.o +LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \ + rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \ + rpc_client/cli_wkssvc.o rpc_client/cli_dfs.o \ + rpc_client/cli_reg.o rpc_client/cli_pipe.o \ + rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o LIBMSRPC_SERVER_OBJ = libsmb/trust_passwd.o diff --git a/source3/libsmb/cli_reg.c b/source3/libsmb/cli_reg.c deleted file mode 100644 index aaf18882f76..00000000000 --- a/source3/libsmb/cli_reg.c +++ /dev/null @@ -1,102 +0,0 @@ -/* - Unix SMB/CIFS implementation. - RPC Pipe client - - Copyright (C) Andrew Tridgell 1992-1998, - Copyright (C) Luke Kenneth Casson Leighton 1996-1998, - Copyright (C) Paul Ashton 1997-1998. - Copyright (C) Jeremy Allison 1999. - Copyright (C) Simo Sorce 2001 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - -/* Shutdown a server */ - -NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, - const char *msg, uint32 timeout, uint16 flags) -{ - prs_struct qbuf; - prs_struct rbuf; - REG_Q_SHUTDOWN q_s; - REG_R_SHUTDOWN r_s; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - if (msg == NULL) return NT_STATUS_INVALID_PARAMETER; - - ZERO_STRUCT (q_s); - ZERO_STRUCT (r_s); - - prs_init(&qbuf , MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_reg_q_shutdown(&q_s, msg, timeout, flags); - - if (!reg_io_q_shutdown("", &q_s, &qbuf, 0) || - !rpc_api_pipe_req(cli, REG_SHUTDOWN, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if(reg_io_r_shutdown("", &r_s, &rbuf, 0)) - result = r_s.status; - -done: - prs_mem_free(&rbuf); - prs_mem_free(&qbuf); - - return result; -} - - -/* Abort a server shutdown */ - -NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx) -{ - prs_struct rbuf; - prs_struct qbuf; - REG_Q_ABORT_SHUTDOWN q_s; - REG_R_ABORT_SHUTDOWN r_s; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT (q_s); - ZERO_STRUCT (r_s); - - prs_init(&qbuf , MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_reg_q_abort_shutdown(&q_s); - - if (!reg_io_q_abort_shutdown("", &q_s, &qbuf, 0) || - !rpc_api_pipe_req(cli, REG_ABORT_SHUTDOWN, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (reg_io_r_abort_shutdown("", &r_s, &rbuf, 0)) - result = r_s.status; - -done: - prs_mem_free(&rbuf); - prs_mem_free(&qbuf ); - - return result; -} diff --git a/source3/libsmb/cli_samr.c b/source3/libsmb/cli_samr.c deleted file mode 100644 index 6581bdbeaf3..00000000000 --- a/source3/libsmb/cli_samr.c +++ /dev/null @@ -1,1404 +0,0 @@ -/* - Unix SMB/CIFS implementation. - RPC pipe client - Copyright (C) Tim Potter 2000-2001, - Copyright (C) Andrew Tridgell 1992-1997,2000, - Copyright (C) Luke Kenneth Casson Leighton 1996-1997,2000, - Copyright (C) Paul Ashton 1997,2000, - Copyright (C) Elrond 2000, - Copyright (C) Rafal Szczesniak 2002. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - -/* Connect to SAMR database */ - -NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 access_mask, POLICY_HND *connect_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_CONNECT q; - SAMR_R_CONNECT r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_connect(&q, cli->desthost, access_mask); - - if (!samr_io_q_connect("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_CONNECT, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_connect("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *connect_pol = r.connect_pol; -#ifdef __INSURE__ - connect_pol->marker = malloc(1); -#endif - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Close SAMR handle */ - -NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_CLOSE_HND q; - SAMR_R_CLOSE_HND r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_close_hnd(&q, connect_pol); - - if (!samr_io_q_close_hnd("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_CLOSE_HND, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_close_hnd("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { -#ifdef __INSURE__ - SAFE_FREE(connect_pol->marker); -#endif - *connect_pol = r.pol; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Open handle on a domain */ - -NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *connect_pol, uint32 access_mask, - const DOM_SID *domain_sid, POLICY_HND *domain_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_OPEN_DOMAIN q; - SAMR_R_OPEN_DOMAIN r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_open_domain(&q, connect_pol, access_mask, domain_sid); - - if (!samr_io_q_open_domain("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_OPEN_DOMAIN, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_open_domain("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *domain_pol = r.domain_pol; -#ifdef __INSURE__ - domain_pol->marker = malloc(1); -#endif - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Open handle on a user */ - -NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 user_rid, POLICY_HND *user_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_OPEN_USER q; - SAMR_R_OPEN_USER r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_open_user(&q, domain_pol, access_mask, user_rid); - - if (!samr_io_q_open_user("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_OPEN_USER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_open_user("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *user_pol = r.user_pol; -#ifdef __INSURE__ - user_pol->marker = malloc(1); -#endif - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Open handle on a group */ - -NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 group_rid, POLICY_HND *group_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_OPEN_GROUP q; - SAMR_R_OPEN_GROUP r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_open_group(&q, domain_pol, access_mask, group_rid); - - if (!samr_io_q_open_group("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_OPEN_GROUP, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_open_group("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *group_pol = r.pol; -#ifdef __INSURE__ - group_pol->marker = malloc(1); -#endif - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query user info */ - -NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - SAM_USERINFO_CTR **ctr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_USERINFO q; - SAMR_R_QUERY_USERINFO r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_userinfo(&q, user_pol, switch_value); - - if (!samr_io_q_query_userinfo("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_USERINFO, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_query_userinfo("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - *ctr = r.ctr; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query group info */ - -NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 info_level, - GROUP_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_GROUPINFO q; - SAMR_R_QUERY_GROUPINFO r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_groupinfo(&q, group_pol, info_level); - - if (!samr_io_q_query_groupinfo("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_GROUPINFO, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - r.ctr = ctr; - - if (!samr_io_r_query_groupinfo("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query user groups */ - -NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 *num_groups, - DOM_GID **gid) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_USERGROUPS q; - SAMR_R_QUERY_USERGROUPS r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_usergroups(&q, user_pol); - - if (!samr_io_q_query_usergroups("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_USERGROUPS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_query_usergroups("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *num_groups = r.num_entries; - *gid = r.gid; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query user aliases */ - -NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, - uint32 *num_aliases, uint32 **als_rids) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_USERALIASES q; - SAMR_R_QUERY_USERALIASES r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - unsigned int ptr=1; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_useraliases(&q, user_pol, num_sids, &ptr, sid); - - if (!samr_io_q_query_useraliases("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_USERALIASES, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_query_useraliases("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *num_aliases = r.num_entries; - *als_rids = r.rid; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query user groups */ - -NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *group_pol, uint32 *num_mem, - uint32 **rid, uint32 **attr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_GROUPMEM q; - SAMR_R_QUERY_GROUPMEM r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_groupmem(&q, group_pol); - - if (!samr_io_q_query_groupmem("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_GROUPMEM, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_query_groupmem("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *num_mem = r.num_entries; - *rid = r.rid; - *attr = r.attr; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** - * Enumerate domain users - * - * @param cli client state structure - * @param mem_ctx talloc context - * @param pol opened domain policy handle - * @param start_idx starting index of enumeration, returns context for - next enumeration - * @param acb_mask account control bit mask (to enumerate some particular - * kind of accounts) - * @param size max acceptable size of response - * @param dom_users returned array of domain user names - * @param rids returned array of domain user RIDs - * @param num_dom_users numer returned entries - * - * @return NTSTATUS returned in rpc response - **/ -NTSTATUS cli_samr_enum_dom_users(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, uint16 acb_mask, - uint32 size, char ***dom_users, uint32 **rids, - uint32 *num_dom_users) -{ - prs_struct qdata; - prs_struct rdata; - SAMR_Q_ENUM_DOM_USERS q; - SAMR_R_ENUM_DOM_USERS r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - int i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - if (cli == NULL || pol == NULL) - return result; - - /* initialise parse structures */ - prs_init(&qdata, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rdata, 0, mem_ctx, UNMARSHALL); - - DEBUG(4, ("SAMR Enum Domain Users. start_idx: %d, acb: %d, size: %d\n", - *start_idx, acb_mask, size)); - - /* fill query structure with parameters */ - init_samr_q_enum_dom_users(&q, pol, *start_idx, acb_mask, 0, size); - - /* prepare query stream */ - if (!samr_io_q_enum_dom_users("", &q, &qdata, 0)) { - prs_mem_free(&qdata); - prs_mem_free(&rdata); - return result; - } - - /* send rpc call over the pipe */ - if (!rpc_api_pipe_req(cli, SAMR_ENUM_DOM_USERS, &qdata, &rdata)) { - prs_mem_free(&qdata); - prs_mem_free(&rdata); - return result; - } - - /* unpack received stream */ - if(!samr_io_r_enum_dom_users("", &r, &rdata, 0)) { - prs_mem_free(&qdata); - prs_mem_free(&rdata); - result = r.status; - return result; - } - - /* return the data obtained in response */ - if (!NT_STATUS_IS_OK(r.status) && - (NT_STATUS_EQUAL(r.status, STATUS_MORE_ENTRIES) || - NT_STATUS_EQUAL(r.status, NT_STATUS_NO_MORE_ENTRIES))) { - return r.status; - } - - *start_idx = r.next_idx; - *num_dom_users = r.num_entries2; - result = r.status; - - if (r.num_entries2) { - /* allocate memory needed to return received data */ - *rids = (uint32*)talloc(mem_ctx, sizeof(uint32) * r.num_entries2); - if (!*rids) { - DEBUG(0, ("Error in cli_samr_enum_dom_users(): out of memory\n")); - return NT_STATUS_NO_MEMORY; - } - - *dom_users = (char**)talloc(mem_ctx, sizeof(char*) * r.num_entries2); - if (!*dom_users) { - DEBUG(0, ("Error in cli_samr_enum_dom_users(): out of memory\n")); - return NT_STATUS_NO_MEMORY; - } - - /* fill output buffers with rpc response */ - for (i = 0; i < r.num_entries2; i++) { - fstring conv_buf; - - (*rids)[i] = r.sam[i].rid; - unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf) - 1); - (*dom_users)[i] = talloc_strdup(mem_ctx, conv_buf); - } - } - - prs_mem_free(&qdata); - prs_mem_free(&rdata); - - return result; -}; - - -/* Enumerate domain groups */ - -NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups) -{ - prs_struct qbuf, rbuf; - SAMR_Q_ENUM_DOM_GROUPS q; - SAMR_R_ENUM_DOM_GROUPS r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 name_idx, i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_enum_dom_groups(&q, pol, *start_idx, size); - - if (!samr_io_q_enum_dom_groups("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_ENUM_DOM_GROUPS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_enum_dom_groups("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (!NT_STATUS_IS_OK(result) && - NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) - goto done; - - *num_dom_groups = r.num_entries2; - - if (!((*dom_groups) = (struct acct_info *) - talloc(mem_ctx, sizeof(struct acct_info) * *num_dom_groups))) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - memset(*dom_groups, 0, sizeof(struct acct_info) * *num_dom_groups); - - name_idx = 0; - - for (i = 0; i < *num_dom_groups; i++) { - - (*dom_groups)[i].rid = r.sam[i].rid; - - if (r.sam[i].hdr_name.buffer) { - unistr2_to_ascii((*dom_groups)[i].acct_name, - &r.uni_grp_name[name_idx], - sizeof(fstring) - 1); - name_idx++; - } - - *start_idx = r.next_idx; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Enumerate domain groups */ - -NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 *start_idx, - uint32 size, struct acct_info **dom_groups, - uint32 *num_dom_groups) -{ - prs_struct qbuf, rbuf; - SAMR_Q_ENUM_DOM_ALIASES q; - SAMR_R_ENUM_DOM_ALIASES r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 name_idx, i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_enum_dom_aliases(&q, pol, *start_idx, size); - - if (!samr_io_q_enum_dom_aliases("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_ENUM_DOM_ALIASES, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_enum_dom_aliases("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - result = r.status; - - if (!NT_STATUS_IS_OK(result) && - NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) { - goto done; - } - - *num_dom_groups = r.num_entries2; - - if (!((*dom_groups) = (struct acct_info *) - talloc(mem_ctx, sizeof(struct acct_info) * *num_dom_groups))) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - memset(*dom_groups, 0, sizeof(struct acct_info) * *num_dom_groups); - - name_idx = 0; - - for (i = 0; i < *num_dom_groups; i++) { - - (*dom_groups)[i].rid = r.sam[i].rid; - - if (r.sam[i].hdr_name.buffer) { - unistr2_to_ascii((*dom_groups)[i].acct_name, - &r.uni_grp_name[name_idx], - sizeof(fstring) - 1); - name_idx++; - } - - *start_idx = r.next_idx; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query alias members */ - -NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *alias_pol, uint32 *num_mem, - DOM_SID **sids) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_ALIASMEM q; - SAMR_R_QUERY_ALIASMEM r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_aliasmem(&q, alias_pol); - - if (!samr_io_q_query_aliasmem("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_ALIASMEM, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_query_aliasmem("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - *num_mem = r.num_sids; - - if (!(*sids = talloc(mem_ctx, sizeof(DOM_SID) * *num_mem))) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - for (i = 0; i < *num_mem; i++) { - (*sids)[i] = r.sid[i].sid; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Open handle on an alias */ - -NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 access_mask, - uint32 alias_rid, POLICY_HND *alias_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_OPEN_ALIAS q; - SAMR_R_OPEN_ALIAS r; - NTSTATUS result; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_open_alias(&q, domain_pol, access_mask, alias_rid); - - if (!samr_io_q_open_alias("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_OPEN_ALIAS, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_open_alias("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Return output parameters */ - - if (NT_STATUS_IS_OK(result = r.status)) { - *alias_pol = r.pol; -#ifdef __INSURE__ - alias_pol->marker = malloc(1); -#endif - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query domain info */ - -NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint16 switch_value, - SAM_UNK_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_DOMAIN_INFO q; - SAMR_R_QUERY_DOMAIN_INFO r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_dom_info(&q, domain_pol, switch_value); - - if (!samr_io_q_query_dom_info("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_DOMAIN_INFO, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - r.ctr = ctr; - - if (!samr_io_r_query_dom_info("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query display info */ - -NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 *start_idx, - uint16 switch_value, uint32 *num_entries, - uint32 max_entries, SAM_DISPINFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_DISPINFO q; - SAMR_R_QUERY_DISPINFO r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_dispinfo(&q, domain_pol, switch_value, - *start_idx, max_entries); - - if (!samr_io_q_query_dispinfo("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_DISPINFO, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - r.ctr = ctr; - - if (!samr_io_r_query_dispinfo("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - result = r.status; - - if (!NT_STATUS_IS_OK(result) && - NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) { - goto done; - } - - *num_entries = r.num_entries; - *start_idx += r.num_entries; /* No next_idx in this structure! */ - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Lookup rids. Note that NT4 seems to crash if more than ~1000 rids are - looked up in one packet. */ - -NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_rids, uint32 *rids, - uint32 *num_names, char ***names, - uint32 **name_types) -{ - prs_struct qbuf, rbuf; - SAMR_Q_LOOKUP_RIDS q; - SAMR_R_LOOKUP_RIDS r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 i; - - if (num_rids > 1000) { - DEBUG(2, ("cli_samr_lookup_rids: warning: NT4 can crash if " - "more than ~1000 rids are looked up at once.\n")); - } - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_lookup_rids(mem_ctx, &q, domain_pol, flags, - num_rids, rids); - - if (!samr_io_q_lookup_rids("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_LOOKUP_RIDS, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_lookup_rids("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - if (r.num_names1 == 0) { - *num_names = 0; - *names = NULL; - goto done; - } - - *num_names = r.num_names1; - *names = talloc(mem_ctx, sizeof(char *) * r.num_names1); - *name_types = talloc(mem_ctx, sizeof(uint32) * r.num_names1); - - for (i = 0; i < r.num_names1; i++) { - fstring tmp; - - unistr2_to_ascii(tmp, &r.uni_name[i], sizeof(tmp) - 1); - (*names)[i] = talloc_strdup(mem_ctx, tmp); - (*name_types)[i] = r.type[i]; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Lookup names */ - -NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, uint32 flags, - uint32 num_names, const char **names, - uint32 *num_rids, uint32 **rids, - uint32 **rid_types) -{ - prs_struct qbuf, rbuf; - SAMR_Q_LOOKUP_NAMES q; - SAMR_R_LOOKUP_NAMES r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - uint32 i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_lookup_names(mem_ctx, &q, domain_pol, flags, - num_names, names); - - if (!samr_io_q_lookup_names("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_LOOKUP_NAMES, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_lookup_names("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - if (r.num_rids1 == 0) { - *num_rids = 0; - goto done; - } - - *num_rids = r.num_rids1; - *rids = talloc(mem_ctx, sizeof(uint32) * r.num_rids1); - *rid_types = talloc(mem_ctx, sizeof(uint32) * r.num_rids1); - - for (i = 0; i < r.num_rids1; i++) { - (*rids)[i] = r.rids[i]; - (*rid_types)[i] = r.types[i]; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Create a domain user */ - -NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *domain_pol, const char *acct_name, - uint32 acb_info, uint32 unknown, - POLICY_HND *user_pol, uint32 *rid) -{ - prs_struct qbuf, rbuf; - SAMR_Q_CREATE_USER q; - SAMR_R_CREATE_USER r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_create_user(&q, domain_pol, acct_name, acb_info, unknown); - - if (!samr_io_q_create_user("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_CREATE_USER, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_create_user("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - if (user_pol) - *user_pol = r.user_pol; - - if (rid) - *rid = r.user_rid; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Set userinfo */ - -NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_SET_USERINFO q; - SAMR_R_SET_USERINFO r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - q.ctr = ctr; - - init_samr_q_set_userinfo(&q, user_pol, sess_key, switch_value, - ctr->info.id); - - if (!samr_io_q_set_userinfo("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_SET_USERINFO, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_set_userinfo("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Set userinfo2 */ - -NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - uchar sess_key[16], SAM_USERINFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SAMR_Q_SET_USERINFO2 q; - SAMR_R_SET_USERINFO2 r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_set_userinfo2(&q, user_pol, sess_key, switch_value, ctr); - - if (!samr_io_q_set_userinfo2("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_SET_USERINFO2, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_set_userinfo2("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - if (!NT_STATUS_IS_OK(result = r.status)) { - goto done; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Delete domain user */ - -NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol) -{ - prs_struct qbuf, rbuf; - SAMR_Q_DELETE_DOM_USER q; - SAMR_R_DELETE_DOM_USER r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_delete_dom_user(&q, user_pol); - - if (!samr_io_q_delete_dom_user("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_DELETE_DOM_USER, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_delete_dom_user("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Query user security object */ - -NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *user_pol, uint16 switch_value, - TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf) -{ - prs_struct qbuf, rbuf; - SAMR_Q_QUERY_SEC_OBJ q; - SAMR_R_QUERY_SEC_OBJ r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_query_sec_obj(&q, user_pol, switch_value); - - if (!samr_io_q_query_sec_obj("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_QUERY_SEC_OBJECT, &qbuf, &rbuf)) { - goto done; - } - - /* Unmarshall response */ - - if (!samr_io_r_query_sec_obj("", &r, &rbuf, 0)) { - goto done; - } - - /* Return output parameters */ - - result = r.status; - *sec_desc_buf=dup_sec_desc_buf(ctx, r.buf); - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Get domain password info */ - -NTSTATUS cli_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint16 *unk_0, uint16 *unk_1, uint16 *unk_2) -{ - prs_struct qbuf, rbuf; - SAMR_Q_GET_DOM_PWINFO q; - SAMR_R_GET_DOM_PWINFO r; - NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Marshall data and send request */ - - init_samr_q_get_dom_pwinfo(&q, cli->desthost); - - if (!samr_io_q_get_dom_pwinfo("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SAMR_GET_DOM_PWINFO, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!samr_io_r_get_dom_pwinfo("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (NT_STATUS_IS_OK(result)) { - if (unk_0) - *unk_0 = r.unk_0; - if (unk_1) - *unk_1 = r.unk_1; - if (unk_2) - *unk_2 = r.unk_2; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} diff --git a/source3/libsmb/cli_spoolss.c b/source3/libsmb/cli_spoolss.c deleted file mode 100644 index 18e17758d6d..00000000000 --- a/source3/libsmb/cli_spoolss.c +++ /dev/null @@ -1,2156 +0,0 @@ -/* - Unix SMB/CIFS implementation. - RPC pipe client - - Copyright (C) Gerald Carter 2001-2002, - Copyright (C) Tim Potter 2000-2002, - Copyright (C) Andrew Tridgell 1994-2000, - Copyright (C) Luke Kenneth Casson Leighton 1996-2000, - Copyright (C) Jean-Francois Micouleau 1999-2000. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - -/** @defgroup spoolss SPOOLSS - NT printing routines - * @ingroup rpc_client - * - * @{ - **/ - -/********************************************************************** - Initialize a new spoolss buff for use by a client rpc -**********************************************************************/ -static void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx) -{ - buffer->ptr = (size != 0); - buffer->size = size; - buffer->string_at_end = size; - prs_init(&buffer->prs, size, ctx, MARSHALL); - buffer->struct_start = prs_offset(&buffer->prs); -} - -/********************************************************************* - Decode various spoolss rpc's and info levels - ********************************************************************/ - -/********************************************************************** -**********************************************************************/ -static void decode_printer_info_0(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, - uint32 returned, PRINTER_INFO_0 **info) -{ - uint32 i; - PRINTER_INFO_0 *inf; - - inf=(PRINTER_INFO_0 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_0)); - - buffer->prs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs, 0); - - for (i=0; iprs, 0); - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs, 0); - - smb_io_driverdir_1("", buffer, inf, 0); - - *info=inf; -} - -/** Return a handle to the specified printer or print server. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param printername The name of the printer or print server to be - * opened in UNC format. - * - * @param datatype Specifies the default data type for the printer. - * - * @param access_required The access rights requested on the printer or - * print server. - * - * @param station The UNC name of the requesting workstation. - * - * @param username The name of the user requesting the open. - * - * @param pol Returned policy handle. - */ - -/********************************************************************************* - Win32 API - OpenPrinter() - ********************************************************************************/ - -WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *printername, char *datatype, uint32 access_required, - char *station, char *username, POLICY_HND *pol) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_OPEN_PRINTER_EX q; - SPOOL_R_OPEN_PRINTER_EX r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_open_printer_ex(&q, printername, datatype, - access_required, station, username); - - /* Marshall data and send request */ - - if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (W_ERROR_IS_OK(result)) - *pol = r.handle; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** Close a printer handle - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param pol Policy handle of printer or print server to close. - */ -/********************************************************************************* - Win32 API - ClosePrinter() - ********************************************************************************/ - -WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_CLOSEPRINTER q; - SPOOL_R_CLOSEPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_closeprinter(&q, pol); - - /* Marshall data and send request */ - - if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (W_ERROR_IS_OK(result)) - *pol = r.handle; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** Enumerate printers on a print server. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param offered Buffer size offered in the request. - * @param needed Number of bytes needed to complete the request. - * may be NULL. - * - * @param flags Selected from PRINTER_ENUM_* flags. - * @param level Request information level. - * - * @param num_printers Pointer to number of printers returned. May be - * NULL. - * @param ctr Return structure for printer information. May - * be NULL. - */ -/********************************************************************************* - Win32 API - EnumPrinters() - ********************************************************************************/ - -WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 flags, uint32 level, - uint32 *num_printers, PRINTER_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMPRINTERS q; - SPOOL_R_ENUMPRINTERS r; - NEW_BUFFER buffer; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - make_spoolss_q_enumprinters(&q, flags, server, level, &buffer, - offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enumprinters("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (spoolss_io_r_enumprinters("", &r, &rbuf, 0)) { - if (needed) - *needed = r.needed; - } - - result = r.status; - - /* Return output parameters */ - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - if (num_printers) - *num_printers = r.returned; - - if (!ctr) - goto done; - - switch (level) { - case 0: - decode_printer_info_0(mem_ctx, r.buffer, r.returned, - &ctr->printers_0); - break; - case 1: - decode_printer_info_1(mem_ctx, r.buffer, r.returned, - &ctr->printers_1); - break; - case 2: - decode_printer_info_2(mem_ctx, r.buffer, r.returned, - &ctr->printers_2); - break; - case 3: - decode_printer_info_3(mem_ctx, r.buffer, r.returned, - &ctr->printers_3); - break; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - EnumPorts() - ********************************************************************************/ -/** Enumerate printer ports on a print server. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param offered Buffer size offered in the request. - * @param needed Number of bytes needed to complete the request. - * May be NULL. - * - * @param level Requested information level. - * - * @param num_ports Pointer to number of ports returned. May be NULL. - * @param ctr Pointer to structure holding port information. - * May be NULL. - */ - -WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 level, int *num_ports, PORT_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMPORTS q; - SPOOL_R_ENUMPORTS r; - NEW_BUFFER buffer; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - make_spoolss_q_enumports(&q, server, level, &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enumports("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMPORTS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (spoolss_io_r_enumports("", &r, &rbuf, 0)) { - if (needed) - *needed = r.needed; - } - - result = r.status; - - /* Return output parameters */ - - if (!W_ERROR_IS_OK(result)) - goto done; - - if (num_ports) - *num_ports = r.returned; - - if (!ctr) - goto done; - - switch (level) { - case 1: - decode_port_info_1(mem_ctx, r.buffer, r.returned, - &ctr->port.info_1); - break; - case 2: - decode_port_info_2(mem_ctx, r.buffer, r.returned, - &ctr->port.info_2); - break; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - GetPrinter() - ********************************************************************************/ - -WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETPRINTER q; - SPOOL_R_GETPRINTER r; - NEW_BUFFER buffer; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - make_spoolss_q_getprinter(mem_ctx, &q, pol, level, &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_getprinter("", &r, &rbuf, 0)) - goto done; - - if (needed) - *needed = r.needed; - - /* Return output parameters */ - - result = r.status; - - if (W_ERROR_IS_OK(result)) { - switch (level) { - case 0: - decode_printer_info_0(mem_ctx, r.buffer, 1, &ctr->printers_0); - break; - case 1: - decode_printer_info_1(mem_ctx, r.buffer, 1, &ctr->printers_1); - break; - case 2: - decode_printer_info_2(mem_ctx, r.buffer, 1, &ctr->printers_2); - break; - case 3: - decode_printer_info_3(mem_ctx, r.buffer, 1, &ctr->printers_3); - break; - } - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - SetPrinter() - ********************************************************************************/ -/** Set printer info - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param pol Policy handle on printer to set info. - * @param level Information level to set. - * @param ctr Pointer to structure holding printer information. - * @param command Specifies the action performed. See - * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_13ua.asp - * for details. - * - */ - -WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, uint32 level, - PRINTER_INFO_CTR *ctr, uint32 command) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_SETPRINTER q; - SPOOL_R_SETPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise input parameters */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - make_spoolss_q_setprinter(mem_ctx, &q, pol, level, ctr, command); - - /* Marshall data and send request */ - - if (!spoolss_io_q_setprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_SETPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_setprinter("", &r, &rbuf, 0)) - goto done; - - result = r.status; - -done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - GetPrinterDriver() - ********************************************************************************/ -/** Get installed printer drivers for a given printer - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param offered Buffer size offered in the request. - * @param needed Number of bytes needed to complete the request. - * may be NULL. - * - * @param pol Pointer to an open policy handle for the printer - * opened with cli_spoolss_open_printer_ex(). - * @param level Requested information level. - * @param env The print environment or archictecture. This is - * "Windows NT x86" for NT4. - * @param ctr Returned printer driver information. - */ - -WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *pol, uint32 level, - char *env, PRINTER_DRIVER_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETPRINTERDRIVER2 q; - SPOOL_R_GETPRINTERDRIVER2 r; - NEW_BUFFER buffer; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - fstrcpy (server, cli->desthost); - strupper (server); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - make_spoolss_q_getprinterdriver2(&q, pol, env, level, 2, 2, - &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getprinterdriver2 ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVER2, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (spoolss_io_r_getprinterdriver2 ("", &r, &rbuf, 0)) { - if (needed) - *needed = r.needed; - } - - result = r.status; - - /* Return output parameters */ - - if (!W_ERROR_IS_OK(result)) - goto done; - - if (!ctr) - goto done; - - switch (level) { - case 1: - decode_printer_driver_1(mem_ctx, r.buffer, 1, &ctr->info1); - break; - case 2: - decode_printer_driver_2(mem_ctx, r.buffer, 1, &ctr->info2); - break; - case 3: - decode_printer_driver_3(mem_ctx, r.buffer, 1, &ctr->info3); - break; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - EnumPrinterDrivers() - ********************************************************************************/ -/********************************************************************** - * Get installed printer drivers for a given printer - */ -WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 level, char *env, - uint32 *num_drivers, - PRINTER_DRIVER_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMPRINTERDRIVERS q; - SPOOL_R_ENUMPRINTERDRIVERS r; - NEW_BUFFER buffer; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Write the request */ - - make_spoolss_q_enumprinterdrivers(&q, server, env, level, &buffer, - offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enumprinterdrivers ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli, SPOOLSS_ENUMPRINTERDRIVERS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_enumprinterdrivers ("", &r, &rbuf, 0)) - goto done; - - if (needed) - *needed = r.needed; - - if (num_drivers) - *num_drivers = r.returned; - - result = r.status; - - /* Return output parameters */ - - if (W_ERROR_IS_OK(result) && (r.returned != 0)) { - *num_drivers = r.returned; - - switch (level) { - case 1: - decode_printer_driver_1(mem_ctx, r.buffer, r.returned, &ctr->info1); - break; - case 2: - decode_printer_driver_2(mem_ctx, r.buffer, r.returned, &ctr->info2); - break; - case 3: - decode_printer_driver_3(mem_ctx, r.buffer, r.returned, &ctr->info3); - break; - } - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - - -/********************************************************************************* - Win32 API - GetPrinterDriverDirectory() - ********************************************************************************/ -/********************************************************************** - * Get installed printer drivers for a given printer - */ -WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - uint32 level, char *env, - DRIVER_DIRECTORY_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETPRINTERDRIVERDIR q; - SPOOL_R_GETPRINTERDRIVERDIR r; - NEW_BUFFER buffer; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Write the request */ - - make_spoolss_q_getprinterdriverdir(&q, server, env, level, &buffer, - offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getprinterdriverdir ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVERDIRECTORY, - &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (spoolss_io_r_getprinterdriverdir ("", &r, &rbuf, 0)) { - if (needed) - *needed = r.needed; - } - - /* Return output parameters */ - - result = r.status; - - if (W_ERROR_IS_OK(result)) { - switch (level) { - case 1: - decode_printerdriverdir_1(mem_ctx, r.buffer, 1, - &ctr->info1); - break; - } - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - AddPrinterDriver() - ********************************************************************************/ -/********************************************************************** - * Install a printer driver - */ -WERROR cli_spoolss_addprinterdriver (struct cli_state *cli, - TALLOC_CTX *mem_ctx, uint32 level, - PRINTER_DRIVER_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ADDPRINTERDRIVER q; - SPOOL_R_ADDPRINTERDRIVER r; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - - /* Initialise input parameters */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Write the request */ - - make_spoolss_q_addprinterdriver (mem_ctx, &q, server, level, ctr); - - /* Marshall data and send request */ - - if (!spoolss_io_q_addprinterdriver ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTERDRIVER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_addprinterdriver ("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - -done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - AddPrinter() - ********************************************************************************/ -/********************************************************************** - * Install a printer - */ -WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 level, PRINTER_INFO_CTR*ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ADDPRINTEREX q; - SPOOL_R_ADDPRINTEREX r; - WERROR result = W_ERROR(ERRgeneral); - fstring server, - client, - user; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - slprintf (client, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (client); - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - fstrcpy (user, cli->user_name); - - /* Initialise input parameters */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Write the request */ - - make_spoolss_q_addprinterex (mem_ctx, &q, server, client, user, - level, ctr); - - /* Marshall data and send request */ - - if (!spoolss_io_q_addprinterex ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTEREX, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_addprinterex ("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - DeltePrinterDriver() - ********************************************************************************/ -/********************************************************************** - * Delete a Printer Driver from the server (does not remove - * the driver files - */ -WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli, - TALLOC_CTX *mem_ctx, char *arch, - char *driver) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_DELETEPRINTERDRIVER q; - SPOOL_R_DELETEPRINTERDRIVER r; - WERROR result = W_ERROR(ERRgeneral); - fstring server; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - - /* Initialise input parameters */ - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); - strupper (server); - - /* Write the request */ - - make_spoolss_q_deleteprinterdriver(mem_ctx, &q, server, arch, driver); - - /* Marshall data and send request */ - - if (!spoolss_io_q_deleteprinterdriver ("", &q, &qbuf, 0) || - !rpc_api_pipe_req (cli,SPOOLSS_DELETEPRINTERDRIVER , &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_deleteprinterdriver ("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/********************************************************************************* - Win32 API - GetPrinterProcessorDirectory() - ********************************************************************************/ - -WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - char *name, char *environment, - fstring procdir) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETPRINTPROCESSORDIRECTORY q; - SPOOL_R_GETPRINTPROCESSORDIRECTORY r; - int level = 1; - WERROR result = W_ERROR(ERRgeneral); - NEW_BUFFER buffer; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_buffer(&buffer, offered, mem_ctx); - - make_spoolss_q_getprintprocessordirectory( - &q, name, environment, level, &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getprintprocessordirectory("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTPROCESSORDIRECTORY, - &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_getprintprocessordirectory("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (needed) - *needed = r.needed; - - if (W_ERROR_IS_OK(result)) - fstrcpy(procdir, "Not implemented!"); - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** Add a form to a printer. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param handle Policy handle opened with cli_spoolss_open_printer_ex - * or cli_spoolss_addprinterex. - * @param level Form info level to add - should always be 1. - * @param form A pointer to the form to be added. - * - */ - -WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, FORM *form) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ADDFORM q; - SPOOL_R_ADDFORM r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_addform(&q, handle, level, form); - - /* Marshall data and send request */ - - if (!spoolss_io_q_addform("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ADDFORM, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_addform("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** Set a form on a printer. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param handle Policy handle opened with cli_spoolss_open_printer_ex - * or cli_spoolss_addprinterex. - * @param level Form info level to set - should always be 1. - * @param form A pointer to the form to be set. - * - */ - -WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, uint32 level, char *form_name, - FORM *form) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_SETFORM q; - SPOOL_R_SETFORM r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_setform(&q, handle, level, form_name, form); - - /* Marshall data and send request */ - - if (!spoolss_io_q_setform("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_SETFORM, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_setform("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (!W_ERROR_IS_OK(result)) - goto done; - - - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** Get a form on a printer. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param handle Policy handle opened with cli_spoolss_open_printer_ex - * or cli_spoolss_addprinterex. - * @param formname Name of the form to get - * @param level Form info level to get - should always be 1. - * - */ - -WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *handle, char *formname, uint32 level, - FORM_1 *form) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETFORM q; - SPOOL_R_GETFORM r; - WERROR result = W_ERROR(ERRgeneral); - NEW_BUFFER buffer; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_getform(&q, handle, formname, level, &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getform("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_GETFORM, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_getform("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (needed) - *needed = r.needed; - - if (W_ERROR_IS_OK(result)) - smb_io_form_1("", r.buffer, form, 0); - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** Delete a form on a printer. - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param handle Policy handle opened with cli_spoolss_open_printer_ex - * or cli_spoolss_addprinterex. - * @param form The name of the form to delete. - * - */ - -WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *handle, char *form_name) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_DELETEFORM q; - SPOOL_R_DELETEFORM r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_deleteform(&q, handle, form_name); - - /* Marshall data and send request */ - - if (!spoolss_io_q_deleteform("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_DELETEFORM, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_deleteform("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -static void decode_forms_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, - uint32 num_forms, FORM_1 **forms) -{ - int i; - - *forms = (FORM_1 *)talloc(mem_ctx, num_forms * sizeof(FORM_1)); - buffer->prs.data_offset = 0; - - for (i = 0; i < num_forms; i++) - smb_io_form_1("", buffer, &((*forms)[i]), 0); -} - -/** Enumerate forms - * - * @param cli Pointer to client state structure which is open - * on the SPOOLSS pipe. - * @param mem_ctx Pointer to an initialised talloc context. - * - * @param offered Buffer size offered in the request. - * @param needed Number of bytes needed to complete the request. - * may be NULL. - * or cli_spoolss_addprinterex. - * @param level Form info level to get - should always be 1. - * @param handle Open policy handle - * - */ - -WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *handle, int level, uint32 *num_forms, - FORM_1 **forms) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMFORMS q; - SPOOL_R_ENUMFORMS r; - WERROR result = W_ERROR(ERRgeneral); - NEW_BUFFER buffer; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_enumforms(&q, handle, level, &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enumforms("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMFORMS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_enumforms("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (needed) - *needed = r.needed; - - if (num_forms) - *num_forms = r.numofforms; - - decode_forms_1(mem_ctx, r.buffer, *num_forms, forms); - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -static void decode_jobs_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, - uint32 num_jobs, JOB_INFO_1 **jobs) -{ - uint32 i; - - *jobs = (JOB_INFO_1 *)talloc(mem_ctx, num_jobs * sizeof(JOB_INFO_1)); - buffer->prs.data_offset = 0; - - for (i = 0; i < num_jobs; i++) - smb_io_job_info_1("", buffer, &((*jobs)[i]), 0); -} - -static void decode_jobs_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, - uint32 num_jobs, JOB_INFO_2 **jobs) -{ - uint32 i; - - *jobs = (JOB_INFO_2 *)talloc(mem_ctx, num_jobs * sizeof(JOB_INFO_2)); - buffer->prs.data_offset = 0; - - for (i = 0; i < num_jobs; i++) - smb_io_job_info_2("", buffer, &((*jobs)[i]), 0); -} - -/* Enumerate jobs */ - -WERROR cli_spoolss_enumjobs(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *hnd, uint32 level, uint32 firstjob, - uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMJOBS q; - SPOOL_R_ENUMJOBS r; - WERROR result = W_ERROR(ERRgeneral); - NEW_BUFFER buffer; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_enumjobs(&q, hnd, firstjob, num_jobs, level, &buffer, - offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enumjobs("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMJOBS, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_enumjobs("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (needed) - *needed = r.needed; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - *returned = r.returned; - - switch(level) { - case 1: - decode_jobs_1(mem_ctx, r.buffer, r.returned, - ctr->job.job_info_1); - break; - case 2: - decode_jobs_2(mem_ctx, r.buffer, r.returned, - ctr->job.job_info_2); - break; - default: - DEBUG(3, ("unsupported info level %d", level)); - break; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Set job */ - -WERROR cli_spoolss_setjob(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, uint32 jobid, uint32 level, - uint32 command) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_SETJOB q; - SPOOL_R_SETJOB r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_setjob(&q, hnd, jobid, level, command); - - /* Marshall data and send request */ - - if (!spoolss_io_q_setjob("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_SETJOB, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_setjob("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Get job */ - -WERROR cli_spoolss_getjob(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *hnd, uint32 jobid, uint32 level, - JOB_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETJOB q; - SPOOL_R_GETJOB r; - WERROR result = W_ERROR(ERRgeneral); - NEW_BUFFER buffer; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - init_buffer(&buffer, offered, mem_ctx); - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_getjob(&q, hnd, jobid, level, &buffer, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getjob("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_GETJOB, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_getjob("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (needed) - *needed = r.needed; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - switch(level) { - case 1: - decode_jobs_1(mem_ctx, r.buffer, 1, ctr->job.job_info_1); - break; - case 2: - decode_jobs_2(mem_ctx, r.buffer, 1, ctr->job.job_info_2); - break; - default: - DEBUG(3, ("unsupported info level %d", level)); - break; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Startpageprinter. Sent to notify the spooler when a page is about to be - sent to a printer. */ - -WERROR cli_spoolss_startpageprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_STARTPAGEPRINTER q; - SPOOL_R_STARTPAGEPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_startpageprinter(&q, hnd); - - /* Marshall data and send request */ - - if (!spoolss_io_q_startpageprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_STARTPAGEPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_startpageprinter("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Endpageprinter. Sent to notify the spooler when a page has finished - being sent to a printer. */ - -WERROR cli_spoolss_endpageprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENDPAGEPRINTER q; - SPOOL_R_ENDPAGEPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_endpageprinter(&q, hnd); - - /* Marshall data and send request */ - - if (!spoolss_io_q_endpageprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENDPAGEPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_endpageprinter("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Startdocprinter. Sent to notify the spooler that a document is about - to be spooled for printing. */ - -WERROR cli_spoolss_startdocprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, char *docname, - char *outputfile, char *datatype, - uint32 *jobid) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_STARTDOCPRINTER q; - SPOOL_R_STARTDOCPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - uint32 level = 1; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_startdocprinter(&q, hnd, level, docname, outputfile, - datatype); - - /* Marshall data and send request */ - - if (!spoolss_io_q_startdocprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_STARTDOCPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_startdocprinter("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - if (W_ERROR_IS_OK(result)) - *jobid = r.jobid; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Enddocprinter. Sent to notify the spooler that a document has finished - being spooled. */ - -WERROR cli_spoolss_enddocprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENDDOCPRINTER q; - SPOOL_R_ENDDOCPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_enddocprinter(&q, hnd); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enddocprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENDDOCPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_enddocprinter("", &r, &rbuf, 0)) - goto done; - - /* Return output parameters */ - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Get printer data */ - -WERROR cli_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 offered, uint32 *needed, - POLICY_HND *hnd, char *valuename, - uint32 *data_type, char **data, - uint32 *data_size) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_GETPRINTERDATA q; - SPOOL_R_GETPRINTERDATA r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_getprinterdata(&q, hnd, valuename, offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_getprinterdata("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTERDATA, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_getprinterdata("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (needed) - *needed = r.needed; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - /* Return output parameters */ - - if (data_type) - *data_type = r.type; - - if (data) { - *data = (char *)talloc(mem_ctx, r.needed); - memcpy(*data, r.data, r.needed); - } - - if (data_size) - *data_size = r.needed; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Set printer data */ - -WERROR cli_spoolss_setprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, char *value, - uint32 data_type, char *data, - uint32 data_size) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_SETPRINTERDATA q; - SPOOL_R_SETPRINTERDATA r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_setprinterdata(&q, hnd, value, data, data_size); - - /* Marshall data and send request */ - - if (!spoolss_io_q_setprinterdata("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_SETPRINTERDATA, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_setprinterdata("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Enum printer data */ - -WERROR cli_spoolss_enumprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, uint32 ndx, - uint32 value_offered, uint32 data_offered, - uint32 *value_needed, uint32 *data_needed, - char **value, uint32 *data_type, char **data, - uint32 *data_size) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_ENUMPRINTERDATA q; - SPOOL_R_ENUMPRINTERDATA r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_enumprinterdata(&q, hnd, ndx, value_offered, data_offered); - - /* Marshall data and send request */ - - if (!spoolss_io_q_enumprinterdata("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERDATA, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_enumprinterdata("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - /* Return data */ - - if (value_needed) - *value_needed = r.realvaluesize; - - if (data_needed) - *data_needed = r.realdatasize; - - if (data_type) - *data_type = r.type; - - if (value) { - fstring the_value; - - rpcstr_pull(the_value, r.value, sizeof(the_value), -1, - STR_TERMINATE); - - *value = talloc_strdup(mem_ctx, the_value); - } - - if (data) - *data = talloc_memdup(mem_ctx, r.data, r.realdatasize); - - if (data_size) - *data_size = r.realdatasize; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Write data to printer */ - -WERROR cli_spoolss_writeprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, uint32 data_size, char *data, - uint32 *num_written) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_WRITEPRINTER q; - SPOOL_R_WRITEPRINTER r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_writeprinter(&q, hnd, data_size, data); - - /* Marshall data and send request */ - - if (!spoolss_io_q_writeprinter("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_WRITEPRINTER, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_writeprinter("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - if (num_written) - *num_written = r.buffer_written; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/* Delete printer data */ - -WERROR cli_spoolss_deleteprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, - POLICY_HND *hnd, char *valuename) -{ - prs_struct qbuf, rbuf; - SPOOL_Q_DELETEPRINTERDATA q; - SPOOL_R_DELETEPRINTERDATA r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - make_spoolss_q_deleteprinterdata(&q, hnd, valuename); - - /* Marshall data and send request */ - - if (!spoolss_io_q_deleteprinterdata("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SPOOLSS_DELETEPRINTERDATA, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!spoolss_io_r_deleteprinterdata("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(r.status)) - goto done; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -/** @} **/ diff --git a/source3/libsmb/cli_srvsvc.c b/source3/libsmb/cli_srvsvc.c deleted file mode 100644 index 1bdd19620b4..00000000000 --- a/source3/libsmb/cli_srvsvc.c +++ /dev/null @@ -1,445 +0,0 @@ -/* - Unix SMB/CIFS implementation. - NT Domain Authentication SMB / MSRPC client - Copyright (C) Andrew Tridgell 1994-2000 - Copyright (C) Luke Kenneth Casson Leighton 1996-2000 - Copyright (C) Tim Potter 2001 - Copyright (C) Jim McDonough 2002 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - -NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, - TALLOC_CTX *mem_ctx, - uint32 switch_value, SRV_INFO_CTR *ctr) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_SRV_GET_INFO q; - SRV_R_NET_SRV_GET_INFO r; - NTSTATUS result; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_srv_q_net_srv_get_info(&q, cli->srv_name_slash, switch_value); - - /* Marshall data and send request */ - - if (!srv_io_q_net_srv_get_info("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &qbuf, &rbuf)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - /* Unmarshall response */ - - r.ctr = ctr; - - if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0)) { - result = NT_STATUS_UNSUCCESSFUL; - goto done; - } - - result = werror_to_ntstatus(r.status); - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -WERROR cli_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 info_level, SRV_SHARE_INFO_CTR *ctr, - int preferred_len, ENUM_HND *hnd) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_SHARE_ENUM q; - SRV_R_NET_SHARE_ENUM r; - WERROR result = W_ERROR(ERRgeneral); - int i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_srv_q_net_share_enum( - &q, cli->srv_name_slash, info_level, preferred_len, hnd); - - /* Marshall data and send request */ - - if (!srv_io_q_net_share_enum("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_SHARE_ENUM_ALL, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!srv_io_r_net_share_enum("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(result)) - goto done; - - /* Oh yuck yuck yuck - we have to copy all the info out of the - SRV_SHARE_INFO_CTR in the SRV_R_NET_SHARE_ENUM as when we do a - prs_mem_free() it will all be invalidated. The various share - info structures suck badly too. This really is gross. */ - - ZERO_STRUCTP(ctr); - - if (!r.ctr.num_entries) - goto done; - - ctr->info_level = info_level; - ctr->num_entries = r.ctr.num_entries; - - switch(info_level) { - case 1: - ctr->share.info1 = (SRV_SHARE_INFO_1 *)talloc( - mem_ctx, sizeof(SRV_SHARE_INFO_1) * ctr->num_entries); - - memset(ctr->share.info1, 0, sizeof(SRV_SHARE_INFO_1)); - - for (i = 0; i < ctr->num_entries; i++) { - SRV_SHARE_INFO_1 *info1 = &ctr->share.info1[i]; - char *s; - - /* Copy pointer crap */ - - memcpy(&info1->info_1, &r.ctr.share.info1[i].info_1, - sizeof(SH_INFO_1)); - - /* Duplicate strings */ - - s = unistr2_tdup(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_netname); - if (s) - init_unistr2(&info1->info_1_str.uni_netname, s, strlen(s) + 1); - - s = unistr2_tdup(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_remark); - if (s) - init_unistr2(&info1->info_1_str.uni_remark, s, strlen(s) + 1); - - } - - break; - case 2: - ctr->share.info2 = (SRV_SHARE_INFO_2 *)talloc( - mem_ctx, sizeof(SRV_SHARE_INFO_2) * ctr->num_entries); - - memset(ctr->share.info2, 0, sizeof(SRV_SHARE_INFO_2)); - - for (i = 0; i < ctr->num_entries; i++) { - SRV_SHARE_INFO_2 *info2 = &ctr->share.info2[i]; - char *s; - - /* Copy pointer crap */ - - memcpy(&info2->info_2, &r.ctr.share.info2[i].info_2, - sizeof(SH_INFO_2)); - - /* Duplicate strings */ - - s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_netname); - if (s) - init_unistr2(&info2->info_2_str.uni_netname, s, strlen(s) + 1); - - s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_remark); - if (s) - init_unistr2(&info2->info_2_str.uni_remark, s, strlen(s) + 1); - - s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_path); - if (s) - init_unistr2(&info2->info_2_str.uni_path, s, strlen(s) + 1); - - s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_passwd); - if (s) - init_unistr2(&info2->info_2_str.uni_passwd, s, strlen(s) + 1); - } - break; - } - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -WERROR cli_srvsvc_net_share_del(struct cli_state *cli, TALLOC_CTX *mem_ctx, - const char *sharename) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_SHARE_DEL q; - SRV_R_NET_SHARE_DEL r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_srv_q_net_share_del(&q, cli->srv_name_slash, sharename); - - /* Marshall data and send request */ - - if (!srv_io_q_net_share_del("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_SHARE_DEL, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!srv_io_r_net_share_del("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -WERROR cli_srvsvc_net_share_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *netname, uint32 type, char *remark, - uint32 perms, uint32 max_uses, uint32 num_uses, - char *path, char *passwd) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_SHARE_ADD q; - SRV_R_NET_SHARE_ADD r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - init_srv_q_net_share_add(&q,cli->srv_name_slash, netname, type, remark, - perms, max_uses, num_uses, path, passwd); - - /* Marshall data and send request */ - - if (!srv_io_q_net_share_add("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_SHARE_ADD, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!srv_io_r_net_share_add("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -WERROR cli_srvsvc_net_remote_tod(struct cli_state *cli, TALLOC_CTX *mem_ctx, - char *server, TIME_OF_DAY_INFO *tod) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_REMOTE_TOD q; - SRV_R_NET_REMOTE_TOD r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_srv_q_net_remote_tod(&q, cli->srv_name_slash); - - /* Marshall data and send request */ - - if (!srv_io_q_net_remote_tod("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_REMOTE_TOD, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - r.tod = tod; - - if (!srv_io_r_net_remote_tod("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(result)) - goto done; - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -WERROR cli_srvsvc_net_file_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 file_level, const char *user_name, - SRV_FILE_INFO_CTR *ctr, int preferred_len, - ENUM_HND *hnd) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_FILE_ENUM q; - SRV_R_NET_FILE_ENUM r; - WERROR result = W_ERROR(ERRgeneral); - int i; - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_srv_q_net_file_enum(&q, cli->srv_name_slash, NULL, user_name, - file_level, ctr, preferred_len, hnd); - - /* Marshall data and send request */ - - if (!srv_io_q_net_file_enum("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_FILE_ENUM, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!srv_io_r_net_file_enum("", &r, &rbuf, 0)) - goto done; - - result = r.status; - - if (!W_ERROR_IS_OK(result)) - goto done; - - /* copy the data over to the ctr */ - - ZERO_STRUCTP(ctr); - - ctr->switch_value = file_level; - - ctr->num_entries = ctr->num_entries2 = r.ctr.num_entries; - - switch(file_level) { - case 3: - ctr->file.info3 = (SRV_FILE_INFO_3 *)talloc( - mem_ctx, sizeof(SRV_FILE_INFO_3) * ctr->num_entries); - - memset(ctr->file.info3, 0, - sizeof(SRV_FILE_INFO_3) * ctr->num_entries); - - for (i = 0; i < r.ctr.num_entries; i++) { - SRV_FILE_INFO_3 *info3 = &ctr->file.info3[i]; - char *s; - - /* Copy pointer crap */ - - memcpy(&info3->info_3, &r.ctr.file.info3[i].info_3, - sizeof(FILE_INFO_3)); - - /* Duplicate strings */ - - s = unistr2_tdup(mem_ctx, &r.ctr.file.info3[i].info_3_str.uni_path_name); - if (s) - init_unistr2(&info3->info_3_str.uni_path_name, s, strlen(s) + 1); - - s = unistr2_tdup(mem_ctx, &r.ctr.file.info3[i].info_3_str.uni_user_name); - if (s) - init_unistr2(&info3->info_3_str.uni_user_name, s, strlen(s) + 1); - - } - - break; - } - - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - - return result; -} - -WERROR cli_srvsvc_net_file_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, - uint32 file_id) -{ - prs_struct qbuf, rbuf; - SRV_Q_NET_FILE_CLOSE q; - SRV_R_NET_FILE_CLOSE r; - WERROR result = W_ERROR(ERRgeneral); - - ZERO_STRUCT(q); - ZERO_STRUCT(r); - - /* Initialise parse structures */ - - prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* Initialise input parameters */ - - init_srv_q_net_file_close(&q, cli->srv_name_slash, file_id); - - /* Marshall data and send request */ - - if (!srv_io_q_net_file_close("", &q, &qbuf, 0) || - !rpc_api_pipe_req(cli, SRV_NET_FILE_CLOSE, &qbuf, &rbuf)) - goto done; - - /* Unmarshall response */ - - if (!srv_io_r_net_file_close("", &r, &rbuf, 0)) - goto done; - - result = r.status; - done: - prs_mem_free(&qbuf); - prs_mem_free(&rbuf); - return result; -} diff --git a/source3/libsmb/cli_wkssvc.c b/source3/libsmb/cli_wkssvc.c deleted file mode 100644 index 97b948bf628..00000000000 --- a/source3/libsmb/cli_wkssvc.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - Unix SMB/CIFS implementation. - NT Domain Authentication SMB / MSRPC client - Copyright (C) Andrew Tridgell 1994-2000 - Copyright (C) Luke Kenneth Casson Leighton 1996-2000 - Copyright (C) Tim Potter 2001 - Copytight (C) Rafal Szczesniak 2002 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" - -/** - * WksQueryInfo rpc call (like query for server's capabilities) - * - * @param initialised client structure with \PIPE\wkssvc opened - * @param mem_ctx memory context assigned to this rpc binding - * @param wks100 WksQueryInfo structure - * - * @return NTSTATUS of rpc call - */ - -NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, - WKS_INFO_100 *wks100) -{ - prs_struct buf; - prs_struct rbuf; - WKS_Q_QUERY_INFO q_o; - WKS_R_QUERY_INFO r_o; - - if (cli == NULL || wks100 == NULL) - return NT_STATUS_UNSUCCESSFUL; - - /* init rpc parse structures */ - prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - DEBUG(4, ("WksQueryInfo\n")); - - /* init query structure with rpc call arguments */ - init_wks_q_query_info(&q_o, cli->desthost, 100); - - /* marshall data */ - if (!wks_io_q_query_info("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return NT_STATUS_UNSUCCESSFUL; - } - - /* actual rpc call over \PIPE\wkssvc */ - if (!rpc_api_pipe_req(cli, WKS_QUERY_INFO, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return NT_STATUS_UNSUCCESSFUL; - } - - prs_mem_free(&buf); - - r_o.wks100 = wks100; - - /* get call results from response buffer */ - if (!wks_io_r_query_info("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return NT_STATUS_UNSUCCESSFUL; - } - - /* check returnet status code */ - if (NT_STATUS_IS_ERR(r_o.status)) { - /* report the error */ - DEBUG(0,("WKS_R_QUERY_INFO: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return r_o.status; - } - - /* do clean up */ - prs_mem_free(&rbuf); - - return NT_STATUS_OK; -} - diff --git a/source3/libsmb/cli_dfs.c b/source3/rpc_client/cli_dfs.c similarity index 100% rename from source3/libsmb/cli_dfs.c rename to source3/rpc_client/cli_dfs.c diff --git a/source3/libsmb/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c similarity index 100% rename from source3/libsmb/cli_lsarpc.c rename to source3/rpc_client/cli_lsarpc.c diff --git a/source3/libsmb/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c similarity index 100% rename from source3/libsmb/cli_netlogon.c rename to source3/rpc_client/cli_netlogon.c diff --git a/source3/rpc_client/cli_reg.c b/source3/rpc_client/cli_reg.c index 07001f13bd7..aaf18882f76 100644 --- a/source3/rpc_client/cli_reg.c +++ b/source3/rpc_client/cli_reg.c @@ -1,1074 +1,102 @@ /* - * Unix SMB/CIFS implementation. - * RPC Pipe client / server routines - * Copyright (C) Andrew Tridgell 1992-1998, - * Copyright (C) Luke Kenneth Casson Leighton 1996-1998, - * Copyright (C) Paul Ashton 1997-1998. - * Copyright (C) Jeremy Allison 1999. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - + Unix SMB/CIFS implementation. + RPC Pipe client + + Copyright (C) Andrew Tridgell 1992-1998, + Copyright (C) Luke Kenneth Casson Leighton 1996-1998, + Copyright (C) Paul Ashton 1997-1998. + Copyright (C) Jeremy Allison 1999. + Copyright (C) Simo Sorce 2001 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ #include "includes.h" -#undef DBGC_CLASS -#define DBGC_CLASS DBGC_RPC_CLI +/* Shutdown a server */ -/**************************************************************************** -do a REG Open Policy -****************************************************************************/ -BOOL do_reg_connect(struct cli_state *cli, char *full_keyname, char *key_name, - POLICY_HND *reg_hnd) +NTSTATUS cli_reg_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx, + const char *msg, uint32 timeout, uint16 flags) { - BOOL res = True; - uint32 reg_type = 0; + prs_struct qbuf; + prs_struct rbuf; + REG_Q_SHUTDOWN q_s; + REG_R_SHUTDOWN r_s; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - if (full_keyname == NULL) - return False; + if (msg == NULL) return NT_STATUS_INVALID_PARAMETER; - ZERO_STRUCTP(reg_hnd); + ZERO_STRUCT (q_s); + ZERO_STRUCT (r_s); - /* - * open registry receive a policy handle - */ + prs_init(&qbuf , MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - if (!reg_split_key(full_keyname, ®_type, key_name)) { - DEBUG(0,("do_reg_connect: unrecognised key name %s\n", full_keyname)); - return False; - } + /* Marshall data and send request */ - switch (reg_type) { - case HKEY_LOCAL_MACHINE: - res = res ? do_reg_open_hklm(cli, 0x84E0, 0x02000000, reg_hnd) : False; - break; + init_reg_q_shutdown(&q_s, msg, timeout, flags); + + if (!reg_io_q_shutdown("", &q_s, &qbuf, 0) || + !rpc_api_pipe_req(cli, REG_SHUTDOWN, &qbuf, &rbuf)) + goto done; - case HKEY_USERS: - res = res ? do_reg_open_hku(cli, 0x84E0, 0x02000000, reg_hnd) : False; - break; + /* Unmarshall response */ + + if(reg_io_r_shutdown("", &r_s, &rbuf, 0)) + result = r_s.status; - default: - DEBUG(0,("do_reg_connect: unrecognised hive key\n")); - return False; - } +done: + prs_mem_free(&rbuf); + prs_mem_free(&qbuf); - return res; + return result; } -/**************************************************************************** -do a REG Open Policy -****************************************************************************/ -BOOL do_reg_open_hklm(struct cli_state *cli, uint16 unknown_0, uint32 level, - POLICY_HND *hnd) + +/* Abort a server shutdown */ + +NTSTATUS cli_reg_abort_shutdown(struct cli_state * cli, TALLOC_CTX *mem_ctx) { prs_struct rbuf; - prs_struct buf; - REG_Q_OPEN_HKLM q_o; - REG_R_OPEN_HKLM r_o; + prs_struct qbuf; + REG_Q_ABORT_SHUTDOWN q_s; + REG_R_ABORT_SHUTDOWN r_s; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - if (hnd == NULL) - return False; + ZERO_STRUCT (q_s); + ZERO_STRUCT (r_s); - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); + prs_init(&qbuf , MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ - /* create and send a MSRPC command with api REG_OPEN_HKLM */ + init_reg_q_abort_shutdown(&q_s); - DEBUG(4,("REG Open HKLM\n")); - - init_reg_q_open_hklm(&q_o, unknown_0, level); - - /* turn parameters into data stream */ - if(!reg_io_q_open_hklm("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_OPEN_HKLM, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_open_hklm("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_OPEN_HKLM: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - /* ok, at last: we're happy. return the policy handle */ - *hnd = r_o.pol; + if (!reg_io_q_abort_shutdown("", &q_s, &qbuf, 0) || + !rpc_api_pipe_req(cli, REG_ABORT_SHUTDOWN, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (reg_io_r_abort_shutdown("", &r_s, &rbuf, 0)) + result = r_s.status; +done: prs_mem_free(&rbuf); + prs_mem_free(&qbuf ); - return True; -} - -/**************************************************************************** -do a REG Open HKU -****************************************************************************/ -BOOL do_reg_open_hku(struct cli_state *cli, uint16 unknown_0, uint32 level, - POLICY_HND *hnd) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_OPEN_HKU q_o; - REG_R_OPEN_HKU r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_OPEN_HKU */ - - DEBUG(4,("REG Open HKU\n")); - - init_reg_q_open_hku(&q_o, unknown_0, level); - - /* turn parameters into data stream */ - if(!reg_io_q_open_hku("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (rpc_api_pipe_req(cli, REG_OPEN_HKU, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_open_hku("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_OPEN_HKU: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - /* ok, at last: we're happy. return the policy handle */ - *hnd = r_o.pol; - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Unknown 0xB command. sent after a create key or create value. -this might be some sort of "sync" or "refresh" command, sent after -modification of the registry... -****************************************************************************/ -BOOL do_reg_flush_key(struct cli_state *cli, POLICY_HND *hnd) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_FLUSH_KEY q_o; - REG_R_FLUSH_KEY r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_FLUSH_KEY */ - - DEBUG(4,("REG Unknown 0xB\n")); - - init_reg_q_flush_key(&q_o, hnd); - - /* turn parameters into data stream */ - if(!reg_io_q_flush_key("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_FLUSH_KEY, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_flush_key("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_FLUSH_KEY: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Query Key -****************************************************************************/ -BOOL do_reg_query_key(struct cli_state *cli, POLICY_HND *hnd, - char *class, uint32 *class_len, - uint32 *num_subkeys, uint32 *max_subkeylen, - uint32 *max_subkeysize, uint32 *num_values, - uint32 *max_valnamelen, uint32 *max_valbufsize, - uint32 *sec_desc, NTTIME *mod_time) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_QUERY_KEY q_o; - REG_R_QUERY_KEY r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_QUERY_KEY */ - - DEBUG(4,("REG Query Key\n")); - - init_reg_q_query_key(&q_o, hnd, *class_len); - - /* turn parameters into data stream */ - if(!reg_io_q_query_key("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_QUERY_KEY, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_query_key("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_QUERY_KEY: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - *class_len = r_o.hdr_class.uni_max_len; - rpcstr_pull(class, &r_o.uni_class, -1, -1, 0); - *num_subkeys = r_o.num_subkeys ; - *max_subkeylen = r_o.max_subkeylen ; - *max_subkeysize = r_o.max_subkeysize; - *num_values = r_o.num_values ; - *max_valnamelen = r_o.max_valnamelen; - *max_valbufsize = r_o.max_valbufsize; - *sec_desc = r_o.sec_desc ; - *mod_time = r_o.mod_time ; - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Unknown 1A -****************************************************************************/ -BOOL do_reg_unknown_1a(struct cli_state *cli, POLICY_HND *hnd, uint32 *unk) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_UNK_1A q_o; - REG_R_UNK_1A r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_UNKNOWN_1A */ - - DEBUG(4,("REG Unknown 1a\n")); - - init_reg_q_unk_1a(&q_o, hnd); - - /* turn parameters into data stream */ - if(!reg_io_q_unk_1a("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (rpc_api_pipe_req(cli, REG_UNK_1A, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_unk_1a("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_UNK_1A: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - (*unk) = r_o.unknown; - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Query Info -****************************************************************************/ -BOOL do_reg_query_info(struct cli_state *cli, POLICY_HND *hnd, - char *key_value, uint32* key_type) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_INFO q_o; - REG_R_INFO r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_INFO */ - - DEBUG(4,("REG Query Info\n")); - - init_reg_q_info(&q_o, hnd, "ProductType"); - - /* turn parameters into data stream */ - if(!reg_io_q_info("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_INFO, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_info("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if ( r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_INFO: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - /*fstrcpy(key_value, dos_buffer2_to_str(r_o.uni_val));*/ - rpcstr_pull(key_value, r_o.uni_val->buffer, sizeof(fstring), r_o.uni_val->buf_len, 0); - *key_type = r_o.type; - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Set Key Security -****************************************************************************/ -BOOL do_reg_set_key_sec(struct cli_state *cli, POLICY_HND *hnd, SEC_DESC_BUF *sec_desc_buf) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_SET_KEY_SEC q_o; - REG_R_SET_KEY_SEC r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_SET_KEY_SEC */ - - DEBUG(4,("REG Set Key security.\n")); - - init_reg_q_set_key_sec(&q_o, hnd, sec_desc_buf); - - /* turn parameters into data stream */ - if(!reg_io_q_set_key_sec("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_SET_KEY_SEC, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_set_key_sec("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Query Key Security -****************************************************************************/ - -BOOL do_reg_get_key_sec(struct cli_state *cli, POLICY_HND *hnd, uint32 *sec_buf_size, SEC_DESC_BUF **ppsec_desc_buf) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_GET_KEY_SEC q_o; - REG_R_GET_KEY_SEC r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_GET_KEY_SEC */ - - DEBUG(4,("REG query key security. buf_size: %d\n", *sec_buf_size)); - - init_reg_q_get_key_sec(&q_o, hnd, *sec_buf_size, NULL); - - /* turn parameters into data stream */ - if(!reg_io_q_get_key_sec("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_GET_KEY_SEC, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_get_key_sec("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status == 0x0000007a) { - /* - * get the maximum buffer size: it was too small - */ - (*sec_buf_size) = r_o.hdr_sec.buf_max_len; - DEBUG(5,("sec_buf_size too small. use %d\n", *sec_buf_size)); - } else if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_GET_KEY_SEC: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } else { - (*sec_buf_size) = r_o.data->len; - *ppsec_desc_buf = r_o.data; - } - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Delete Value -****************************************************************************/ -BOOL do_reg_delete_val(struct cli_state *cli, POLICY_HND *hnd, char *val_name) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_DELETE_VALUE q_o; - REG_R_DELETE_VALUE r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_DELETE_VALUE */ - - DEBUG(4,("REG Delete Value: %s\n", val_name)); - - init_reg_q_delete_val(&q_o, hnd, val_name); - - /* turn parameters into data stream */ - if(!reg_io_q_delete_val("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (rpc_api_pipe_req(cli, REG_DELETE_VALUE, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_delete_val("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_DELETE_VALUE: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Delete Key -****************************************************************************/ -BOOL do_reg_delete_key(struct cli_state *cli, POLICY_HND *hnd, char *key_name) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_DELETE_KEY q_o; - REG_R_DELETE_KEY r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_DELETE_KEY */ - - DEBUG(4,("REG Delete Key: %s\n", key_name)); - - init_reg_q_delete_key(&q_o, hnd, key_name); - - /* turn parameters into data stream */ - if(!reg_io_q_delete_key("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_DELETE_KEY, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_delete_key("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_DELETE_KEY: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Create Key -****************************************************************************/ -BOOL do_reg_create_key(struct cli_state *cli, POLICY_HND *hnd, - char *key_name, char *key_class, - SEC_ACCESS *sam_access, - POLICY_HND *key) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_CREATE_KEY q_o; - REG_R_CREATE_KEY r_o; - SEC_DESC *sec = NULL; - SEC_DESC_BUF *sec_buf = NULL; - size_t sec_len; - - ZERO_STRUCT(q_o); - - if (hnd == NULL) - return False; - - /* create and send a MSRPC command with api REG_CREATE_KEY */ - - DEBUG(4,("REG Create Key: %s %s 0x%08x\n", key_name, key_class, - sam_access != NULL ? sam_access->mask : 0)); - - if((sec = make_sec_desc( cli->mem_ctx, 1, NULL, NULL, NULL, NULL, &sec_len)) == NULL) { - DEBUG(0,("make_sec_desc : malloc fail.\n")); - return False; - } - - DEBUG(10,("make_sec_desc: len = %d\n", (int)sec_len)); - - if((sec_buf = make_sec_desc_buf( cli->mem_ctx, (int)sec_len, sec)) == NULL) { - DEBUG(0,("make_sec_desc : malloc fail (1)\n")); - return False; - } - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - init_reg_q_create_key(&q_o, hnd, key_name, key_class, sam_access, sec_buf); - - /* turn parameters into data stream */ - if(!reg_io_q_create_key("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (rpc_api_pipe_req(cli, REG_CREATE_KEY, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_create_key("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_CREATE_KEY: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - *key = r_o.key_pol; - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Enum Key -****************************************************************************/ -BOOL do_reg_enum_key(struct cli_state *cli, POLICY_HND *hnd, - int key_index, char *key_name, - uint32 *unk_1, uint32 *unk_2, - time_t *mod_time) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_ENUM_KEY q_o; - REG_R_ENUM_KEY r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_ENUM_KEY */ - - DEBUG(4,("REG Enum Key\n")); - - init_reg_q_enum_key(&q_o, hnd, key_index); - - /* turn parameters into data stream */ - if(!reg_io_q_enum_key("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_ENUM_KEY, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_enum_key("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_ENUM_KEY: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - (*unk_1) = r_o.unknown_1; - (*unk_2) = r_o.unknown_2; - rpcstr_pull(key_name, r_o.key_name.str.buffer, -1, -1, 0); - (*mod_time) = nt_time_to_unix(&r_o.time); - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Create Value -****************************************************************************/ -BOOL do_reg_create_val(struct cli_state *cli, POLICY_HND *hnd, - char *val_name, uint32 type, BUFFER3 *data) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_CREATE_VALUE q_o; - REG_R_CREATE_VALUE r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_CREATE_VALUE */ - - DEBUG(4,("REG Create Value: %s\n", val_name)); - - init_reg_q_create_val(&q_o, hnd, val_name, type, data); - - /* turn parameters into data stream */ - if(!reg_io_q_create_val("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_CREATE_VALUE, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_create_val("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_CREATE_VALUE: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Enum Value -****************************************************************************/ -BOOL do_reg_enum_val(struct cli_state *cli, POLICY_HND *hnd, - int val_index, int max_valnamelen, int max_valbufsize, - fstring val_name, - uint32 *val_type, BUFFER2 *value) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_ENUM_VALUE q_o; - REG_R_ENUM_VALUE r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_ENUM_VALUE */ - - DEBUG(4,("REG Enum Value\n")); - - init_reg_q_enum_val(&q_o, hnd, val_index, max_valnamelen, max_valbufsize); - - /* turn parameters into data stream */ - if(!reg_io_q_enum_val("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_ENUM_VALUE, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - r_o.buf_value = value; - - if(!reg_io_r_enum_val("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_ENUM_VALUE: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - (*val_type) = r_o.type; - rpcstr_pull(val_name, &r_o.uni_name, -1, -1, 0); - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Open Key -****************************************************************************/ -BOOL do_reg_open_entry(struct cli_state *cli, POLICY_HND *hnd, - char *key_name, uint32 unk_0, - POLICY_HND *key_hnd) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_OPEN_ENTRY q_o; - REG_R_OPEN_ENTRY r_o; - - if (hnd == NULL) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api REG_OPEN_ENTRY */ - - DEBUG(4,("REG Open Entry\n")); - - init_reg_q_open_entry(&q_o, hnd, key_name, unk_0); - - /* turn parameters into data stream */ - if(!reg_io_q_open_entry("", &q_o, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_OPEN_ENTRY, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_o); - - if(!reg_io_r_open_entry("", &r_o, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("REG_OPEN_ENTRY: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rbuf); - return False; - } - - *key_hnd = r_o.pol; - - prs_mem_free(&rbuf); - - return True; -} - -/**************************************************************************** -do a REG Close -****************************************************************************/ -BOOL do_reg_close(struct cli_state *cli, POLICY_HND *hnd) -{ - prs_struct rbuf; - prs_struct buf; - REG_Q_CLOSE q_c; - REG_R_CLOSE r_c; - - if (hnd == NULL) - return False; - - /* create and send a MSRPC command with api REG_CLOSE */ - - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("REG Close\n")); - - /* store the parameters */ - init_reg_q_close(&q_c, hnd); - - /* turn parameters into data stream */ - if(!reg_io_q_close("", &q_c, &buf, 0)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, REG_CLOSE, &buf, &rbuf)) { - prs_mem_free(&buf); - prs_mem_free(&rbuf); - return False; - } - - prs_mem_free(&buf); - - ZERO_STRUCT(r_c); - - if(!reg_io_r_close("", &r_c, &rbuf, 0)) { - prs_mem_free(&rbuf); - return False; - } - - if (r_c.status != 0) { - /* report error code */ - DEBUG(0,("REG_CLOSE: %s\n", nt_errstr(r_c.status))); - prs_mem_free(&rbuf); - return False; - } - - /* check that the returned policy handle is all zeros */ - - if (IVAL(&r_c.pol.data1,0) || IVAL(&r_c.pol.data2,0) || SVAL(&r_c.pol.data3,0) || - SVAL(&r_c.pol.data4,0) || IVAL(r_c.pol.data5,0) || IVAL(r_c.pol.data5,4) ) { - prs_mem_free(&rbuf); - DEBUG(0,("REG_CLOSE: non-zero handle returned\n")); - return False; - } - - prs_mem_free(&rbuf); - - return True; + return result; } diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 0d4db7f88f9..6581bdbeaf3 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -1,9 +1,12 @@ /* Unix SMB/CIFS implementation. - NT Domain Authentication SMB / MSRPC client - Copyright (C) Andrew Tridgell 1994-1997 - Copyright (C) Luke Kenneth Casson Leighton 1996-1997 - Copyright (C) Jeremy Allison 1999. + RPC pipe client + Copyright (C) Tim Potter 2000-2001, + Copyright (C) Andrew Tridgell 1992-1997,2000, + Copyright (C) Luke Kenneth Casson Leighton 1996-1997,2000, + Copyright (C) Paul Ashton 1997,2000, + Copyright (C) Elrond 2000, + Copyright (C) Rafal Szczesniak 2002. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,819 +25,1380 @@ #include "includes.h" -#undef DBGC_CLASS -#define DBGC_CLASS DBGC_RPC_CLI +/* Connect to SAMR database */ -/**************************************************************************** -do a SAMR query user groups -****************************************************************************/ -BOOL get_samr_query_usergroups(struct cli_state *cli, - POLICY_HND *pol_open_domain, uint32 user_rid, - uint32 *num_groups, DOM_GID *gid) +NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol) { - POLICY_HND pol_open_user; - if (pol_open_domain == NULL || num_groups == NULL || gid == NULL) - return False; + prs_struct qbuf, rbuf; + SAMR_Q_CONNECT q; + SAMR_R_CONNECT r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - /* send open domain (on user sid) */ - if (!do_samr_open_user(cli, - pol_open_domain, - 0x02011b, user_rid, - &pol_open_user)) - { - return False; - } + ZERO_STRUCT(q); + ZERO_STRUCT(r); - /* send user groups query */ - if (!do_samr_query_usergroups(cli, - &pol_open_user, - num_groups, gid)) - { - DEBUG(5,("do_samr_query_usergroups: error in query user groups\n")); - } + /* Initialise parse structures */ - return do_samr_close(cli, &pol_open_user); -} + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); -#if 0 -/* DOES NOT COMPILE WITH THE NEW SAMR PARSE CODE. JRA. */ + /* Marshall data and send request */ -/**************************************************************************** -do a SAMR query user info -****************************************************************************/ -BOOL get_samr_query_userinfo(struct cli_state *cli, - POLICY_HND *pol_open_domain, - uint32 info_level, - uint32 user_rid, SAM_USER_INFO_21 *usr) -{ - POLICY_HND pol_open_user; - if (pol_open_domain == NULL || usr == NULL) - return False; + init_samr_q_connect(&q, cli->desthost, access_mask); - memset((char *)usr, '\0', sizeof(*usr)); + if (!samr_io_q_connect("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_CONNECT, &qbuf, &rbuf)) + goto done; - /* send open domain (on user sid) */ - if (!do_samr_open_user(cli, - pol_open_domain, - 0x02011b, user_rid, - &pol_open_user)) - { - return False; - } + /* Unmarshall response */ - /* send user info query */ - if (!do_samr_query_userinfo(cli, - &pol_open_user, - info_level, (void*)usr)) - { - DEBUG(5,("do_samr_query_userinfo: error in query user info, level 0x%x\n", - info_level)); - } + if (!samr_io_r_connect("", &r, &rbuf, 0)) + goto done; - return do_samr_close(cli, &pol_open_user); -} + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *connect_pol = r.connect_pol; +#ifdef __INSURE__ + connect_pol->marker = malloc(1); #endif - -/**************************************************************************** -do a SAMR change user password command -****************************************************************************/ -BOOL do_samr_chgpasswd_user(struct cli_state *cli, - char *srv_name, char *user_name, - char nt_newpass[516], uchar nt_oldhash[16], - char lm_newpass[516], uchar lm_oldhash[16]) -{ - prs_struct data; - prs_struct rdata; - SAMR_Q_CHGPASSWD_USER q_e; - SAMR_R_CHGPASSWD_USER r_e; - - /* create and send a MSRPC command with api SAMR_CHGPASSWD_USER */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("SAMR Change User Password. server:%s username:%s\n", - srv_name, user_name)); - - init_samr_q_chgpasswd_user(&q_e, srv_name, user_name, - nt_newpass, nt_oldhash, - lm_newpass, lm_oldhash); - - /* turn parameters into data stream */ - if(!samr_io_q_chgpasswd_user("", &q_e, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_CHGPASSWD_USER, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - prs_mem_free(&data); - - if(!samr_io_r_chgpasswd_user("", &r_e, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_e.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_CHGPASSWD_USER: %s\n", nt_errstr(r_e.status))); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; + return result; } -#if 0 +/* Close SAMR handle */ -/* CURRENTLY THIS DOESN'T COMPILE AND IS NOT USED ANYWHERE. JRA. */ - -/**************************************************************************** -do a SAMR unknown 0x38 command -****************************************************************************/ -BOOL do_samr_unknown_38(struct cli_state *cli, char *srv_name) +NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol) { - prs_struct data; - prs_struct rdata; + prs_struct qbuf, rbuf; + SAMR_Q_CLOSE_HND q; + SAMR_R_CLOSE_HND r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - SAMR_Q_UNKNOWN_38 q_e; - SAMR_R_UNKNOWN_38 r_e; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - /* create and send a MSRPC command with api SAMR_ENUM_DOM_USERS */ + /* Initialise parse structures */ - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SAMR Unknown 38 server:%s\n", srv_name)); + /* Marshall data and send request */ - init_samr_q_unknown_38(&q_e, srv_name); + init_samr_q_close_hnd(&q, connect_pol); - /* turn parameters into data stream */ - if(!samr_io_q_unknown_38("", &q_e, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + if (!samr_io_q_close_hnd("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_CLOSE_HND, &qbuf, &rbuf)) + goto done; - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_UNKNOWN_38, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + /* Unmarshall response */ - prs_mem_free(&data); + if (!samr_io_r_close_hnd("", &r, &rbuf, 0)) + goto done; - if(!samr_io_r_unknown_38("", &r_e, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } + /* Return output parameters */ - if (r_e.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_UNKNOWN_38: %s\n", nt_errstr(r_e.status))); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; -} + if (NT_STATUS_IS_OK(result = r.status)) { +#ifdef __INSURE__ + SAFE_FREE(connect_pol->marker); #endif - -/**************************************************************************** -do a SAMR unknown 0x8 command -****************************************************************************/ -BOOL do_samr_query_dom_info(struct cli_state *cli, - POLICY_HND *domain_pol, uint16 switch_value) -{ - prs_struct data; - prs_struct rdata; - SAMR_Q_QUERY_DOMAIN_INFO q_e; - SAMR_R_QUERY_DOMAIN_INFO r_e; - - if (domain_pol == NULL) - return False; - - /* create and send a MSRPC command with api SAMR_ENUM_DOM_USERS */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("SAMR Unknown 8 switch:%d\n", switch_value)); - - /* store the parameters */ - init_samr_q_query_dom_info(&q_e, domain_pol, switch_value); - - /* turn parameters into data stream */ - if(!samr_io_q_query_dom_info("", &q_e, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + *connect_pol = r.pol; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_QUERY_DOMAIN_INFO, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - prs_mem_free(&data); - - if(!samr_io_r_query_dom_info("", &r_e, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_e.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_QUERY_DOMAIN_INFO: %s\n", nt_errstr(r_e.status))); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; + return result; } -#if 0 +/* Open handle on a domain */ -/* CURRENTLY DOESN'T COMPILE WITH THE NEW SAMR PARSE CODE. JRA */ - -/**************************************************************************** -do a SAMR enumerate users -****************************************************************************/ -BOOL do_samr_enum_dom_users(struct cli_state *cli, - POLICY_HND *pol, uint16 num_entries, uint16 unk_0, - uint16 acb_mask, uint16 unk_1, uint32 size, - struct acct_info **sam, - int *num_sam_users) +NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *connect_pol, uint32 access_mask, + const DOM_SID *domain_sid, POLICY_HND *domain_pol) { - prs_struct data; + prs_struct qbuf, rbuf; + SAMR_Q_OPEN_DOMAIN q; + SAMR_R_OPEN_DOMAIN r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_open_domain(&q, connect_pol, access_mask, domain_sid); + + if (!samr_io_q_open_domain("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_OPEN_DOMAIN, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_open_domain("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *domain_pol = r.domain_pol; +#ifdef __INSURE__ + domain_pol->marker = malloc(1); +#endif + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Open handle on a user */ + +NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 user_rid, POLICY_HND *user_pol) +{ + prs_struct qbuf, rbuf; + SAMR_Q_OPEN_USER q; + SAMR_R_OPEN_USER r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_open_user(&q, domain_pol, access_mask, user_rid); + + if (!samr_io_q_open_user("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_OPEN_USER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_open_user("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *user_pol = r.user_pol; +#ifdef __INSURE__ + user_pol->marker = malloc(1); +#endif + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Open handle on a group */ + +NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 group_rid, POLICY_HND *group_pol) +{ + prs_struct qbuf, rbuf; + SAMR_Q_OPEN_GROUP q; + SAMR_R_OPEN_GROUP r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_open_group(&q, domain_pol, access_mask, group_rid); + + if (!samr_io_q_open_group("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_OPEN_GROUP, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_open_group("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *group_pol = r.pol; +#ifdef __INSURE__ + group_pol->marker = malloc(1); +#endif + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Query user info */ + +NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + SAM_USERINFO_CTR **ctr) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_USERINFO q; + SAMR_R_QUERY_USERINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_userinfo(&q, user_pol, switch_value); + + if (!samr_io_q_query_userinfo("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_USERINFO, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_query_userinfo("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + *ctr = r.ctr; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Query group info */ + +NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 info_level, + GROUP_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_GROUPINFO q; + SAMR_R_QUERY_GROUPINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_groupinfo(&q, group_pol, info_level); + + if (!samr_io_q_query_groupinfo("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_GROUPINFO, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + r.ctr = ctr; + + if (!samr_io_r_query_groupinfo("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Query user groups */ + +NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 *num_groups, + DOM_GID **gid) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_USERGROUPS q; + SAMR_R_QUERY_USERGROUPS r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_usergroups(&q, user_pol); + + if (!samr_io_q_query_usergroups("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_USERGROUPS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_query_usergroups("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *num_groups = r.num_entries; + *gid = r.gid; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Query user aliases */ + +NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint32 num_sids, DOM_SID2 *sid, + uint32 *num_aliases, uint32 **als_rids) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_USERALIASES q; + SAMR_R_QUERY_USERALIASES r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + unsigned int ptr=1; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_useraliases(&q, user_pol, num_sids, &ptr, sid); + + if (!samr_io_q_query_useraliases("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_USERALIASES, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_query_useraliases("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *num_aliases = r.num_entries; + *als_rids = r.rid; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Query user groups */ + +NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *group_pol, uint32 *num_mem, + uint32 **rid, uint32 **attr) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_GROUPMEM q; + SAMR_R_QUERY_GROUPMEM r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_groupmem(&q, group_pol); + + if (!samr_io_q_query_groupmem("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_GROUPMEM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_query_groupmem("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *num_mem = r.num_entries; + *rid = r.rid; + *attr = r.attr; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** + * Enumerate domain users + * + * @param cli client state structure + * @param mem_ctx talloc context + * @param pol opened domain policy handle + * @param start_idx starting index of enumeration, returns context for + next enumeration + * @param acb_mask account control bit mask (to enumerate some particular + * kind of accounts) + * @param size max acceptable size of response + * @param dom_users returned array of domain user names + * @param rids returned array of domain user RIDs + * @param num_dom_users numer returned entries + * + * @return NTSTATUS returned in rpc response + **/ +NTSTATUS cli_samr_enum_dom_users(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, uint16 acb_mask, + uint32 size, char ***dom_users, uint32 **rids, + uint32 *num_dom_users) +{ + prs_struct qdata; prs_struct rdata; - SAMR_Q_ENUM_DOM_USERS q_e; - SAMR_R_ENUM_DOM_USERS r_e; + SAMR_Q_ENUM_DOM_USERS q; + SAMR_R_ENUM_DOM_USERS r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; int i; - int name_idx = 0; - - if (pol == NULL || num_sam_users == NULL) - return False; - - /* create and send a MSRPC command with api SAMR_ENUM_DOM_USERS */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("SAMR Enum SAM DB max size:%x\n", size)); - - /* store the parameters */ - init_samr_q_enum_dom_users(&q_e, pol, - num_entries, unk_0, - acb_mask, unk_1, size); - - /* turn parameters into data stream */ - if(!samr_io_q_enum_dom_users("", &q_e, &data, 0)) { - prs_mem_free(&data); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + if (cli == NULL || pol == NULL) + return result; + + /* initialise parse structures */ + prs_init(&qdata, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rdata, 0, mem_ctx, UNMARSHALL); + + DEBUG(4, ("SAMR Enum Domain Users. start_idx: %d, acb: %d, size: %d\n", + *start_idx, acb_mask, size)); + + /* fill query structure with parameters */ + init_samr_q_enum_dom_users(&q, pol, *start_idx, acb_mask, 0, size); + + /* prepare query stream */ + if (!samr_io_q_enum_dom_users("", &q, &qdata, 0)) { + prs_mem_free(&qdata); prs_mem_free(&rdata); - return False; + return result; } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_ENUM_DOM_USERS, &data, &rdata)) { - prs_mem_free(&data); + + /* send rpc call over the pipe */ + if (!rpc_api_pipe_req(cli, SAMR_ENUM_DOM_USERS, &qdata, &rdata)) { + prs_mem_free(&qdata); prs_mem_free(&rdata); - return False; + return result; } - - prs_mem_free(&data); - - if(!samr_io_r_enum_dom_users("", &r_e, &rdata, 0)) { + + /* unpack received stream */ + if(!samr_io_r_enum_dom_users("", &r, &rdata, 0)) { + prs_mem_free(&qdata); prs_mem_free(&rdata); - return False; + result = r.status; + return result; + } + + /* return the data obtained in response */ + if (!NT_STATUS_IS_OK(r.status) && + (NT_STATUS_EQUAL(r.status, STATUS_MORE_ENTRIES) || + NT_STATUS_EQUAL(r.status, NT_STATUS_NO_MORE_ENTRIES))) { + return r.status; + } + + *start_idx = r.next_idx; + *num_dom_users = r.num_entries2; + result = r.status; + + if (r.num_entries2) { + /* allocate memory needed to return received data */ + *rids = (uint32*)talloc(mem_ctx, sizeof(uint32) * r.num_entries2); + if (!*rids) { + DEBUG(0, ("Error in cli_samr_enum_dom_users(): out of memory\n")); + return NT_STATUS_NO_MEMORY; + } + + *dom_users = (char**)talloc(mem_ctx, sizeof(char*) * r.num_entries2); + if (!*dom_users) { + DEBUG(0, ("Error in cli_samr_enum_dom_users(): out of memory\n")); + return NT_STATUS_NO_MEMORY; + } + + /* fill output buffers with rpc response */ + for (i = 0; i < r.num_entries2; i++) { + fstring conv_buf; + + (*rids)[i] = r.sam[i].rid; + unistr2_to_ascii(conv_buf, &(r.uni_acct_name[i]), sizeof(conv_buf) - 1); + (*dom_users)[i] = talloc_strdup(mem_ctx, conv_buf); + } + } + + prs_mem_free(&qdata); + prs_mem_free(&rdata); + + return result; +}; + + +/* Enumerate domain groups */ + +NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups) +{ + prs_struct qbuf, rbuf; + SAMR_Q_ENUM_DOM_GROUPS q; + SAMR_R_ENUM_DOM_GROUPS r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 name_idx, i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_enum_dom_groups(&q, pol, *start_idx, size); + + if (!samr_io_q_enum_dom_groups("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_ENUM_DOM_GROUPS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_enum_dom_groups("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (!NT_STATUS_IS_OK(result) && + NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) + goto done; + + *num_dom_groups = r.num_entries2; + + if (!((*dom_groups) = (struct acct_info *) + talloc(mem_ctx, sizeof(struct acct_info) * *num_dom_groups))) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - if (r_e.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_ENUM_DOM_USERS: %s\n", nt_errstr(r_e.status))); - prs_mem_free(&rdata); - return False; - } + memset(*dom_groups, 0, sizeof(struct acct_info) * *num_dom_groups); - *num_sam_users = r_e.num_entries2; - if (*num_sam_users > MAX_SAM_ENTRIES) { - *num_sam_users = MAX_SAM_ENTRIES; - DEBUG(2,("do_samr_enum_dom_users: sam user entries limited to %d\n", - *num_sam_users)); - } + name_idx = 0; - *sam = (struct acct_info*) malloc(sizeof(struct acct_info) * (*num_sam_users)); - - if ((*sam) == NULL) - *num_sam_users = 0; + for (i = 0; i < *num_dom_groups; i++) { - for (i = 0; i < *num_sam_users; i++) { - (*sam)[i].smb_userid = r_e.sam[i].rid; - if (r_e.sam[i].hdr_name.buffer) { - char *acct_name = dos_unistrn2(r_e.uni_acct_name[name_idx].buffer, - r_e.uni_acct_name[name_idx].uni_str_len); - fstrcpy((*sam)[i].acct_name, acct_name); + (*dom_groups)[i].rid = r.sam[i].rid; + + if (r.sam[i].hdr_name.buffer) { + unistr2_to_ascii((*dom_groups)[i].acct_name, + &r.uni_grp_name[name_idx], + sizeof(fstring) - 1); name_idx++; - } else { - memset((char *)(*sam)[i].acct_name, '\0', sizeof((*sam)[i].acct_name)); } - DEBUG(5,("do_samr_enum_dom_users: idx: %4d rid: %8x acct: %s\n", - i, (*sam)[i].smb_userid, (*sam)[i].acct_name)); + *start_idx = r.next_idx; } - prs_mem_free(&rdata ); + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - return True; -} -#endif - -/**************************************************************************** -do a SAMR Connect -****************************************************************************/ -BOOL do_samr_connect(struct cli_state *cli, - char *srv_name, uint32 unknown_0, - POLICY_HND *connect_pol) -{ - prs_struct data; - prs_struct rdata; - SAMR_Q_CONNECT q_o; - SAMR_R_CONNECT r_o; - - if (srv_name == NULL || connect_pol == NULL) - return False; - - /* create and send a MSRPC command with api SAMR_CONNECT */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("SAMR Open Policy server:%s undoc value:%x\n", - srv_name, unknown_0)); - - /* store the parameters */ - init_samr_q_connect(&q_o, srv_name, unknown_0); - - /* turn parameters into data stream */ - if(!samr_io_q_connect("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_CONNECT, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&data); - - if(!samr_io_r_connect("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_CONNECT: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } - - memcpy(connect_pol, &r_o.connect_pol, sizeof(r_o.connect_pol)); - - prs_mem_free(&rdata); - - return True; + return result; } -/**************************************************************************** -do a SAMR Open User -****************************************************************************/ -BOOL do_samr_open_user(struct cli_state *cli, - POLICY_HND *pol, uint32 unk_0, uint32 rid, - POLICY_HND *user_pol) +/* Enumerate domain groups */ + +NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 *start_idx, + uint32 size, struct acct_info **dom_groups, + uint32 *num_dom_groups) { - prs_struct data; - prs_struct rdata; - SAMR_Q_OPEN_USER q_o; - SAMR_R_OPEN_USER r_o; + prs_struct qbuf, rbuf; + SAMR_Q_ENUM_DOM_ALIASES q; + SAMR_R_ENUM_DOM_ALIASES r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 name_idx, i; - if (pol == NULL || user_pol == NULL) - return False; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - /* create and send a MSRPC command with api SAMR_OPEN_USER */ + /* Initialise parse structures */ - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SAMR Open User. unk_0: %08x RID:%x\n", - unk_0, rid)); + /* Marshall data and send request */ - /* store the parameters */ - init_samr_q_open_user(&q_o, pol, unk_0, rid); + init_samr_q_enum_dom_aliases(&q, pol, *start_idx, size); - /* turn parameters into data stream */ - if(!samr_io_q_open_user("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + if (!samr_io_q_enum_dom_aliases("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_ENUM_DOM_ALIASES, &qbuf, &rbuf)) { + goto done; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_OPEN_USER, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + /* Unmarshall response */ + + if (!samr_io_r_enum_dom_aliases("", &r, &rbuf, 0)) { + goto done; } - prs_mem_free(&data); + /* Return output parameters */ - if(!samr_io_r_open_user("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_OPEN_USER: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; + result = r.status; + + if (!NT_STATUS_IS_OK(result) && + NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) { + goto done; } - memcpy(user_pol, &r_o.user_pol, sizeof(r_o.user_pol)); + *num_dom_groups = r.num_entries2; - prs_mem_free(&rdata); - - return True; -} - -/**************************************************************************** -do a SAMR Open Domain -****************************************************************************/ -BOOL do_samr_open_domain(struct cli_state *cli, - POLICY_HND *connect_pol, uint32 rid, DOM_SID *sid, - POLICY_HND *domain_pol) -{ - prs_struct data; - prs_struct rdata; - pstring sid_str; - SAMR_Q_OPEN_DOMAIN q_o; - SAMR_R_OPEN_DOMAIN r_o; - - if (connect_pol == NULL || sid == NULL || domain_pol == NULL) - return False; - - /* create and send a MSRPC command with api SAMR_OPEN_DOMAIN */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - sid_to_string(sid_str, sid); - DEBUG(4,("SAMR Open Domain. SID:%s RID:%x\n", sid_str, rid)); - - /* store the parameters */ - init_samr_q_open_domain(&q_o, connect_pol, rid, sid); - - /* turn parameters into data stream */ - if(!samr_io_q_open_domain("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + if (!((*dom_groups) = (struct acct_info *) + talloc(mem_ctx, sizeof(struct acct_info) * *num_dom_groups))) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_OPEN_DOMAIN, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + memset(*dom_groups, 0, sizeof(struct acct_info) * *num_dom_groups); - prs_mem_free(&data); + name_idx = 0; - if(!samr_io_r_open_domain("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } + for (i = 0; i < *num_dom_groups; i++) { - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_OPEN_DOMAIN: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } + (*dom_groups)[i].rid = r.sam[i].rid; - memcpy(domain_pol, &r_o.domain_pol, sizeof(r_o.domain_pol)); - - prs_mem_free(&rdata); - - return True; -} - -#if 0 - -/* CURRENTLY DOES NOT COMPILE AND IS NOT USED ANYWHERE. JRA. */ - -/**************************************************************************** -do a SAMR Query Unknown 12 -****************************************************************************/ -BOOL do_samr_query_unknown_12(struct cli_state *cli, - POLICY_HND *pol, uint32 rid, uint32 num_gids, uint32 *gids, - uint32 *num_aliases, - fstring als_names [MAX_LOOKUP_SIDS], - uint32 num_als_users[MAX_LOOKUP_SIDS]) -{ - prs_struct data; - prs_struct rdata; - SAMR_Q_LOOKUP_RIDS q_o; - SAMR_R_LOOKUP_RIDS r_o; - - if (pol == NULL || rid == 0 || num_gids == 0 || gids == NULL || - num_aliases == NULL || als_names == NULL || num_als_users == NULL ) - return False; - - /* create and send a MSRPC command with api SAMR_UNKNOWN_12 */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("SAMR Query Unknown 12.\n")); - - /* store the parameters */ - init_samr_q_lookup_rids(&q_o, pol, rid, num_gids, gids); - - /* turn parameters into data stream */ - if(!samr_io_q_lookup_rids("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_LOOKUP_RIDS, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&data); - - if(!samr_io_r_lookup_rids("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_UNKNOWN_12: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } - - if (r_o.ptr_aliases != 0 && r_o.ptr_als_usrs != 0 && - r_o.num_als_usrs1 == r_o.num_aliases1) { - int i; - - *num_aliases = r_o.num_aliases1; - - for (i = 0; i < r_o.num_aliases1; i++) { - fstrcpy(als_names[i], dos_unistrn2(r_o.uni_als_name[i].buffer, - r_o.uni_als_name[i].uni_str_len)); + if (r.sam[i].hdr_name.buffer) { + unistr2_to_ascii((*dom_groups)[i].acct_name, + &r.uni_grp_name[name_idx], + sizeof(fstring) - 1); + name_idx++; } - for (i = 0; i < r_o.num_als_usrs1; i++) { - num_als_users[i] = r_o.num_als_usrs[i]; - } - } else if (r_o.ptr_aliases == 0 && r_o.ptr_als_usrs == 0) { - *num_aliases = 0; - } else { - prs_mem_free(&rdata); - return False; + + *start_idx = r.next_idx; } - prs_mem_free(&rdata); + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - return True; + return result; } + +/* Query alias members */ + +NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *alias_pol, uint32 *num_mem, + DOM_SID **sids) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_ALIASMEM q; + SAMR_R_QUERY_ALIASMEM r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_aliasmem(&q, alias_pol); + + if (!samr_io_q_query_aliasmem("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_ALIASMEM, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_query_aliasmem("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + *num_mem = r.num_sids; + + if (!(*sids = talloc(mem_ctx, sizeof(DOM_SID) * *num_mem))) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + for (i = 0; i < *num_mem; i++) { + (*sids)[i] = r.sid[i].sid; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Open handle on an alias */ + +NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 access_mask, + uint32 alias_rid, POLICY_HND *alias_pol) +{ + prs_struct qbuf, rbuf; + SAMR_Q_OPEN_ALIAS q; + SAMR_R_OPEN_ALIAS r; + NTSTATUS result; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_open_alias(&q, domain_pol, access_mask, alias_rid); + + if (!samr_io_q_open_alias("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_OPEN_ALIAS, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_open_alias("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *alias_pol = r.pol; +#ifdef __INSURE__ + alias_pol->marker = malloc(1); #endif - -/**************************************************************************** -do a SAMR Query User Groups -****************************************************************************/ -BOOL do_samr_query_usergroups(struct cli_state *cli, - POLICY_HND *pol, uint32 *num_groups, DOM_GID *gid) -{ - prs_struct data; - prs_struct rdata; - SAMR_Q_QUERY_USERGROUPS q_o; - SAMR_R_QUERY_USERGROUPS r_o; - - if (pol == NULL || gid == NULL || num_groups == 0) - return False; - - /* create and send a MSRPC command with api SAMR_QUERY_USERGROUPS */ - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - DEBUG(4,("SAMR Query User Groups.\n")); - - /* store the parameters */ - init_samr_q_query_usergroups(&q_o, pol); - - /* turn parameters into data stream */ - if(!samr_io_q_query_usergroups("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_QUERY_USERGROUPS, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - prs_mem_free(&data); - - /* get user info */ - r_o.gid = gid; - - if(!samr_io_r_query_usergroups("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_QUERY_USERGROUPS: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } - - *num_groups = r_o.num_entries; - - prs_mem_free(&rdata); - - return True; + return result; } -#if 0 +/* Query domain info */ -/* CURRENTLY DOES NOT COMPILE WITH THE NEW SAMR PARSE CODE. JRA */ - -/**************************************************************************** -do a SAMR Query User Info -****************************************************************************/ -BOOL do_samr_query_userinfo(struct cli_state *cli, - POLICY_HND *pol, uint16 switch_value, void* usr) +NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint16 switch_value, + SAM_UNK_CTR *ctr) { - prs_struct data; - prs_struct rdata; - SAMR_Q_QUERY_USERINFO q_o; - SAMR_R_QUERY_USERINFO r_o; + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_DOMAIN_INFO q; + SAMR_R_QUERY_DOMAIN_INFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - if (pol == NULL || usr == NULL || switch_value == 0) - return False; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - /* create and send a MSRPC command with api SAMR_QUERY_USERINFO */ + /* Initialise parse structures */ - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SAMR Query User Info. level: %d\n", switch_value)); + /* Marshall data and send request */ - /* store the parameters */ - init_samr_q_query_userinfo(&q_o, pol, switch_value); + init_samr_q_query_dom_info(&q, domain_pol, switch_value); - /* turn parameters into data stream */ - if(!samr_io_q_query_userinfo("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + if (!samr_io_q_query_dom_info("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_DOMAIN_INFO, &qbuf, &rbuf)) { + goto done; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_QUERY_USERINFO, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + /* Unmarshall response */ + + r.ctr = ctr; + + if (!samr_io_r_query_dom_info("", &r, &rbuf, 0)) { + goto done; } - prs_mem_free(&data); + /* Return output parameters */ - /* get user info */ - r_o.info.id = usr; - - if(!samr_io_r_query_userinfo("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_R_QUERY_USERINFO: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; } - if (r_o.switch_value != switch_value) { - DEBUG(0,("SAMR_R_QUERY_USERINFO: received incorrect level %d\n", - r_o.switch_value)); - prs_mem_free(&rdata); - return False; - } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - if (r_o.ptr == 0) { - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; + return result; } -#endif +/* Query display info */ -/**************************************************************************** -do a SAMR Close -****************************************************************************/ -BOOL do_samr_close(struct cli_state *cli, POLICY_HND *hnd) +NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 *start_idx, + uint16 switch_value, uint32 *num_entries, + uint32 max_entries, SAM_DISPINFO_CTR *ctr) { - prs_struct data; - prs_struct rdata; - SAMR_Q_CLOSE_HND q_c; - SAMR_R_CLOSE_HND r_c; + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_DISPINFO q; + SAMR_R_QUERY_DISPINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; - if (hnd == NULL) - return False; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + /* Initialise parse structures */ - /* create and send a MSRPC command with api SAMR_CLOSE_HND */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SAMR Close\n")); + /* Marshall data and send request */ - /* store the parameters */ - init_samr_q_close_hnd(&q_c, hnd); + init_samr_q_query_dispinfo(&q, domain_pol, switch_value, + *start_idx, max_entries); - /* turn parameters into data stream */ - if(!samr_io_q_close_hnd("", &q_c, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + if (!samr_io_q_query_dispinfo("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_DISPINFO, &qbuf, &rbuf)) { + goto done; } - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SAMR_CLOSE_HND, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + /* Unmarshall response */ + + r.ctr = ctr; + + if (!samr_io_r_query_dispinfo("", &r, &rbuf, 0)) { + goto done; } - prs_mem_free(&data); + /* Return output parameters */ - if(!samr_io_r_close_hnd("", &r_c, &rdata, 0)) { - prs_mem_free(&rdata); - return False; + result = r.status; + + if (!NT_STATUS_IS_OK(result) && + NT_STATUS_V(result) != NT_STATUS_V(STATUS_MORE_ENTRIES)) { + goto done; } - if (r_c.status != 0) { - /* report error code */ - DEBUG(0,("SAMR_CLOSE_HND: %s\n", nt_errstr(r_c.status))); - prs_mem_free(&rdata); - return False; - } + *num_entries = r.num_entries; + *start_idx += r.num_entries; /* No next_idx in this structure! */ - /* check that the returned policy handle is all zeros */ + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - if (IVAL(&r_c.pol.data1,0) || IVAL(&r_c.pol.data2,0) || SVAL(&r_c.pol.data3,0) || - SVAL(&r_c.pol.data4,0) || IVAL(r_c.pol.data5,0) || IVAL(r_c.pol.data5,4) ) { - DEBUG(0,("SAMR_CLOSE_HND: non-zero handle returned\n")); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; + return result; +} + +/* Lookup rids. Note that NT4 seems to crash if more than ~1000 rids are + looked up in one packet. */ + +NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_rids, uint32 *rids, + uint32 *num_names, char ***names, + uint32 **name_types) +{ + prs_struct qbuf, rbuf; + SAMR_Q_LOOKUP_RIDS q; + SAMR_R_LOOKUP_RIDS r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 i; + + if (num_rids > 1000) { + DEBUG(2, ("cli_samr_lookup_rids: warning: NT4 can crash if " + "more than ~1000 rids are looked up at once.\n")); + } + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_lookup_rids(mem_ctx, &q, domain_pol, flags, + num_rids, rids); + + if (!samr_io_q_lookup_rids("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_LOOKUP_RIDS, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_lookup_rids("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + if (r.num_names1 == 0) { + *num_names = 0; + *names = NULL; + goto done; + } + + *num_names = r.num_names1; + *names = talloc(mem_ctx, sizeof(char *) * r.num_names1); + *name_types = talloc(mem_ctx, sizeof(uint32) * r.num_names1); + + for (i = 0; i < r.num_names1; i++) { + fstring tmp; + + unistr2_to_ascii(tmp, &r.uni_name[i], sizeof(tmp) - 1); + (*names)[i] = talloc_strdup(mem_ctx, tmp); + (*name_types)[i] = r.type[i]; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Lookup names */ + +NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, uint32 flags, + uint32 num_names, const char **names, + uint32 *num_rids, uint32 **rids, + uint32 **rid_types) +{ + prs_struct qbuf, rbuf; + SAMR_Q_LOOKUP_NAMES q; + SAMR_R_LOOKUP_NAMES r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + uint32 i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_lookup_names(mem_ctx, &q, domain_pol, flags, + num_names, names); + + if (!samr_io_q_lookup_names("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_LOOKUP_NAMES, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_lookup_names("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + if (r.num_rids1 == 0) { + *num_rids = 0; + goto done; + } + + *num_rids = r.num_rids1; + *rids = talloc(mem_ctx, sizeof(uint32) * r.num_rids1); + *rid_types = talloc(mem_ctx, sizeof(uint32) * r.num_rids1); + + for (i = 0; i < r.num_rids1; i++) { + (*rids)[i] = r.rids[i]; + (*rid_types)[i] = r.types[i]; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Create a domain user */ + +NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, const char *acct_name, + uint32 acb_info, uint32 unknown, + POLICY_HND *user_pol, uint32 *rid) +{ + prs_struct qbuf, rbuf; + SAMR_Q_CREATE_USER q; + SAMR_R_CREATE_USER r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_create_user(&q, domain_pol, acct_name, acb_info, unknown); + + if (!samr_io_q_create_user("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_CREATE_USER, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_create_user("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + if (user_pol) + *user_pol = r.user_pol; + + if (rid) + *rid = r.user_rid; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Set userinfo */ + +NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SAMR_Q_SET_USERINFO q; + SAMR_R_SET_USERINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + q.ctr = ctr; + + init_samr_q_set_userinfo(&q, user_pol, sess_key, switch_value, + ctr->info.id); + + if (!samr_io_q_set_userinfo("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_SET_USERINFO, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_set_userinfo("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Set userinfo2 */ + +NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + uchar sess_key[16], SAM_USERINFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SAMR_Q_SET_USERINFO2 q; + SAMR_R_SET_USERINFO2 r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_set_userinfo2(&q, user_pol, sess_key, switch_value, ctr); + + if (!samr_io_q_set_userinfo2("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_SET_USERINFO2, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_set_userinfo2("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Delete domain user */ + +NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol) +{ + prs_struct qbuf, rbuf; + SAMR_Q_DELETE_DOM_USER q; + SAMR_R_DELETE_DOM_USER r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_delete_dom_user(&q, user_pol); + + if (!samr_io_q_delete_dom_user("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_DELETE_DOM_USER, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_delete_dom_user("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Query user security object */ + +NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *user_pol, uint16 switch_value, + TALLOC_CTX *ctx, SEC_DESC_BUF **sec_desc_buf) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_SEC_OBJ q; + SAMR_R_QUERY_SEC_OBJ r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_sec_obj(&q, user_pol, switch_value); + + if (!samr_io_q_query_sec_obj("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_SEC_OBJECT, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_query_sec_obj("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + result = r.status; + *sec_desc_buf=dup_sec_desc_buf(ctx, r.buf); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Get domain password info */ + +NTSTATUS cli_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint16 *unk_0, uint16 *unk_1, uint16 *unk_2) +{ + prs_struct qbuf, rbuf; + SAMR_Q_GET_DOM_PWINFO q; + SAMR_R_GET_DOM_PWINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_get_dom_pwinfo(&q, cli->desthost); + + if (!samr_io_q_get_dom_pwinfo("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_GET_DOM_PWINFO, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_get_dom_pwinfo("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (NT_STATUS_IS_OK(result)) { + if (unk_0) + *unk_0 = r.unk_0; + if (unk_1) + *unk_1 = r.unk_1; + if (unk_2) + *unk_2 = r.unk_2; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; } diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 5292569ed43..18e17758d6d 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -1,820 +1,2156 @@ /* - * Unix SMB/CIFS implementation. - * RPC Pipe client / server routines - * Copyright (C) Andrew Tridgell 1992-2000, - * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, - * Copyright (C) Paul Ashton 1997-2000, - * Copyright (C) Jean Francois Micouleau 1998-2000, - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ + Unix SMB/CIFS implementation. + RPC pipe client + + Copyright (C) Gerald Carter 2001-2002, + Copyright (C) Tim Potter 2000-2002, + Copyright (C) Andrew Tridgell 1994-2000, + Copyright (C) Luke Kenneth Casson Leighton 1996-2000, + Copyright (C) Jean-Francois Micouleau 1999-2000. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ #include "includes.h" -#include "rpc_parse.h" -#include "nterr.h" -#undef DBGC_CLASS -#define DBGC_CLASS DBGC_RPC_CLI +/** @defgroup spoolss SPOOLSS - NT printing routines + * @ingroup rpc_client + * + * @{ + **/ -/**************************************************************************** -do a SPOOLSS Enum Printer Drivers -****************************************************************************/ -uint32 spoolss_enum_printerdrivers(const char *srv_name, const char *environment, - uint32 level, NEW_BUFFER *buffer, uint32 offered, - uint32 *needed, uint32 *returned) +/********************************************************************** + Initialize a new spoolss buff for use by a client rpc +**********************************************************************/ +static void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx) { - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_ENUMPRINTERDRIVERS q_o; - SPOOL_R_ENUMPRINTERDRIVERS r_o; - TALLOC_CTX *ctx = prs_get_mem_context(&buffer->prs); - - struct cli_connection *con = NULL; - - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SPOOLSS_ENUM_PRINTERS */ - - DEBUG(5,("SPOOLSS Enum Printer Drivers (Server: %s Environment: %s level: %d)\n", - srv_name, environment, level)); - - make_spoolss_q_enumprinterdrivers(&q_o, srv_name, environment, - level, buffer, offered); - - /* turn parameters into data stream */ - if (spoolss_io_q_enumprinterdrivers("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_ENUMPRINTERDRIVERS, &buf, &rbuf)) - { - prs_mem_free(&buf); - ZERO_STRUCT(r_o); - - prs_switch_type(&buffer->prs, UNMARSHALL); - prs_set_offset(&buffer->prs, 0); - r_o.buffer=buffer; - - if(spoolss_io_r_enumprinterdrivers("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - DEBUG(3,("SPOOLSS_ENUMPRINTERDRIVERS: %s\n", nt_errstr(r_o.status))); - } - *needed=r_o.needed; - *returned=r_o.returned; - } - } - - prs_mem_free(&rbuf); - prs_mem_free(&buf ); - - cli_connection_unlink(con); - - return r_o.status; + buffer->ptr = (size != 0); + buffer->size = size; + buffer->string_at_end = size; + prs_init(&buffer->prs, size, ctx, MARSHALL); + buffer->struct_start = prs_offset(&buffer->prs); } -/**************************************************************************** -do a SPOOLSS Enum Printers -****************************************************************************/ -uint32 spoolss_enum_printers(uint32 flags, fstring srv_name, uint32 level, - NEW_BUFFER *buffer, uint32 offered, - uint32 *needed, uint32 *returned) +/********************************************************************* + Decode various spoolss rpc's and info levels + ********************************************************************/ + +/********************************************************************** +**********************************************************************/ +static void decode_printer_info_0(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PRINTER_INFO_0 **info) { - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_ENUMPRINTERS q_o; - SPOOL_R_ENUMPRINTERS r_o; - TALLOC_CTX *ctx = prs_get_mem_context(&buffer->prs); + uint32 i; + PRINTER_INFO_0 *inf; - struct cli_connection *con = NULL; + inf=(PRINTER_INFO_0 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_0)); - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SPOOLSS_ENUM_PRINTERS */ - - DEBUG(5,("SPOOLSS Enum Printers (Server: %s level: %d)\n", srv_name, level)); - - make_spoolss_q_enumprinters(&q_o, flags, "", level, buffer, offered); - - /* turn parameters into data stream */ - if (spoolss_io_q_enumprinters("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_ENUMPRINTERS, &buf, &rbuf)) - { - ZERO_STRUCT(r_o); - - prs_switch_type(&buffer->prs, UNMARSHALL); - prs_set_offset(&buffer->prs, 0); - r_o.buffer=buffer; - - if(new_spoolss_io_r_enumprinters("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - /* report error code */ - DEBUG(3,("SPOOLSS_ENUMPRINTERS: %s\n", nt_errstr(r_o.status))); - } - - *needed=r_o.needed; - *returned=r_o.returned; - } + buffer->prs.data_offset=0; + for (i=0; iprs); + uint32 i; + PRINTER_INFO_1 *inf; - struct cli_connection *con = NULL; + inf=(PRINTER_INFO_1 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_1)); - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return False; + buffer->prs.data_offset=0; - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SPOOLSS_ENUMPORTS */ - - DEBUG(5,("SPOOLSS Enum Ports (Server: %s level: %d)\n", srv_name, level)); - - make_spoolss_q_enumports(&q_o, "", level, buffer, offered); - - /* turn parameters into data stream */ - if (spoolss_io_q_enumports("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_ENUMPORTS, &buf, &rbuf)) - { - prs_mem_free(&buf ); - ZERO_STRUCT(r_o); - - prs_switch_type(&buffer->prs, UNMARSHALL); - prs_set_offset(&buffer->prs, 0); - r_o.buffer=buffer; - - if(new_spoolss_io_r_enumports("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - DEBUG(3,("SPOOLSS_ENUMPORTS: %s\n", nt_errstr(r_o.status))); - } - - *needed=r_o.needed; - *returned=r_o.returned; - } + for (i=0; iprs); + uint32 i; + PRINTER_INFO_2 *inf; - if (hnd == NULL) - return NT_STATUS_INVALID_PARAMETER; + inf=(PRINTER_INFO_2 *)talloc(mem_ctx, returned*sizeof(PRINTER_INFO_2)); - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); + buffer->prs.data_offset=0; - /* create and send a MSRPC command with api SPOOLSS_ENUMJOBS */ + for (i=0; iprs.data_offset=0; - DEBUG(4,("SPOOLSS Enum Printer data\n")); + for (i=0; iprs); + uint32 i; + PORT_INFO_1 *inf; - if (hnd == NULL) - return NT_STATUS_INVALID_PARAMETER; + inf=(PORT_INFO_1*)talloc(mem_ctx, returned*sizeof(PORT_INFO_1)); - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); + prs_set_offset(&buffer->prs, 0); - /* create and send a MSRPC command with api SPOOLSS_ENUMJOBS */ + for (i=0; iprs, UNMARSHALL); - prs_set_offset(&buffer->prs, 0); - r_o.buffer=buffer; - - if(!spoolss_io_r_getprinter("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - DEBUG(3,("SPOOLSS_GETPRINTER: %s\n", nt_errstr(r_o.status))); - } - *needed=r_o.needed; - } - } - - prs_mem_free(&rbuf); - prs_mem_free(&buf ); - - return r_o.status; + *info=inf; } -/**************************************************************************** -do a SPOOLSS Enum printer driver -****************************************************************************/ -uint32 spoolss_getprinterdriver(const POLICY_HND *hnd, - const char *environment, uint32 level, - NEW_BUFFER *buffer, uint32 offered, - uint32 *needed) +/********************************************************************** +**********************************************************************/ +static void decode_port_info_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, PORT_INFO_2 **info) { - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_GETPRINTERDRIVER2 q_o; - SPOOL_R_GETPRINTERDRIVER2 r_o; - TALLOC_CTX *ctx = prs_get_mem_context(&buffer->prs); + uint32 i; + PORT_INFO_2 *inf; - if (hnd == NULL) - return NT_STATUS_INVALID_PARAMETER; + inf=(PORT_INFO_2*)talloc(mem_ctx, returned*sizeof(PORT_INFO_2)); - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); + prs_set_offset(&buffer->prs, 0); - /* create and send a MSRPC command with api SPOOLSS_ENUMJOBS */ + for (i=0; iprs, UNMARSHALL); - prs_set_offset(&buffer->prs, 0); - r_o.buffer=buffer; - - if(spoolss_io_r_getprinterdriver2("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - DEBUG(3,("SPOOLSS_GETPRINTERDRIVER2: %s\n", nt_errstr(r_o.status))); - } - - *needed=r_o.needed; - } - } - - prs_mem_free(&rbuf); - prs_mem_free(&buf ); - - return r_o.status; + *info=inf; } - - -/**************************************************************************** -do a SPOOLSS Open Printer Ex -****************************************************************************/ -BOOL spoolss_open_printer_ex( const char *printername, - const char *datatype, uint32 access_required, - const char *station, const char *username, - POLICY_HND *hnd) +/********************************************************************** +**********************************************************************/ +static void decode_printer_driver_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 returned, DRIVER_INFO_1 **info) { - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_OPEN_PRINTER_EX q_o; - BOOL valid_pol = False; - fstring srv_name; - char *s = NULL; - struct cli_connection *con = NULL; - TALLOC_CTX *mem_ctx = NULL; - - memset(srv_name, 0, sizeof(srv_name)); - fstrcpy(srv_name, printername); + uint32 i; + DRIVER_INFO_1 *inf; - s = strchr_m(&srv_name[2], '\\'); - if (s != NULL) - *s = '\0'; + inf=(DRIVER_INFO_1 *)talloc(mem_ctx, returned*sizeof(DRIVER_INFO_1)); - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return False; + buffer->prs.data_offset=0; - if (hnd == NULL) - return False; + for (i=0; iprs.data_offset=0; + + for (i=0; iprs.data_offset=0; + + for (i=0; iprs, 0); + + smb_io_driverdir_1("", buffer, inf, 0); + + *info=inf; +} + +/** Return a handle to the specified printer or print server. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param printername The name of the printer or print server to be + * opened in UNC format. + * + * @param datatype Specifies the default data type for the printer. + * + * @param access_required The access rights requested on the printer or + * print server. + * + * @param station The UNC name of the requesting workstation. + * + * @param username The name of the user requesting the open. + * + * @param pol Returned policy handle. + */ + +/********************************************************************************* + Win32 API - OpenPrinter() + ********************************************************************************/ + +WERROR cli_spoolss_open_printer_ex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *printername, char *datatype, uint32 access_required, + char *station, char *username, POLICY_HND *pol) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_OPEN_PRINTER_EX q; + SPOOL_R_OPEN_PRINTER_EX r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_open_printer_ex(&q, printername, datatype, access_required, station, username); - /* turn parameters into data stream */ - if (spoolss_io_q_open_printer_ex("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_OPENPRINTEREX, &buf, &rbuf)) - { - SPOOL_R_OPEN_PRINTER_EX r_o; - BOOL p = True; + /* Marshall data and send request */ - spoolss_io_r_open_printer_ex("", &r_o, &rbuf, 0); + if (!spoolss_io_q_open_printer_ex("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_OPENPRINTEREX, &qbuf, &rbuf)) + goto done; - if (prs_offset(&rbuf)!= 0 && r_o.status != 0) - { - /* report error code */ - DEBUG(3,("SPOOLSS_OPENPRINTEREX: %s\n", nt_errstr(r_o.status))); - p = False; - } + /* Unmarshall response */ - if (p) - { - /* ok, at last: we're happy. return the policy handle */ - *hnd = r_o.handle; + if (!spoolss_io_r_open_printer_ex("", &r, &rbuf, 0)) + goto done; - /* associate the handle returned with the current - state of the clienjt connection */ - valid_pol = RpcHndList_set_connection(hnd, con); + /* Return output parameters */ - } - } + result = r.status; + if (W_ERROR_IS_OK(result)) + *pol = r.handle; + + done: + prs_mem_free(&qbuf); prs_mem_free(&rbuf); - prs_mem_free(&buf ); - if (mem_ctx) - talloc_destroy(mem_ctx); - return valid_pol; + return result; } -/**************************************************************************** - do a SPOOLSS AddPrinterEx() - **ALWAYS** uses as PRINTER_INFO level 2 struct -****************************************************************************/ -BOOL spoolss_addprinterex(POLICY_HND *hnd, const char* srv_name, PRINTER_INFO_2 *info2) +/** Close a printer handle + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param pol Policy handle of printer or print server to close. + */ +/********************************************************************************* + Win32 API - ClosePrinter() + ********************************************************************************/ + +WERROR cli_spoolss_close_printer(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol) { - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_ADDPRINTEREX q_o; - SPOOL_R_ADDPRINTEREX r_o; - struct cli_connection *con = NULL; - TALLOC_CTX *mem_ctx = NULL; - fstring the_client_name; - BOOL valid_pol = True; + prs_struct qbuf, rbuf; + SPOOL_Q_CLOSEPRINTER q; + SPOOL_R_CLOSEPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + ZERO_STRUCT(q); + ZERO_STRUCT(r); + /* Initialise parse structures */ - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return NT_STATUS_ACCESS_DENIED; + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - if (hnd == NULL) - return NT_STATUS_INVALID_PARAMETER; + /* Initialise input parameters */ - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("spoolss_addprinterex: talloc_init() failed!\n")); - return NT_STATUS_ACCESS_DENIED; + make_spoolss_q_closeprinter(&q, pol); + + /* Marshall data and send request */ + + if (!spoolss_io_q_closeprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_CLOSEPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_closeprinter("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (W_ERROR_IS_OK(result)) + *pol = r.handle; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Enumerate printers on a print server. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * may be NULL. + * + * @param flags Selected from PRINTER_ENUM_* flags. + * @param level Request information level. + * + * @param num_printers Pointer to number of printers returned. May be + * NULL. + * @param ctr Return structure for printer information. May + * be NULL. + */ +/********************************************************************************* + Win32 API - EnumPrinters() + ********************************************************************************/ + +WERROR cli_spoolss_enum_printers(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 flags, uint32 level, + uint32 *num_printers, PRINTER_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMPRINTERS q; + SPOOL_R_ENUMPRINTERS r; + NEW_BUFFER buffer; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + make_spoolss_q_enumprinters(&q, flags, server, level, &buffer, + offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumprinters("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (spoolss_io_r_enumprinters("", &r, &rbuf, 0)) { + if (needed) + *needed = r.needed; } - prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SPOOLSS_ENUMPORTS */ - DEBUG(5,("SPOOLSS Add Printer Ex (Server: %s)\n", srv_name)); - fstrcpy(the_client_name, "\\\\"); - fstrcat(the_client_name, con->pCli_state->desthost); - strupper(the_client_name); + result = r.status; + + /* Return output parameters */ + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + if (num_printers) + *num_printers = r.returned; + + if (!ctr) + goto done; + + switch (level) { + case 0: + decode_printer_info_0(mem_ctx, r.buffer, r.returned, + &ctr->printers_0); + break; + case 1: + decode_printer_info_1(mem_ctx, r.buffer, r.returned, + &ctr->printers_1); + break; + case 2: + decode_printer_info_2(mem_ctx, r.buffer, r.returned, + &ctr->printers_2); + break; + case 3: + decode_printer_info_3(mem_ctx, r.buffer, r.returned, + &ctr->printers_3); + break; + } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - make_spoolss_q_addprinterex(mem_ctx, &q_o, srv_name, the_client_name, - /* "Administrator", */ - con->pCli_state->user_name, - 2, info2); + return result; +} - /* turn parameters into data stream and send the request */ - if (spoolss_io_q_addprinterex("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_ADDPRINTEREX, &buf, &rbuf)) - { - ZERO_STRUCT(r_o); +/********************************************************************************* + Win32 API - EnumPorts() + ********************************************************************************/ +/** Enumerate printer ports on a print server. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * May be NULL. + * + * @param level Requested information level. + * + * @param num_ports Pointer to number of ports returned. May be NULL. + * @param ctr Pointer to structure holding port information. + * May be NULL. + */ - if(spoolss_io_r_addprinterex("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - /* report error code */ - DEBUG(3,("SPOOLSS_ADDPRINTEREX: %s\n", nt_errstr(r_o.status))); - valid_pol = False; - } - } +WERROR cli_spoolss_enum_ports(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, int *num_ports, PORT_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMPORTS q; + SPOOL_R_ENUMPORTS r; + NEW_BUFFER buffer; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + make_spoolss_q_enumports(&q, server, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumports("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENUMPORTS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (spoolss_io_r_enumports("", &r, &rbuf, 0)) { + if (needed) + *needed = r.needed; + } - if (valid_pol) - { - /* ok, at last: we're happy. return the policy handle */ - copy_policy_hnd( hnd, &r_o.handle); + result = r.status; - /* associate the handle returned with the current - state of the clienjt connection */ - RpcHndList_set_connection(hnd, con); - } - } + /* Return output parameters */ + if (!W_ERROR_IS_OK(result)) + goto done; - prs_mem_free(&rbuf); - prs_mem_free(&buf ); + if (num_ports) + *num_ports = r.returned; - if (mem_ctx) - talloc_destroy(mem_ctx); - - return valid_pol; -} - -/**************************************************************************** -do a SPOOL Close -****************************************************************************/ -BOOL spoolss_closeprinter(POLICY_HND *hnd) -{ - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_CLOSEPRINTER q_c; - BOOL valid_close = False; - TALLOC_CTX *mem_ctx = NULL; + if (!ctr) + goto done; - if (hnd == NULL) - return False; + switch (level) { + case 1: + decode_port_info_1(mem_ctx, r.buffer, r.returned, + &ctr->port.info_1); + break; + case 2: + decode_port_info_2(mem_ctx, r.buffer, r.returned, + &ctr->port.info_2); + break; + } - /* create and send a MSRPC command with api SPOOLSS_CLOSEPRINTER */ - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); - return False; - } - prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - DEBUG(4,("SPOOL Close Printer\n")); - - /* store the parameters */ - make_spoolss_q_closeprinter(&q_c, hnd); - - /* turn parameters into data stream */ - if (spoolss_io_q_closeprinter("", &q_c, &buf, 0) && - rpc_hnd_pipe_req(hnd, SPOOLSS_CLOSEPRINTER, &buf, &rbuf)) - { - SPOOL_R_CLOSEPRINTER r_c; - - spoolss_io_r_closeprinter("", &r_c, &rbuf, 0); - - if (prs_offset(&rbuf)!=0 && r_c.status != 0) - { - /* report error code */ - DEBUG(3,("SPOOL_CLOSEPRINTER: %s\n", nt_errstr(r_c.status))); - } - else - valid_close = True; - } - - prs_mem_free(&rbuf); - prs_mem_free(&buf ); - if (mem_ctx) - talloc_destroy(mem_ctx); - - /* disassociate with the cli_connection */ - RpcHndList_del_connection(hnd); - - return valid_close; -} - -/**************************************************************************** -do a SPOOLSS Get printer datas -****************************************************************************/ -uint32 spoolss_getprinterdata(const POLICY_HND *hnd, const UNISTR2 *valuename, - uint32 in_size, - uint32 *type, - uint32 *out_size, - uint8 *data, - uint32 *needed) -{ - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_GETPRINTERDATA q_o; - SPOOL_R_GETPRINTERDATA r_o; - TALLOC_CTX *mem_ctx = NULL; - - if (hnd == NULL) - return NT_STATUS_INVALID_PARAMETER; - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); - return False; - } - prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SPOOLSS_GETPRINTERDATA */ - - DEBUG(5,("SPOOLSS Get Printer data)\n")); - - make_spoolss_q_getprinterdata(&q_o, hnd,(UNISTR2 *)valuename, in_size); - - /* turn parameters into data stream */ - if (spoolss_io_q_getprinterdata("", &q_o, &buf, 0) && - rpc_hnd_pipe_req(hnd, SPOOLSS_GETPRINTERDATA, &buf, &rbuf)) - { - ZERO_STRUCT(r_o); - prs_mem_free(&buf ); - - r_o.data=data; - - if(spoolss_io_r_getprinterdata("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - DEBUG(3,("SPOOLSS_GETPRINTERDATA: %s\n", nt_errstr(r_o.status))); - } - - *type=r_o.type; - *out_size=r_o.size; - *needed=r_o.needed; - } - } - - prs_mem_free(&rbuf); - prs_mem_free(&buf ); - - return r_o.status; -} - -/**************************************************************************** -do a SPOOLSS Get Printer Driver Direcotry -****************************************************************************/ -uint32 spoolss_getprinterdriverdir(fstring srv_name, fstring env_name, uint32 level, - NEW_BUFFER *buffer, uint32 offered, - uint32 *needed) -{ - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_GETPRINTERDRIVERDIR q_o; - SPOOL_R_GETPRINTERDRIVERDIR r_o; - TALLOC_CTX *ctx = prs_get_mem_context(&buffer->prs); - - struct cli_connection *con = NULL; - - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return False; - - prs_init(&buf, MAX_PDU_FRAG_LEN, ctx, MARSHALL); - prs_init(&rbuf, 0, ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SPOOLSS_ENUM_PRINTERS */ - - DEBUG(5,("SPOOLSS GetPrinterDriverDir (Server: %s Env: %s level: %d)\n", - srv_name, env_name, level)); - - make_spoolss_q_getprinterdriverdir(&q_o, srv_name, env_name, level, - buffer, offered); - - /* turn parameters into data stream */ - if (spoolss_io_q_getprinterdriverdir("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_GETPRINTERDRIVERDIRECTORY, &buf, &rbuf)) - { - prs_mem_free(&buf ); - ZERO_STRUCT(r_o); - - prs_switch_type(&buffer->prs, UNMARSHALL); - prs_set_offset(&buffer->prs, 0); - r_o.buffer=buffer; - - if(spoolss_io_r_getprinterdriverdir("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - DEBUG(3,("SPOOLSS_GETPRINTERDRIVERDIRECTORY: %s\n", nt_errstr(r_o.status))); - } - - *needed=r_o.needed; - } - } - - prs_mem_free(&rbuf); - prs_mem_free(&buf ); - - cli_connection_unlink(con); - - return r_o.status; -} - -/****************************************************************************** - AddPrinterDriver() - *****************************************************************************/ -uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIVER_CTR *info) -{ - prs_struct rbuf; - prs_struct buf; - SPOOL_Q_ADDPRINTERDRIVER q_o; - SPOOL_R_ADDPRINTERDRIVER r_o; - TALLOC_CTX *mem_ctx = NULL; - struct cli_connection *con = NULL; + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - if (!cli_connection_init(srv_name, PIPE_SPOOLSS, &con)) - return False; + return result; +} - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); - return False; - } - prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); - prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); +/********************************************************************************* + Win32 API - GetPrinter() + ********************************************************************************/ + +WERROR cli_spoolss_getprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETPRINTER q; + SPOOL_R_GETPRINTER r; + NEW_BUFFER buffer; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); - /* make the ADDPRINTERDRIVER PDU */ - make_spoolss_q_addprinterdriver(mem_ctx, &q_o, srv_name, level, info); + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - /* turn the data into an io stream */ - if (spoolss_io_q_addprinterdriver("", &q_o, &buf, 0) && - rpc_con_pipe_req(con, SPOOLSS_ADDPRINTERDRIVER, &buf, &rbuf)) - { - ZERO_STRUCT(r_o); + make_spoolss_q_getprinter(mem_ctx, &q, pol, level, &buffer, offered); + + /* Marshall data and send request */ - if(spoolss_io_r_addprinterdriver("", &r_o, &rbuf, 0)) - { - if (r_o.status != NT_STATUS_OK) - { - /* report error code */ - DEBUG(3,("SPOOLSS_ADDPRINTERDRIVER: %s\n", nt_errstr(r_o.status))); - } - } - } + if (!spoolss_io_q_getprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTER, &qbuf, &rbuf)) + goto done; + /* Unmarshall response */ - prs_mem_free(&rbuf); - prs_mem_free(&buf ); + if (!spoolss_io_r_getprinter("", &r, &rbuf, 0)) + goto done; - if (mem_ctx) - talloc_destroy(mem_ctx); + if (needed) + *needed = r.needed; + + /* Return output parameters */ + + result = r.status; + + if (W_ERROR_IS_OK(result)) { + switch (level) { + case 0: + decode_printer_info_0(mem_ctx, r.buffer, 1, &ctr->printers_0); + break; + case 1: + decode_printer_info_1(mem_ctx, r.buffer, 1, &ctr->printers_1); + break; + case 2: + decode_printer_info_2(mem_ctx, r.buffer, 1, &ctr->printers_2); + break; + case 3: + decode_printer_info_3(mem_ctx, r.buffer, 1, &ctr->printers_3); + break; + } + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - SetPrinter() + ********************************************************************************/ +/** Set printer info + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param pol Policy handle on printer to set info. + * @param level Information level to set. + * @param ctr Pointer to structure holding printer information. + * @param command Specifies the action performed. See + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_13ua.asp + * for details. + * + */ + +WERROR cli_spoolss_setprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 level, + PRINTER_INFO_CTR *ctr, uint32 command) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_SETPRINTER q; + SPOOL_R_SETPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise input parameters */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - return r_o.status; + make_spoolss_q_setprinter(mem_ctx, &q, pol, level, ctr, command); + /* Marshall data and send request */ + + if (!spoolss_io_q_setprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_SETPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_setprinter("", &r, &rbuf, 0)) + goto done; + + result = r.status; + +done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; } + +/********************************************************************************* + Win32 API - GetPrinterDriver() + ********************************************************************************/ +/** Get installed printer drivers for a given printer + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * may be NULL. + * + * @param pol Pointer to an open policy handle for the printer + * opened with cli_spoolss_open_printer_ex(). + * @param level Requested information level. + * @param env The print environment or archictecture. This is + * "Windows NT x86" for NT4. + * @param ctr Returned printer driver information. + */ + +WERROR cli_spoolss_getprinterdriver(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *pol, uint32 level, + char *env, PRINTER_DRIVER_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETPRINTERDRIVER2 q; + SPOOL_R_GETPRINTERDRIVER2 r; + NEW_BUFFER buffer; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + fstrcpy (server, cli->desthost); + strupper (server); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + make_spoolss_q_getprinterdriver2(&q, pol, env, level, 2, 2, + &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getprinterdriver2 ("", &q, &qbuf, 0) || + !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVER2, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (spoolss_io_r_getprinterdriver2 ("", &r, &rbuf, 0)) { + if (needed) + *needed = r.needed; + } + + result = r.status; + + /* Return output parameters */ + + if (!W_ERROR_IS_OK(result)) + goto done; + + if (!ctr) + goto done; + + switch (level) { + case 1: + decode_printer_driver_1(mem_ctx, r.buffer, 1, &ctr->info1); + break; + case 2: + decode_printer_driver_2(mem_ctx, r.buffer, 1, &ctr->info2); + break; + case 3: + decode_printer_driver_3(mem_ctx, r.buffer, 1, &ctr->info3); + break; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - EnumPrinterDrivers() + ********************************************************************************/ +/********************************************************************** + * Get installed printer drivers for a given printer + */ +WERROR cli_spoolss_enumprinterdrivers (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + uint32 *num_drivers, + PRINTER_DRIVER_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMPRINTERDRIVERS q; + SPOOL_R_ENUMPRINTERDRIVERS r; + NEW_BUFFER buffer; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Write the request */ + + make_spoolss_q_enumprinterdrivers(&q, server, env, level, &buffer, + offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumprinterdrivers ("", &q, &qbuf, 0) || + !rpc_api_pipe_req (cli, SPOOLSS_ENUMPRINTERDRIVERS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_enumprinterdrivers ("", &r, &rbuf, 0)) + goto done; + + if (needed) + *needed = r.needed; + + if (num_drivers) + *num_drivers = r.returned; + + result = r.status; + + /* Return output parameters */ + + if (W_ERROR_IS_OK(result) && (r.returned != 0)) { + *num_drivers = r.returned; + + switch (level) { + case 1: + decode_printer_driver_1(mem_ctx, r.buffer, r.returned, &ctr->info1); + break; + case 2: + decode_printer_driver_2(mem_ctx, r.buffer, r.returned, &ctr->info2); + break; + case 3: + decode_printer_driver_3(mem_ctx, r.buffer, r.returned, &ctr->info3); + break; + } + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + + +/********************************************************************************* + Win32 API - GetPrinterDriverDirectory() + ********************************************************************************/ +/********************************************************************** + * Get installed printer drivers for a given printer + */ +WERROR cli_spoolss_getprinterdriverdir (struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + uint32 level, char *env, + DRIVER_DIRECTORY_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETPRINTERDRIVERDIR q; + SPOOL_R_GETPRINTERDRIVERDIR r; + NEW_BUFFER buffer; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Write the request */ + + make_spoolss_q_getprinterdriverdir(&q, server, env, level, &buffer, + offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getprinterdriverdir ("", &q, &qbuf, 0) || + !rpc_api_pipe_req (cli, SPOOLSS_GETPRINTERDRIVERDIRECTORY, + &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (spoolss_io_r_getprinterdriverdir ("", &r, &rbuf, 0)) { + if (needed) + *needed = r.needed; + } + + /* Return output parameters */ + + result = r.status; + + if (W_ERROR_IS_OK(result)) { + switch (level) { + case 1: + decode_printerdriverdir_1(mem_ctx, r.buffer, 1, + &ctr->info1); + break; + } + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - AddPrinterDriver() + ********************************************************************************/ +/********************************************************************** + * Install a printer driver + */ +WERROR cli_spoolss_addprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, uint32 level, + PRINTER_DRIVER_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ADDPRINTERDRIVER q; + SPOOL_R_ADDPRINTERDRIVER r; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + /* Initialise input parameters */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Write the request */ + + make_spoolss_q_addprinterdriver (mem_ctx, &q, server, level, ctr); + + /* Marshall data and send request */ + + if (!spoolss_io_q_addprinterdriver ("", &q, &qbuf, 0) || + !rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTERDRIVER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_addprinterdriver ("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + +done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - AddPrinter() + ********************************************************************************/ +/********************************************************************** + * Install a printer + */ +WERROR cli_spoolss_addprinterex (struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 level, PRINTER_INFO_CTR*ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ADDPRINTEREX q; + SPOOL_R_ADDPRINTEREX r; + WERROR result = W_ERROR(ERRgeneral); + fstring server, + client, + user; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + slprintf (client, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (client); + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + fstrcpy (user, cli->user_name); + + /* Initialise input parameters */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Write the request */ + + make_spoolss_q_addprinterex (mem_ctx, &q, server, client, user, + level, ctr); + + /* Marshall data and send request */ + + if (!spoolss_io_q_addprinterex ("", &q, &qbuf, 0) || + !rpc_api_pipe_req (cli, SPOOLSS_ADDPRINTEREX, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_addprinterex ("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - DeltePrinterDriver() + ********************************************************************************/ +/********************************************************************** + * Delete a Printer Driver from the server (does not remove + * the driver files + */ +WERROR cli_spoolss_deleteprinterdriver (struct cli_state *cli, + TALLOC_CTX *mem_ctx, char *arch, + char *driver) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_DELETEPRINTERDRIVER q; + SPOOL_R_DELETEPRINTERDRIVER r; + WERROR result = W_ERROR(ERRgeneral); + fstring server; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + + /* Initialise input parameters */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); + strupper (server); + + /* Write the request */ + + make_spoolss_q_deleteprinterdriver(mem_ctx, &q, server, arch, driver); + + /* Marshall data and send request */ + + if (!spoolss_io_q_deleteprinterdriver ("", &q, &qbuf, 0) || + !rpc_api_pipe_req (cli,SPOOLSS_DELETEPRINTERDRIVER , &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_deleteprinterdriver ("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/********************************************************************************* + Win32 API - GetPrinterProcessorDirectory() + ********************************************************************************/ + +WERROR cli_spoolss_getprintprocessordirectory(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + char *name, char *environment, + fstring procdir) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETPRINTPROCESSORDIRECTORY q; + SPOOL_R_GETPRINTPROCESSORDIRECTORY r; + int level = 1; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + init_buffer(&buffer, offered, mem_ctx); + + make_spoolss_q_getprintprocessordirectory( + &q, name, environment, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getprintprocessordirectory("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTPROCESSORDIRECTORY, + &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_getprintprocessordirectory("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (W_ERROR_IS_OK(result)) + fstrcpy(procdir, "Not implemented!"); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Add a form to a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param level Form info level to add - should always be 1. + * @param form A pointer to the form to be added. + * + */ + +WERROR cli_spoolss_addform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, FORM *form) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ADDFORM q; + SPOOL_R_ADDFORM r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_addform(&q, handle, level, form); + + /* Marshall data and send request */ + + if (!spoolss_io_q_addform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ADDFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_addform("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Set a form on a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param level Form info level to set - should always be 1. + * @param form A pointer to the form to be set. + * + */ + +WERROR cli_spoolss_setform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, uint32 level, char *form_name, + FORM *form) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_SETFORM q; + SPOOL_R_SETFORM r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_setform(&q, handle, level, form_name, form); + + /* Marshall data and send request */ + + if (!spoolss_io_q_setform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_SETFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_setform("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (!W_ERROR_IS_OK(result)) + goto done; + + + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Get a form on a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param formname Name of the form to get + * @param level Form info level to get - should always be 1. + * + */ + +WERROR cli_spoolss_getform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, char *formname, uint32 level, + FORM_1 *form) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETFORM q; + SPOOL_R_GETFORM r; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_getform(&q, handle, formname, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_getform("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (W_ERROR_IS_OK(result)) + smb_io_form_1("", r.buffer, form, 0); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** Delete a form on a printer. + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param handle Policy handle opened with cli_spoolss_open_printer_ex + * or cli_spoolss_addprinterex. + * @param form The name of the form to delete. + * + */ + +WERROR cli_spoolss_deleteform(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *handle, char *form_name) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_DELETEFORM q; + SPOOL_R_DELETEFORM r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_deleteform(&q, handle, form_name); + + /* Marshall data and send request */ + + if (!spoolss_io_q_deleteform("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_DELETEFORM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_deleteform("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +static void decode_forms_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 num_forms, FORM_1 **forms) +{ + int i; + + *forms = (FORM_1 *)talloc(mem_ctx, num_forms * sizeof(FORM_1)); + buffer->prs.data_offset = 0; + + for (i = 0; i < num_forms; i++) + smb_io_form_1("", buffer, &((*forms)[i]), 0); +} + +/** Enumerate forms + * + * @param cli Pointer to client state structure which is open + * on the SPOOLSS pipe. + * @param mem_ctx Pointer to an initialised talloc context. + * + * @param offered Buffer size offered in the request. + * @param needed Number of bytes needed to complete the request. + * may be NULL. + * or cli_spoolss_addprinterex. + * @param level Form info level to get - should always be 1. + * @param handle Open policy handle + * + */ + +WERROR cli_spoolss_enumforms(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *handle, int level, uint32 *num_forms, + FORM_1 **forms) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMFORMS q; + SPOOL_R_ENUMFORMS r; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_enumforms(&q, handle, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumforms("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENUMFORMS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_enumforms("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (num_forms) + *num_forms = r.numofforms; + + decode_forms_1(mem_ctx, r.buffer, *num_forms, forms); + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +static void decode_jobs_1(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 num_jobs, JOB_INFO_1 **jobs) +{ + uint32 i; + + *jobs = (JOB_INFO_1 *)talloc(mem_ctx, num_jobs * sizeof(JOB_INFO_1)); + buffer->prs.data_offset = 0; + + for (i = 0; i < num_jobs; i++) + smb_io_job_info_1("", buffer, &((*jobs)[i]), 0); +} + +static void decode_jobs_2(TALLOC_CTX *mem_ctx, NEW_BUFFER *buffer, + uint32 num_jobs, JOB_INFO_2 **jobs) +{ + uint32 i; + + *jobs = (JOB_INFO_2 *)talloc(mem_ctx, num_jobs * sizeof(JOB_INFO_2)); + buffer->prs.data_offset = 0; + + for (i = 0; i < num_jobs; i++) + smb_io_job_info_2("", buffer, &((*jobs)[i]), 0); +} + +/* Enumerate jobs */ + +WERROR cli_spoolss_enumjobs(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *hnd, uint32 level, uint32 firstjob, + uint32 num_jobs, uint32 *returned, JOB_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMJOBS q; + SPOOL_R_ENUMJOBS r; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_enumjobs(&q, hnd, firstjob, num_jobs, level, &buffer, + offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumjobs("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENUMJOBS, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_enumjobs("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + *returned = r.returned; + + switch(level) { + case 1: + decode_jobs_1(mem_ctx, r.buffer, r.returned, + ctr->job.job_info_1); + break; + case 2: + decode_jobs_2(mem_ctx, r.buffer, r.returned, + ctr->job.job_info_2); + break; + default: + DEBUG(3, ("unsupported info level %d", level)); + break; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Set job */ + +WERROR cli_spoolss_setjob(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, uint32 jobid, uint32 level, + uint32 command) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_SETJOB q; + SPOOL_R_SETJOB r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_setjob(&q, hnd, jobid, level, command); + + /* Marshall data and send request */ + + if (!spoolss_io_q_setjob("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_SETJOB, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_setjob("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Get job */ + +WERROR cli_spoolss_getjob(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *hnd, uint32 jobid, uint32 level, + JOB_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETJOB q; + SPOOL_R_GETJOB r; + WERROR result = W_ERROR(ERRgeneral); + NEW_BUFFER buffer; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + init_buffer(&buffer, offered, mem_ctx); + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_getjob(&q, hnd, jobid, level, &buffer, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getjob("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETJOB, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_getjob("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (needed) + *needed = r.needed; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + switch(level) { + case 1: + decode_jobs_1(mem_ctx, r.buffer, 1, ctr->job.job_info_1); + break; + case 2: + decode_jobs_2(mem_ctx, r.buffer, 1, ctr->job.job_info_2); + break; + default: + DEBUG(3, ("unsupported info level %d", level)); + break; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Startpageprinter. Sent to notify the spooler when a page is about to be + sent to a printer. */ + +WERROR cli_spoolss_startpageprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_STARTPAGEPRINTER q; + SPOOL_R_STARTPAGEPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_startpageprinter(&q, hnd); + + /* Marshall data and send request */ + + if (!spoolss_io_q_startpageprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_STARTPAGEPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_startpageprinter("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Endpageprinter. Sent to notify the spooler when a page has finished + being sent to a printer. */ + +WERROR cli_spoolss_endpageprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENDPAGEPRINTER q; + SPOOL_R_ENDPAGEPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_endpageprinter(&q, hnd); + + /* Marshall data and send request */ + + if (!spoolss_io_q_endpageprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENDPAGEPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_endpageprinter("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Startdocprinter. Sent to notify the spooler that a document is about + to be spooled for printing. */ + +WERROR cli_spoolss_startdocprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, char *docname, + char *outputfile, char *datatype, + uint32 *jobid) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_STARTDOCPRINTER q; + SPOOL_R_STARTDOCPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + uint32 level = 1; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_startdocprinter(&q, hnd, level, docname, outputfile, + datatype); + + /* Marshall data and send request */ + + if (!spoolss_io_q_startdocprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_STARTDOCPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_startdocprinter("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + if (W_ERROR_IS_OK(result)) + *jobid = r.jobid; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Enddocprinter. Sent to notify the spooler that a document has finished + being spooled. */ + +WERROR cli_spoolss_enddocprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENDDOCPRINTER q; + SPOOL_R_ENDDOCPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_enddocprinter(&q, hnd); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enddocprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENDDOCPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_enddocprinter("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Get printer data */ + +WERROR cli_spoolss_getprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 offered, uint32 *needed, + POLICY_HND *hnd, char *valuename, + uint32 *data_type, char **data, + uint32 *data_size) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_GETPRINTERDATA q; + SPOOL_R_GETPRINTERDATA r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_getprinterdata(&q, hnd, valuename, offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_getprinterdata("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_GETPRINTERDATA, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_getprinterdata("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (needed) + *needed = r.needed; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + /* Return output parameters */ + + if (data_type) + *data_type = r.type; + + if (data) { + *data = (char *)talloc(mem_ctx, r.needed); + memcpy(*data, r.data, r.needed); + } + + if (data_size) + *data_size = r.needed; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Set printer data */ + +WERROR cli_spoolss_setprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, char *value, + uint32 data_type, char *data, + uint32 data_size) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_SETPRINTERDATA q; + SPOOL_R_SETPRINTERDATA r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_setprinterdata(&q, hnd, value, data, data_size); + + /* Marshall data and send request */ + + if (!spoolss_io_q_setprinterdata("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_SETPRINTERDATA, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_setprinterdata("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Enum printer data */ + +WERROR cli_spoolss_enumprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, uint32 ndx, + uint32 value_offered, uint32 data_offered, + uint32 *value_needed, uint32 *data_needed, + char **value, uint32 *data_type, char **data, + uint32 *data_size) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_ENUMPRINTERDATA q; + SPOOL_R_ENUMPRINTERDATA r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_enumprinterdata(&q, hnd, ndx, value_offered, data_offered); + + /* Marshall data and send request */ + + if (!spoolss_io_q_enumprinterdata("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_ENUMPRINTERDATA, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_enumprinterdata("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + /* Return data */ + + if (value_needed) + *value_needed = r.realvaluesize; + + if (data_needed) + *data_needed = r.realdatasize; + + if (data_type) + *data_type = r.type; + + if (value) { + fstring the_value; + + rpcstr_pull(the_value, r.value, sizeof(the_value), -1, + STR_TERMINATE); + + *value = talloc_strdup(mem_ctx, the_value); + } + + if (data) + *data = talloc_memdup(mem_ctx, r.data, r.realdatasize); + + if (data_size) + *data_size = r.realdatasize; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Write data to printer */ + +WERROR cli_spoolss_writeprinter(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, uint32 data_size, char *data, + uint32 *num_written) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_WRITEPRINTER q; + SPOOL_R_WRITEPRINTER r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_writeprinter(&q, hnd, data_size, data); + + /* Marshall data and send request */ + + if (!spoolss_io_q_writeprinter("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_WRITEPRINTER, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_writeprinter("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + if (num_written) + *num_written = r.buffer_written; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/* Delete printer data */ + +WERROR cli_spoolss_deleteprinterdata(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *hnd, char *valuename) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_DELETEPRINTERDATA q; + SPOOL_R_DELETEPRINTERDATA r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_deleteprinterdata(&q, hnd, valuename); + + /* Marshall data and send request */ + + if (!spoolss_io_q_deleteprinterdata("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_DELETEPRINTERDATA, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!spoolss_io_r_deleteprinterdata("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (!W_ERROR_IS_OK(r.status)) + goto done; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +/** @} **/ diff --git a/source3/libsmb/cli_spoolss_notify.c b/source3/rpc_client/cli_spoolss_notify.c similarity index 100% rename from source3/libsmb/cli_spoolss_notify.c rename to source3/rpc_client/cli_spoolss_notify.c diff --git a/source3/rpc_client/cli_srvsvc.c b/source3/rpc_client/cli_srvsvc.c index 06e733893e1..1bdd19620b4 100644 --- a/source3/rpc_client/cli_srvsvc.c +++ b/source3/rpc_client/cli_srvsvc.c @@ -1,404 +1,445 @@ /* - * Unix SMB/CIFS implementation. - * RPC Pipe client / server routines - * Copyright (C) Andrew Tridgell 1992-1997, - * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Jeremy Allison 1999. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ + Unix SMB/CIFS implementation. + NT Domain Authentication SMB / MSRPC client + Copyright (C) Andrew Tridgell 1994-2000 + Copyright (C) Luke Kenneth Casson Leighton 1996-2000 + Copyright (C) Tim Potter 2001 + Copyright (C) Jim McDonough 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ #include "includes.h" -#undef DBGC_CLASS -#define DBGC_CLASS DBGC_RPC_CLI - -/**************************************************************************** -do a server net conn enum -****************************************************************************/ -BOOL do_srv_net_srv_conn_enum(struct cli_state *cli, - char *server_name, char *qual_name, - uint32 switch_value, SRV_CONN_INFO_CTR *ctr, - uint32 preferred_len, - ENUM_HND *hnd) +NTSTATUS cli_srvsvc_net_srv_get_info(struct cli_state *cli, + TALLOC_CTX *mem_ctx, + uint32 switch_value, SRV_INFO_CTR *ctr) { - prs_struct data; - prs_struct rdata; - SRV_Q_NET_CONN_ENUM q_o; - SRV_R_NET_CONN_ENUM r_o; + prs_struct qbuf, rbuf; + SRV_Q_NET_SRV_GET_INFO q; + SRV_R_NET_SRV_GET_INFO r; + NTSTATUS result; - if (server_name == NULL || ctr == NULL || preferred_len == 0) - return False; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + /* Initialise parse structures */ - /* create and send a MSRPC command with api SRV_NET_CONN_ENUM */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SRV Net Server Connection Enum(%s, %s), level %d, enum:%8x\n", - server_name, qual_name, switch_value, get_enum_hnd(hnd))); - - ctr->switch_value = switch_value; - ctr->ptr_conn_ctr = 1; - ctr->conn.info0.num_entries_read = 0; - ctr->conn.info0.ptr_conn_info = 1; + /* Initialise input parameters */ - /* store the parameters */ - init_srv_q_net_conn_enum(&q_o, server_name, qual_name, - switch_value, ctr, - preferred_len, - hnd); + init_srv_q_net_srv_get_info(&q, cli->srv_name_slash, switch_value); - /* turn parameters into data stream */ - if(!srv_io_q_net_conn_enum("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + /* Marshall data and send request */ + + if (!srv_io_q_net_srv_get_info("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - /* send the data on \PIPE\ */ - if(!rpc_api_pipe_req(cli, SRV_NET_CONN_ENUM, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; + /* Unmarshall response */ + + r.ctr = ctr; + + if (!srv_io_r_net_srv_get_info("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; } - prs_mem_free(&data); + result = werror_to_ntstatus(r.status); - r_o.ctr = ctr; + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - if(!srv_io_r_net_conn_enum("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } - - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SRV_R_NET_SRV_CONN_ENUM: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } - - if (r_o.ctr->switch_value != switch_value) { - /* different switch levels. oops. */ - DEBUG(0,("SRV_R_NET_SRV_CONN_ENUM: info class %d does not match request %d\n", - r_o.ctr->switch_value, switch_value)); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; + return result; } -/**************************************************************************** -do a server net sess enum -****************************************************************************/ - -BOOL do_srv_net_srv_sess_enum(struct cli_state *cli, - char *server_name, char *qual_name, - char *user_name, - uint32 switch_value, SRV_SESS_INFO_CTR *ctr, - uint32 preferred_len, - ENUM_HND *hnd) +WERROR cli_srvsvc_net_share_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 info_level, SRV_SHARE_INFO_CTR *ctr, + int preferred_len, ENUM_HND *hnd) { - prs_struct data; - prs_struct rdata; - SRV_Q_NET_SESS_ENUM q_o; - SRV_R_NET_SESS_ENUM r_o; + prs_struct qbuf, rbuf; + SRV_Q_NET_SHARE_ENUM q; + SRV_R_NET_SHARE_ENUM r; + WERROR result = W_ERROR(ERRgeneral); + int i; - if (server_name == NULL || ctr == NULL || preferred_len == 0) - return False; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + /* Initialise parse structures */ - /* create and send a MSRPC command with api SRV_NET_SESS_ENUM */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SRV Net Session Enum (%s), level %d, enum:%8x\n", - server_name, switch_value, get_enum_hnd(hnd))); - - ctr->switch_value = switch_value; - ctr->ptr_sess_ctr = 1; - ctr->sess.info0.num_entries_read = 0; - ctr->sess.info0.ptr_sess_info = 1; + /* Initialise input parameters */ - /* store the parameters */ - init_srv_q_net_sess_enum(&q_o, server_name, qual_name, user_name, - switch_value, ctr, - preferred_len, - hnd); + init_srv_q_net_share_enum( + &q, cli->srv_name_slash, info_level, preferred_len, hnd); - /* turn parameters into data stream */ - if(!srv_io_q_net_sess_enum("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + /* Marshall data and send request */ - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SRV_NET_SESS_ENUM, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + if (!srv_io_q_net_share_enum("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_SHARE_ENUM_ALL, &qbuf, &rbuf)) + goto done; - prs_mem_free(&data); + /* Unmarshall response */ - r_o.ctr = ctr; + if (!srv_io_r_net_share_enum("", &r, &rbuf, 0)) + goto done; - if(!srv_io_r_net_sess_enum("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } + result = r.status; + + if (!W_ERROR_IS_OK(result)) + goto done; + + /* Oh yuck yuck yuck - we have to copy all the info out of the + SRV_SHARE_INFO_CTR in the SRV_R_NET_SHARE_ENUM as when we do a + prs_mem_free() it will all be invalidated. The various share + info structures suck badly too. This really is gross. */ + + ZERO_STRUCTP(ctr); + + if (!r.ctr.num_entries) + goto done; + + ctr->info_level = info_level; + ctr->num_entries = r.ctr.num_entries; + + switch(info_level) { + case 1: + ctr->share.info1 = (SRV_SHARE_INFO_1 *)talloc( + mem_ctx, sizeof(SRV_SHARE_INFO_1) * ctr->num_entries); - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SRV_R_NET_SRV_SESS_ENUM: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } + memset(ctr->share.info1, 0, sizeof(SRV_SHARE_INFO_1)); - if (r_o.ctr->switch_value != switch_value) { - /* different switch levels. oops. */ - DEBUG(0,("SRV_R_NET_SRV_SESS_ENUM: info class %d does not match request %d\n", - r_o.ctr->switch_value, switch_value)); - prs_mem_free(&rdata); - return False; - } + for (i = 0; i < ctr->num_entries; i++) { + SRV_SHARE_INFO_1 *info1 = &ctr->share.info1[i]; + char *s; + + /* Copy pointer crap */ - prs_mem_free(&rdata); - - return True; -} + memcpy(&info1->info_1, &r.ctr.share.info1[i].info_1, + sizeof(SH_INFO_1)); -/**************************************************************************** -do a server net share enum -****************************************************************************/ -BOOL do_srv_net_srv_share_enum(struct cli_state *cli, - char *server_name, - uint32 switch_value, SRV_R_NET_SHARE_ENUM *r_o, - uint32 preferred_len, ENUM_HND *hnd) -{ - prs_struct data; - prs_struct rdata; - SRV_Q_NET_SHARE_ENUM q_o; + /* Duplicate strings */ - if (server_name == NULL || preferred_len == 0) - return False; - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SRV_NET_SHARE_ENUM */ - - DEBUG(4,("SRV Get Share Info (%s), level %d, enum:%8x\n", - server_name, switch_value, get_enum_hnd(hnd))); - - /* store the parameters */ - init_srv_q_net_share_enum(&q_o, server_name, switch_value, - preferred_len, hnd); - - /* turn parameters into data stream */ - if(!srv_io_q_net_share_enum("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SRV_NET_SHARE_ENUM, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&data); - - if(!srv_io_r_net_share_enum("", r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } + s = unistr2_tdup(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_netname); + if (s) + init_unistr2(&info1->info_1_str.uni_netname, s, strlen(s) + 1); - if (r_o->status != 0) { - /* report error code */ - DEBUG(0,("SRV_R_NET_SHARE_ENUM: %s\n", nt_errstr(r_o->status))); - prs_mem_free(&rdata); - return False; - } + s = unistr2_tdup(mem_ctx, &r.ctr.share.info1[i].info_1_str.uni_remark); + if (s) + init_unistr2(&info1->info_1_str.uni_remark, s, strlen(s) + 1); - if (r_o->ctr.switch_value != switch_value) { - /* different switch levels. oops. */ - DEBUG(0,("SRV_R_NET_SHARE_ENUM: info class %d does not match request %d\n", - r_o->ctr.switch_value, switch_value)); - prs_mem_free(&rdata); - return False; - } + } - prs_mem_free(&rdata); - - return True; -} - -/**************************************************************************** -do a server net file enum -****************************************************************************/ - -BOOL do_srv_net_srv_file_enum(struct cli_state *cli, - char *server_name, char *qual_name, - uint32 switch_value, SRV_FILE_INFO_CTR *ctr, - uint32 preferred_len, - ENUM_HND *hnd) -{ - prs_struct data; - prs_struct rdata; - SRV_Q_NET_FILE_ENUM q_o; - SRV_R_NET_FILE_ENUM r_o; - - if (server_name == NULL || ctr == NULL || preferred_len == 0) - return False; - - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); - - /* create and send a MSRPC command with api SRV_NET_FILE_ENUM */ - - DEBUG(4,("SRV Get File Info (%s), level %d, enum:%8x\n", - server_name, switch_value, get_enum_hnd(hnd))); - - q_o.file_level = switch_value; - - ctr->switch_value = switch_value; - ctr->ptr_file_ctr = 1; - ctr->file.info3.num_entries_read = 0; - ctr->file.info3.ptr_file_info = 1; - - /* store the parameters */ - init_srv_q_net_file_enum(&q_o, server_name, qual_name, - switch_value, ctr, - preferred_len, - hnd); - - /* turn parameters into data stream */ - if(!srv_io_q_net_file_enum("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SRV_NET_FILE_ENUM, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&data); - - r_o.ctr = ctr; - - if(!srv_io_r_net_file_enum("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } + break; + case 2: + ctr->share.info2 = (SRV_SHARE_INFO_2 *)talloc( + mem_ctx, sizeof(SRV_SHARE_INFO_2) * ctr->num_entries); - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SRV_R_NET_FILE_ENUM: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } + memset(ctr->share.info2, 0, sizeof(SRV_SHARE_INFO_2)); - if (r_o.ctr->switch_value != switch_value) { - /* different switch levels. oops. */ - DEBUG(0,("SRV_R_NET_FILE_ENUM: info class %d does not match request %d\n", - r_o.ctr->switch_value, switch_value)); - prs_mem_free(&rdata); - return False; - } + for (i = 0; i < ctr->num_entries; i++) { + SRV_SHARE_INFO_2 *info2 = &ctr->share.info2[i]; + char *s; + + /* Copy pointer crap */ - prs_mem_free(&rdata); - - return True; + memcpy(&info2->info_2, &r.ctr.share.info2[i].info_2, + sizeof(SH_INFO_2)); + + /* Duplicate strings */ + + s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_netname); + if (s) + init_unistr2(&info2->info_2_str.uni_netname, s, strlen(s) + 1); + + s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_remark); + if (s) + init_unistr2(&info2->info_2_str.uni_remark, s, strlen(s) + 1); + + s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_path); + if (s) + init_unistr2(&info2->info_2_str.uni_path, s, strlen(s) + 1); + + s = unistr2_tdup(mem_ctx, &r.ctr.share.info2[i].info_2_str.uni_passwd); + if (s) + init_unistr2(&info2->info_2_str.uni_passwd, s, strlen(s) + 1); + } + break; + } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; } -/**************************************************************************** -do a server get info -****************************************************************************/ -BOOL do_srv_net_srv_get_info(struct cli_state *cli, - char *server_name, uint32 switch_value, SRV_INFO_CTR *ctr) +WERROR cli_srvsvc_net_share_del(struct cli_state *cli, TALLOC_CTX *mem_ctx, + const char *sharename) { - prs_struct data; - prs_struct rdata; - SRV_Q_NET_SRV_GET_INFO q_o; - SRV_R_NET_SRV_GET_INFO r_o; + prs_struct qbuf, rbuf; + SRV_Q_NET_SHARE_DEL q; + SRV_R_NET_SHARE_DEL r; + WERROR result = W_ERROR(ERRgeneral); - if (server_name == NULL || switch_value == 0 || ctr == NULL) - return False; + ZERO_STRUCT(q); + ZERO_STRUCT(r); - prs_init(&data, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rdata, 0, cli->mem_ctx, UNMARSHALL); + /* Initialise parse structures */ - /* create and send a MSRPC command with api SRV_NET_SRV_GET_INFO */ + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - DEBUG(4,("SRV Get Server Info (%s), level %d\n", server_name, switch_value)); + /* Initialise input parameters */ - /* store the parameters */ - init_srv_q_net_srv_get_info(&q_o, server_name, switch_value); + init_srv_q_net_share_del(&q, cli->srv_name_slash, sharename); - /* turn parameters into data stream */ - if(!srv_io_q_net_srv_get_info("", &q_o, &data, 0)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + /* Marshall data and send request */ - /* send the data on \PIPE\ */ - if (!rpc_api_pipe_req(cli, SRV_NET_SRV_GET_INFO, &data, &rdata)) { - prs_mem_free(&data); - prs_mem_free(&rdata); - return False; - } + if (!srv_io_q_net_share_del("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_SHARE_DEL, &qbuf, &rbuf)) + goto done; - prs_mem_free(&data); + /* Unmarshall response */ - r_o.ctr = ctr; + if (!srv_io_r_net_share_del("", &r, &rbuf, 0)) + goto done; - if(!srv_io_r_net_srv_get_info("", &r_o, &rdata, 0)) { - prs_mem_free(&rdata); - return False; - } + result = r.status; - if (r_o.status != 0) { - /* report error code */ - DEBUG(0,("SRV_R_NET_SRV_GET_INFO: %s\n", nt_errstr(r_o.status))); - prs_mem_free(&rdata); - return False; - } + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); - if (r_o.ctr->switch_value != q_o.switch_value) { - /* different switch levels. oops. */ - DEBUG(0,("SRV_R_NET_SRV_GET_INFO: info class %d does not match request %d\n", - r_o.ctr->switch_value, q_o.switch_value)); - prs_mem_free(&rdata); - return False; - } - - prs_mem_free(&rdata); - - return True; + return result; +} + +WERROR cli_srvsvc_net_share_add(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *netname, uint32 type, char *remark, + uint32 perms, uint32 max_uses, uint32 num_uses, + char *path, char *passwd) +{ + prs_struct qbuf, rbuf; + SRV_Q_NET_SHARE_ADD q; + SRV_R_NET_SHARE_ADD r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + init_srv_q_net_share_add(&q,cli->srv_name_slash, netname, type, remark, + perms, max_uses, num_uses, path, passwd); + + /* Marshall data and send request */ + + if (!srv_io_q_net_share_add("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_SHARE_ADD, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!srv_io_r_net_share_add("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +WERROR cli_srvsvc_net_remote_tod(struct cli_state *cli, TALLOC_CTX *mem_ctx, + char *server, TIME_OF_DAY_INFO *tod) +{ + prs_struct qbuf, rbuf; + SRV_Q_NET_REMOTE_TOD q; + SRV_R_NET_REMOTE_TOD r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + init_srv_q_net_remote_tod(&q, cli->srv_name_slash); + + /* Marshall data and send request */ + + if (!srv_io_q_net_remote_tod("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_REMOTE_TOD, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + r.tod = tod; + + if (!srv_io_r_net_remote_tod("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (!W_ERROR_IS_OK(result)) + goto done; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +WERROR cli_srvsvc_net_file_enum(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 file_level, const char *user_name, + SRV_FILE_INFO_CTR *ctr, int preferred_len, + ENUM_HND *hnd) +{ + prs_struct qbuf, rbuf; + SRV_Q_NET_FILE_ENUM q; + SRV_R_NET_FILE_ENUM r; + WERROR result = W_ERROR(ERRgeneral); + int i; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + init_srv_q_net_file_enum(&q, cli->srv_name_slash, NULL, user_name, + file_level, ctr, preferred_len, hnd); + + /* Marshall data and send request */ + + if (!srv_io_q_net_file_enum("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_FILE_ENUM, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!srv_io_r_net_file_enum("", &r, &rbuf, 0)) + goto done; + + result = r.status; + + if (!W_ERROR_IS_OK(result)) + goto done; + + /* copy the data over to the ctr */ + + ZERO_STRUCTP(ctr); + + ctr->switch_value = file_level; + + ctr->num_entries = ctr->num_entries2 = r.ctr.num_entries; + + switch(file_level) { + case 3: + ctr->file.info3 = (SRV_FILE_INFO_3 *)talloc( + mem_ctx, sizeof(SRV_FILE_INFO_3) * ctr->num_entries); + + memset(ctr->file.info3, 0, + sizeof(SRV_FILE_INFO_3) * ctr->num_entries); + + for (i = 0; i < r.ctr.num_entries; i++) { + SRV_FILE_INFO_3 *info3 = &ctr->file.info3[i]; + char *s; + + /* Copy pointer crap */ + + memcpy(&info3->info_3, &r.ctr.file.info3[i].info_3, + sizeof(FILE_INFO_3)); + + /* Duplicate strings */ + + s = unistr2_tdup(mem_ctx, &r.ctr.file.info3[i].info_3_str.uni_path_name); + if (s) + init_unistr2(&info3->info_3_str.uni_path_name, s, strlen(s) + 1); + + s = unistr2_tdup(mem_ctx, &r.ctr.file.info3[i].info_3_str.uni_user_name); + if (s) + init_unistr2(&info3->info_3_str.uni_user_name, s, strlen(s) + 1); + + } + + break; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + +WERROR cli_srvsvc_net_file_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 file_id) +{ + prs_struct qbuf, rbuf; + SRV_Q_NET_FILE_CLOSE q; + SRV_R_NET_FILE_CLOSE r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + init_srv_q_net_file_close(&q, cli->srv_name_slash, file_id); + + /* Marshall data and send request */ + + if (!srv_io_q_net_file_close("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SRV_NET_FILE_CLOSE, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!srv_io_r_net_file_close("", &r, &rbuf, 0)) + goto done; + + result = r.status; + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + return result; } diff --git a/source3/rpc_client/cli_wkssvc.c b/source3/rpc_client/cli_wkssvc.c index 90269dfbee9..97b948bf628 100644 --- a/source3/rpc_client/cli_wkssvc.c +++ b/source3/rpc_client/cli_wkssvc.c @@ -1,87 +1,93 @@ /* - * Unix SMB/CIFS implementation. - * RPC Pipe client / server routines - * Copyright (C) Andrew Tridgell 1992-1997, - * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Jeremy Allison 1999. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ + Unix SMB/CIFS implementation. + NT Domain Authentication SMB / MSRPC client + Copyright (C) Andrew Tridgell 1994-2000 + Copyright (C) Luke Kenneth Casson Leighton 1996-2000 + Copyright (C) Tim Potter 2001 + Copytight (C) Rafal Szczesniak 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ #include "includes.h" -#undef DBGC_CLASS -#define DBGC_CLASS DBGC_RPC_CLI - -/**************************************************************************** -do a WKS Open Policy -****************************************************************************/ -BOOL do_wks_query_info(struct cli_state *cli, - char *server_name, uint32 switch_value, - WKS_INFO_100 *wks100) +/** + * WksQueryInfo rpc call (like query for server's capabilities) + * + * @param initialised client structure with \PIPE\wkssvc opened + * @param mem_ctx memory context assigned to this rpc binding + * @param wks100 WksQueryInfo structure + * + * @return NTSTATUS of rpc call + */ + +NTSTATUS cli_wks_query_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + WKS_INFO_100 *wks100) { + prs_struct buf; prs_struct rbuf; - prs_struct buf; WKS_Q_QUERY_INFO q_o; WKS_R_QUERY_INFO r_o; - if (server_name == 0 || wks100 == NULL) - return False; + if (cli == NULL || wks100 == NULL) + return NT_STATUS_UNSUCCESSFUL; - prs_init(&buf, MAX_PDU_FRAG_LEN, cli->mem_ctx, MARSHALL); - prs_init(&rbuf, 0, cli->mem_ctx, UNMARSHALL ); + /* init rpc parse structures */ + prs_init(&buf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); - /* create and send a MSRPC command with api WKS_QUERY_INFO */ - - DEBUG(4,("WKS Query Info\n")); - - /* store the parameters */ - init_wks_q_query_info(&q_o, server_name, switch_value); - - /* turn parameters into data stream */ - if(!wks_io_q_query_info("", &q_o, &buf, 0)) { + DEBUG(4, ("WksQueryInfo\n")); + + /* init query structure with rpc call arguments */ + init_wks_q_query_info(&q_o, cli->desthost, 100); + + /* marshall data */ + if (!wks_io_q_query_info("", &q_o, &buf, 0)) { prs_mem_free(&buf); prs_mem_free(&rbuf); - return False; + return NT_STATUS_UNSUCCESSFUL; } - - /* send the data on \PIPE\ */ + + /* actual rpc call over \PIPE\wkssvc */ if (!rpc_api_pipe_req(cli, WKS_QUERY_INFO, &buf, &rbuf)) { prs_mem_free(&buf); prs_mem_free(&rbuf); - return False; + return NT_STATUS_UNSUCCESSFUL; } - + prs_mem_free(&buf); r_o.wks100 = wks100; - if(!wks_io_r_query_info("", &r_o, &rbuf, 0)) { + /* get call results from response buffer */ + if (!wks_io_r_query_info("", &r_o, &rbuf, 0)) { prs_mem_free(&rbuf); - return False; + return NT_STATUS_UNSUCCESSFUL; } - - if (r_o.status != 0) { - /* report error code */ + + /* check returnet status code */ + if (NT_STATUS_IS_ERR(r_o.status)) { + /* report the error */ DEBUG(0,("WKS_R_QUERY_INFO: %s\n", nt_errstr(r_o.status))); prs_mem_free(&rbuf); - return False; + return r_o.status; } - + + /* do clean up */ prs_mem_free(&rbuf); - - return True; + + return NT_STATUS_OK; } + diff --git a/source3/rpc_client/msrpc_spoolss.c b/source3/rpc_client/msrpc_spoolss.c deleted file mode 100644 index 56c70730ba7..00000000000 --- a/source3/rpc_client/msrpc_spoolss.c +++ /dev/null @@ -1,812 +0,0 @@ -/* - Unix SMB/CIFS implementation. - NT Domain Authentication SMB / MSRPC client - Copyright (C) Andrew Tridgell 1994-2000 - Copyright (C) Luke Kenneth Casson Leighton 1996-2000 - Copyright (C) Jean-Francois Micouleau 1999-2000 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "includes.h" -#include "nterr.h" -#include "rpc_parse.h" -#include "rpcclient.h" - -#undef DBGC_CLASS -#define DBGC_CLASS DBGC_RPC_CLI - -#define DEBUG_TESTING - -extern FILE* out_hnd; - -extern struct user_creds *usr_creds; - -/******************************************************************** -initialize a spoolss NEW_BUFFER. -********************************************************************/ -void init_buffer(NEW_BUFFER *buffer, uint32 size, TALLOC_CTX *ctx) -{ - buffer->ptr = (size!=0)? 1:0; - buffer->size=size; - buffer->string_at_end=size; - prs_init(&buffer->prs, size, ctx, MARSHALL); - buffer->struct_start = prs_offset(&buffer->prs); -} - -static void decode_printer_info_0(NEW_BUFFER *buffer, uint32 returned, - PRINTER_INFO_0 **info) -{ - uint32 i; - PRINTER_INFO_0 *inf; - - inf=(PRINTER_INFO_0 *)malloc(returned*sizeof(PRINTER_INFO_0)); - - buffer->prs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs.data_offset=0; - - for (i=0; iprs, 0); - - new_smb_io_driverdir_1("", buffer, info, 0); - -/* *info=inf;*/ -} - -/********************************************************************** - Decode a PORT_INFO_1 struct from a NEW_BUFFER -**********************************************************************/ -void decode_port_info_1(NEW_BUFFER *buffer, uint32 returned, - PORT_INFO_1 **info) -{ - uint32 i; - PORT_INFO_1 *inf; - - inf=(PORT_INFO_1*)malloc(returned*sizeof(PORT_INFO_1)); - - prs_set_offset(&buffer->prs, 0); - - for (i=0; iprs, 0); - - for (i=0; iport.info_1); - break; - case 2: - decode_port_info_2(&buffer, returned, &ctr->port.info_2); - break; - default: - DEBUG(0,("Unable to decode unknown PORT_INFO_%d\n", level)); - break; - } - - display_port_info_ctr(out_hnd, ACTION_HEADER , level, returned, ctr); - display_port_info_ctr(out_hnd, ACTION_ENUMERATE, level, returned, ctr); - display_port_info_ctr(out_hnd, ACTION_FOOTER , level, returned, ctr); - } - if (mem_ctx) - talloc_destroy(mem_ctx); - - - - return True; -} - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -uint32 msrpc_spoolss_getprinterdata( const char* printer_name, - const char* station, - const char* user_name, - const char* value_name, - uint32 *type, - NEW_BUFFER *buffer, - void *fn) -{ - POLICY_HND hnd; - NTSTATUS status; - uint32 needed; - uint32 size; - char *data; - UNISTR2 uni_val_name; - TALLOC_CTX *mem_ctx = NULL; - - DEBUG(4,("spoolgetdata - printer: %s server: %s user: %s value: %s\n", - printer_name, station, user_name, value_name)); - - if(!spoolss_open_printer_ex( printer_name, 0, 0, station, user_name, - &hnd)) - { - return NT_STATUS_ACCESS_DENIED; - } - - init_unistr2(&uni_val_name, value_name, 0); - size = 0; - data = NULL; - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_getprinterdata: talloc_init failed!\n")); - return False; - } - init_buffer(buffer, size, mem_ctx); - - status = spoolss_getprinterdata(&hnd, &uni_val_name, size, type, &size, - (unsigned char *)data, &needed); - - if (status == ERROR_INSUFFICIENT_BUFFER) - { - size = needed; - init_buffer(buffer, size, mem_ctx); - data = prs_data_p(&buffer->prs); - status = spoolss_getprinterdata(&hnd, &uni_val_name, - size, type, &size, - (unsigned char *)data, &needed); - } - - if (mem_ctx) - talloc_destroy(mem_ctx); - - if (status != NT_STATUS_OK) - { - if (!spoolss_closeprinter(&hnd)) - return NT_STATUS_ACCESS_DENIED; - return status; - } - -#if 0 - if (fn != NULL) - fn(printer_name, station, level, returned, *ctr); -#endif - - return status; -} - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -BOOL msrpc_spoolss_enum_jobs( const char* printer_name, - const char* station, const char* user_name, - uint32 level, - void ***ctr, JOB_INFO_FN(fn)) -{ - POLICY_HND hnd; - NTSTATUS status; - NEW_BUFFER buffer; - uint32 needed; - uint32 returned; - uint32 firstjob=0; - uint32 numofjobs=0xffff; - TALLOC_CTX *mem_ctx = NULL; - - DEBUG(4,("spoolopen - printer: %s server: %s user: %s\n", - printer_name, station, user_name)); - - if(!spoolss_open_printer_ex( printer_name, 0, 0, station, user_name, &hnd)) - return False; - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_enum_jobs: talloc_init failed!\n")); - return False; - } - init_buffer(&buffer, 0, mem_ctx); - status = spoolss_enum_jobs(&hnd, firstjob, numofjobs, level, - &buffer, 0, &needed, &returned); - - if (status == ERROR_INSUFFICIENT_BUFFER) - { - init_buffer(&buffer, needed, mem_ctx); - status = spoolss_enum_jobs( &hnd, firstjob, numofjobs, level, - &buffer, needed, &needed, &returned); - } - - if (mem_ctx) - talloc_destroy(mem_ctx); - - if (status!=NT_STATUS_OK) { - if (!spoolss_closeprinter(&hnd)) - return False; - return False; - } - - if (fn != NULL) - fn(printer_name, station, level, returned, *ctr); - - return True; -} - - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -BOOL msrpc_spoolss_enum_printerdata( const char* printer_name, - const char* station, const char* user_name ) -{ - POLICY_HND hnd; - NTSTATUS status; - uint32 idx; - uint32 valuelen; - uint16 *value; - uint32 rvaluelen; - uint32 type; - uint32 datalen; - uint8 *data; - uint32 rdatalen; - uint32 maxvaluelen; - uint32 maxdatalen; - - DEBUG(4,("msrpc_spoolss_enum_printerdata - printer: %s\n", printer_name)); - - if(!spoolss_open_printer_ex( printer_name, 0, 0, station, user_name, &hnd)) - return False; - - - idx=0; - valuelen=0; - rvaluelen=0; - type=0; - datalen=0; - rdatalen=0; - - status = spoolss_enum_printerdata(&hnd, idx, &valuelen, value, - &rvaluelen, &type, &datalen, - data, &rdatalen); - - DEBUG(4,("spoolenum_printerdata - got size: biggest value:[%d], biggest data:[%d]\n", rvaluelen, rdatalen)); - - maxvaluelen=valuelen=rvaluelen; - maxdatalen=datalen=rdatalen; - - value=(uint16 *)malloc(valuelen*sizeof(uint16)); - data=(uint8 *)malloc(datalen*sizeof(uint8)); - - display_printer_enumdata(out_hnd, ACTION_HEADER, idx, valuelen, - value, rvaluelen, type, datalen, data, rdatalen); - - do { - valuelen=maxvaluelen; - datalen=maxdatalen; - - status = spoolss_enum_printerdata(&hnd, idx, &valuelen, - value, &rvaluelen, &type, - &datalen, data, &rdatalen); - display_printer_enumdata(out_hnd, ACTION_ENUMERATE, idx, - valuelen, value, rvaluelen, type, - datalen, data, rdatalen); - idx++; - - } while (status != 0x0103); /* NO_MORE_ITEMS */ - - display_printer_enumdata(out_hnd, ACTION_FOOTER, idx, valuelen, - value, rvaluelen, type, datalen, data, rdatalen); - - - if (status!=NT_STATUS_OK) { - /* - * the check on this if statement is redundant - * since is the status is bad we're going to - * return False anyways. The caller will be - * unable to determine if there really was a problem - * with the spoolss_closeprinter() call --jerry - */ - spoolss_closeprinter(&hnd); - return False; - } - - return True; -} - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -BOOL msrpc_spoolss_getprinter( const char* printer_name, const uint32 level, - const char* station, const char* user_name, - PRINTER_INFO_CTR ctr) -{ - POLICY_HND hnd; - NTSTATUS status=0; - NEW_BUFFER buffer; - uint32 needed=1000; - TALLOC_CTX *mem_ctx = NULL; - - DEBUG(4,("spoolenum_getprinter - printer: %s\n", printer_name)); - - if(!spoolss_open_printer_ex( printer_name, "", PRINTER_ALL_ACCESS, station, user_name, &hnd)) - return False; - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_getprinter: talloc_init failed!\n")); - return False; - } - init_buffer(&buffer, needed, mem_ctx); - - status = spoolss_getprinter(&hnd, level, &buffer, needed, &needed); - - if (status==ERROR_INSUFFICIENT_BUFFER) { - init_buffer(&buffer, needed, mem_ctx); - status = spoolss_getprinter(&hnd, level, &buffer, needed, &needed); - } - - report(out_hnd, "\tstatus:[%d (%x)]\n", status, status); - - if (status!=NT_STATUS_OK) - { - if (mem_ctx) - talloc_destroy(mem_ctx); - return False; - } - - switch (level) { - case 0: - decode_printer_info_0(&buffer, 1, &(ctr.printers_0)); - break; - case 1: - decode_printer_info_1(&buffer, 1, &(ctr.printers_1)); - break; - case 2: - decode_printer_info_2(&buffer, 1, &(ctr.printers_2)); - break; - case 3: - decode_printer_info_3(&buffer, 1, &(ctr.printers_3)); - break; - } - - display_printer_info_ctr(out_hnd, ACTION_HEADER , level, 1, ctr); - display_printer_info_ctr(out_hnd, ACTION_ENUMERATE, level, 1, ctr); - display_printer_info_ctr(out_hnd, ACTION_FOOTER , level, 1, ctr); - - if (mem_ctx) - talloc_destroy(mem_ctx); - - if (status!=NT_STATUS_OK) { - if (!spoolss_closeprinter(&hnd)) - return False; - return False; - } - - return True; -} - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -BOOL msrpc_spoolss_getprinterdriver( const char* printer_name, - const char *environment, const uint32 level, - const char* station, const char* user_name, - PRINTER_DRIVER_CTR ctr) -{ - POLICY_HND hnd; - NTSTATUS status=0; - NEW_BUFFER buffer; - uint32 needed; - TALLOC_CTX *mem_ctx = NULL; - - DEBUG(4,("msrpc_spoolss_enum_getprinterdriver - printer: %s\n", printer_name)); - - if(!spoolss_open_printer_ex( printer_name, "", PRINTER_ALL_ACCESS, station, user_name, &hnd)) - return False; - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_getprinterdriver: talloc_init failed!\n")); - return False; - } - init_buffer(&buffer, 0, mem_ctx); - - status = spoolss_getprinterdriver(&hnd, environment, level, &buffer, 0, &needed); - - if (status==ERROR_INSUFFICIENT_BUFFER) { - init_buffer(&buffer, needed, mem_ctx); - status = spoolss_getprinterdriver(&hnd, environment, level, &buffer, needed, &needed); - } - - /* report(out_hnd, "\tstatus:[%d (%x)]\n", status, status); */ - - if (status!=NT_STATUS_OK) - { - if (mem_ctx) - talloc_destroy(mem_ctx); - return False; - } - - switch (level) { - case 1: - decode_printer_driver_1(&buffer, 1, &(ctr.info1)); - break; - case 2: - decode_printer_driver_2(&buffer, 1, &(ctr.info2)); - break; - case 3: - decode_printer_driver_3(&buffer, 1, &(ctr.info3)); - break; - } - - display_printer_driver_ctr(out_hnd, ACTION_HEADER , level, 1, ctr); - display_printer_driver_ctr(out_hnd, ACTION_ENUMERATE, level, 1, ctr); - display_printer_driver_ctr(out_hnd, ACTION_FOOTER , level, 1, ctr); - - if (mem_ctx) - talloc_destroy(mem_ctx); - - if (status!=NT_STATUS_OK) { - if (!spoolss_closeprinter(&hnd)) - return False; - return False; - } - - return True; -} - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -BOOL msrpc_spoolss_enumprinterdrivers( const char* srv_name, - const char *environment, const uint32 level, - PRINTER_DRIVER_CTR ctr) -{ - NTSTATUS status=0; - NEW_BUFFER buffer; - uint32 needed; - uint32 returned; - TALLOC_CTX *mem_ctx = NULL; - - DEBUG(4,("msrpc_spoolss_enum_enumprinterdrivers - server: %s\n", srv_name)); - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_enumprinterdrivers: talloc_init failed!\n")); - return False; - } - init_buffer(&buffer, 0, mem_ctx); - - status = spoolss_enum_printerdrivers(srv_name, environment, - level, &buffer, 0, &needed, &returned); - - if (status == ERROR_INSUFFICIENT_BUFFER) - { - init_buffer(&buffer, needed, mem_ctx); - status = spoolss_enum_printerdrivers( srv_name, environment, - level, &buffer, needed, &needed, &returned); - } - - report(out_hnd, "\tstatus:[%d (%x)]\n", status, status); - - if (status!=NT_STATUS_OK) - { - if (mem_ctx) - talloc_destroy(mem_ctx); - return False; - } - - switch (level) - { - case 1: - decode_printer_driver_1(&buffer, returned, &(ctr.info1)); - break; - case 2: - decode_printer_driver_2(&buffer, returned, &(ctr.info2)); - break; - case 3: - decode_printer_driver_3(&buffer, returned, &(ctr.info3)); - break; - } - - display_printer_driver_ctr(out_hnd, ACTION_HEADER , level, returned, ctr); - display_printer_driver_ctr(out_hnd, ACTION_ENUMERATE, level, returned, ctr); - display_printer_driver_ctr(out_hnd, ACTION_FOOTER , level, returned, ctr); - - if (mem_ctx) - talloc_destroy(mem_ctx); - - return True; -} - -/**************************************************************************** -nt spoolss query -****************************************************************************/ -BOOL msrpc_spoolss_getprinterdriverdir(char* srv_name, char* env_name, uint32 level, DRIVER_DIRECTORY_CTR ctr) -{ - NTSTATUS status; - NEW_BUFFER buffer; - uint32 needed; - TALLOC_CTX *mem_ctx = NULL; - - if ((mem_ctx=talloc_init()) == NULL) - { - DEBUG(0,("msrpc_spoolss_getprinterdriverdir: talloc_init failed!\n")); - return False; - } - init_buffer(&buffer, 0, mem_ctx); - - /* send a NULL buffer first */ - status=spoolss_getprinterdriverdir(srv_name, env_name, level, &buffer, 0, &needed); - - if (status==ERROR_INSUFFICIENT_BUFFER) { - init_buffer(&buffer, needed, mem_ctx); - status=spoolss_getprinterdriverdir(srv_name, env_name, level, &buffer, needed, &needed); - } - - report(out_hnd, "\tstatus:[%d (%x)]\n", status, status); - - if (status!=NT_STATUS_OK) - { - if (mem_ctx) - talloc_destroy(mem_ctx); - return False; - } - - switch (level) { - case 1: - decode_printerdriverdir_info_1(&buffer, &(ctr.driver.info_1)); - break; - } - - display_printerdriverdir_info_ctr(out_hnd, ACTION_HEADER , level, ctr); - display_printerdriverdir_info_ctr(out_hnd, ACTION_ENUMERATE, level, ctr); - display_printerdriverdir_info_ctr(out_hnd, ACTION_FOOTER , level, ctr); - - if (mem_ctx) - talloc_destroy(mem_ctx); - - return True; -} From 4d98ca211ee919b749a426f432e5839e3a6d26ce Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 2 Aug 2002 10:53:40 +0000 Subject: [PATCH 184/262] Escape ampersand(&) to better comply to SGML syntax (This used to be commit d234f04a5f3ecd4debf66ce80e76f6b9aedaed6c) --- docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml index c6c04ccab83..a66df0c7676 100644 --- a/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml +++ b/docs/docbook/projdoc/Samba-LDAP-HOWTO.sgml @@ -326,7 +326,7 @@ use with an LDAP directory could appear as ldap suffix = "ou=people,dc=samba,dc=org" # generally the default ldap search filter is ok - # ldap filter = "(&(uid=%u)(objectclass=sambaAccount))" + # ldap filter = "(&(uid=%u)(objectclass=sambaAccount))" From 60078160dec6b6c8b1b87229fa66d617f340aeca Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 2 Aug 2002 17:44:02 +0000 Subject: [PATCH 185/262] Fix length on mailslots. Looks like it should have been 0x17, not decimal 17. (This used to be commit 8e906a948196be7d630a9b20f3c3d2cbafd545f1) --- source3/nmbd/nmbd_packets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index 105fb60e99c..d252b98ed69 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1969,7 +1969,7 @@ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len, /* Setup the smb part. */ ptr -= 4; /* XXX Ugliness because of handling of tcp SMB length. */ memcpy(tmp,ptr,4); - set_message(ptr,17,17 + len,True); + set_message(ptr,17,23 + len,True); memcpy(ptr,tmp,4); SCVAL(ptr,smb_com,SMBtrans); From 595145337ecd53441c1129d037be73c0f35fcb11 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 3 Aug 2002 01:11:16 +0000 Subject: [PATCH 186/262] fix log level, set a default, and also copy the value set in smb.conf into parm_struct.ptr this one also fixes log level not shown in swat fix swat help system (This used to be commit 7532e828966f3baaa418b528a5b7fe450c488401) --- source3/param/loadparm.c | 7 +++++-- source3/web/swat.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index d649b421c9d..0142d6c32d8 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -166,6 +166,7 @@ typedef struct char *szGuestaccount; char *szManglingMethod; int max_log_size; + char *szLogLevel; int mangled_stack; int max_xmit; int max_mux; @@ -767,8 +768,8 @@ static struct parm_struct parm_table[] = { {"Logging Options", P_SEP, P_SEPARATOR}, {"admin log", P_BOOL, P_GLOBAL, &Globals.bAdminLog, NULL, NULL, 0}, - {"log level", P_STRING, P_GLOBAL, NULL, handle_debug_list, NULL, 0}, - {"debuglevel", P_STRING, P_GLOBAL, NULL, handle_debug_list, NULL, 0}, + {"log level", P_STRING, P_GLOBAL, &Globals.szLogLevel, handle_debug_list, NULL, 0}, + {"debuglevel", P_STRING, P_GLOBAL, &Globals.szLogLevel, handle_debug_list, NULL, 0}, {"syslog", P_INTEGER, P_GLOBAL, &Globals.syslog, NULL, NULL, 0}, {"syslog only", P_BOOL, P_GLOBAL, &Globals.bSyslogOnly, NULL, NULL, 0}, {"log file", P_STRING, P_GLOBAL, &Globals.szLogFile, NULL, NULL, 0}, @@ -1277,6 +1278,7 @@ static void init_globals(void) Globals.bSyslogOnly = False; Globals.bAdminLog = False; Globals.bTimestampLogs = True; + string_set(&Globals.szLogLevel, "0"); Globals.bDebugHiresTimestamp = False; Globals.bDebugPid = False; Globals.bDebugUid = False; @@ -2642,6 +2644,7 @@ static BOOL handle_debug_list( char *pszParmValueIn, char **ptr ) pstring pszParmValue; pstrcpy(pszParmValue, pszParmValueIn); + string_set(ptr, pszParmValueIn); return debug_parse_levels( pszParmValue ); } diff --git a/source3/web/swat.c b/source3/web/swat.c index 7be46790dbe..80d3232d2bf 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -79,15 +79,15 @@ static char *fix_backslash(char *str) return newstring; } -static char *stripspace(char *str) +static char *stripspaceupper(char *str) { -static char newstring[1024]; -char *p = newstring; + static char newstring[1024]; + char *p = newstring; - while (*str) { - if (*str != ' ') *p++ = *str; - ++str; - } + while (*str) { + if (*str != ' ') *p++ = toupper(*str); + ++str; + } *p = '\0'; return newstring; } @@ -200,7 +200,7 @@ static void show_parameter(int snum, struct parm_struct *parm) ptr = lp_local_ptr(snum, ptr); } - printf("%s", get_parm_translated(stripspace(parm->label), _("Help"), parm->label)); + printf("%s", get_parm_translated(stripspaceupper(parm->label), _("Help"), parm->label)); switch (parm->type) { case P_CHAR: d_printf("", From 65608eb58798e9bffc4e1410101dc8975723697c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 3 Aug 2002 01:20:42 +0000 Subject: [PATCH 187/262] updates the log level parameter man section can someone regenerate and commit the other formats? thanks (This used to be commit cfc03b9257feeec1ae4b4cbf19d5ddcdabade133) --- docs/docbook/manpages/smb.conf.5.sgml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index a9567b8b253..b8a6d0a3145 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -3606,15 +3606,18 @@ log level (G) - The value of the parameter (an integer) allows + The value of the parameter (a astring) allows the debug level (logging level) to be specified in the - smb.conf file. This is to give greater + smb.conf file. This parameter has been + extended since 2.2.x series, now it allow to specify the debug + level for multiple debug classes. This is to give greater flexibility in the configuration of the system. The default will be the log level specified on the command line or level zero if none was specified. - Example: log level = 3 + Example: log level = 3 passdb:5 auth:10 winbind:2 + From c7597b144a633948e0fed3c5916fe5f36bb4cc99 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 3 Aug 2002 01:55:44 +0000 Subject: [PATCH 188/262] fixed a bug where we were truncating the returned names in a netbios name status query to 14 bytes, so we could not join a DC who had a netbios name of 15 bytes in length. (This used to be commit a7588f21c24dac833f098c48e2337c100cf75ba4) --- source3/libsmb/namequery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index ae58c3a0629..141581e2617 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -196,7 +196,7 @@ BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr t if (i == count) goto done; - pull_ascii(name, status[i].name, 15, -1, STR_TERMINATE); + pull_ascii(name, status[i].name, 16, 15, STR_TERMINATE); result = True; done: From 056f849f0c57636787800457d2d191aefacfac05 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 4 Aug 2002 01:16:37 +0000 Subject: [PATCH 189/262] Now that I got the function arguments sane, remove the silly (void **) casts from some of the callers. Andrew Bartlett (This used to be commit eb3354aa6c7293df9a728565a6774049b2e6d57f) --- source3/libads/ldap.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index f91ef4b8a05..1753d7d3ade 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -161,7 +161,7 @@ static char **ads_push_strvals(TALLOC_CTX *ctx, const char **in_vals) if (!values) return NULL; for (i=0; in_vals[i]; i++) { - push_utf8_talloc(ctx, (void **) &values[i], in_vals[i]); + push_utf8_talloc(ctx, &values[i], in_vals[i]); } return values; } @@ -180,7 +180,7 @@ static char **ads_pull_strvals(TALLOC_CTX *ctx, const char **in_vals) if (!values) return NULL; for (i=0; in_vals[i]; i++) { - pull_utf8_talloc(ctx, (void **) &values[i], in_vals[i]); + pull_utf8_talloc(ctx, &values[i], in_vals[i]); } return values; } @@ -219,8 +219,8 @@ ADS_STATUS ads_do_paged_search(ADS_STRUCT *ads, const char *bind_path, /* 0 means the conversion worked but the result was empty so we only fail if it's negative. In any case, it always at least nulls out the dest */ - if ((push_utf8_talloc(ctx, (void **) &utf8_exp, exp) < 0) || - (push_utf8_talloc(ctx, (void **) &utf8_path, bind_path) < 0)) { + if ((push_utf8_talloc(ctx, &utf8_exp, exp) < 0) || + (push_utf8_talloc(ctx, &utf8_path, bind_path) < 0)) { rc = LDAP_NO_MEMORY; goto done; } @@ -442,8 +442,8 @@ ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope, /* 0 means the conversion worked but the result was empty so we only fail if it's negative. In any case, it always at least nulls out the dest */ - if ((push_utf8_talloc(ctx, (void **) &utf8_exp, exp) < 0) || - (push_utf8_talloc(ctx, (void **) &utf8_path, bind_path) < 0)) { + if ((push_utf8_talloc(ctx, &utf8_exp, exp) < 0) || + (push_utf8_talloc(ctx, &utf8_path, bind_path) < 0)) { rc = LDAP_NO_MEMORY; goto done; } @@ -999,7 +999,7 @@ void ads_process_results(ADS_STRUCT *ads, void *res, char *field; BOOL string; - pull_utf8_talloc(ctx, (void **) &field, utf8_field); + pull_utf8_talloc(ctx, &field, utf8_field); string = fn(field, NULL, data_area); if (string) { @@ -1287,7 +1287,7 @@ char *ads_pull_string(ADS_STRUCT *ads, if (!values) return NULL; if (values[0]) { - rc = pull_utf8_talloc(mem_ctx, (void **)&ux_string, + rc = pull_utf8_talloc(mem_ctx, &ux_string, values[0]); if (rc != -1) ret = ux_string; @@ -1321,7 +1321,7 @@ char **ads_pull_strings(ADS_STRUCT *ads, ret = talloc(mem_ctx, sizeof(char *) * (n+1)); for (i=0;i Date: Sun, 4 Aug 2002 14:25:32 +0000 Subject: [PATCH 190/262] commented out strupper before key check against internal db, it's no good to check for uppercased strings when we store them not uppercased. jerry, this fix is needed to make usrmgr.exe work again. meanwhile we found out that NT_STATUS code may not be appropriate there. In particular it seem that an NT PDC will send back 02 as error (ERRbadfile) not 0xc000000f (NT_STATUS_NO_SUCH_FILE NT) I think further investigation is need to understand which are aprropriate return codes here. (This used to be commit 2ad0e81c8da62b7e15ab3e414b5e15a94fe5de87) --- source3/registry/reg_db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index b4c8f60ccf5..db32568f157 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -248,7 +248,7 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) /* convert to key format */ pstring_sub( path, "\\", "/" ); - strupper_m( path ); + /*strupper_m( path );*/ dbuf = tdb_fetch_by_string( tdb_reg, path ); From dd93ff381dff192f4e790df5078438497e2c36e8 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 4 Aug 2002 15:40:39 +0000 Subject: [PATCH 191/262] passwords where not checked (you cannot check if the same buffer differs from itself). they where alo not clean after use! Simo. (This used to be commit 5a257096e9afdcd1dea863dff43952457a74a9f1) --- source3/utils/pdbedit.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 76c0196cf95..96001c450f8 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -255,7 +255,7 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha { SAM_ACCOUNT *sam_pwent=NULL; struct passwd *pwd = NULL; - char *password1, *password2; + char *password1, *password2, *staticpass; ZERO_STRUCT(sam_pwent); @@ -270,15 +270,27 @@ static int new_user (struct pdb_context *in, char *username, char *fullname, cha } } - password1 = getpass("new password:"); - password2 = getpass("retype new password:"); + staticpass = getpass("new password:"); + password1 = strdup(staticpass); + memset(staticpass, 0, strlen(staticpass)); + staticpass = getpass("retype new password:"); + password2 = strdup(staticpass); + memset(staticpass, 0, strlen(staticpass)); if (strcmp (password1, password2)) { - fprintf (stderr, "Passwords does not match!\n"); - pdb_free_sam (&sam_pwent); - return -1; + fprintf (stderr, "Passwords does not match!\n"); + memset(password1, 0, strlen(password1)); + SAFE_FREE(password1); + memset(password2, 0, strlen(password2)); + SAFE_FREE(password2); + pdb_free_sam (&sam_pwent); + return -1; } pdb_set_plaintext_passwd(sam_pwent, password1); + memset(password1, 0, strlen(password1)); + SAFE_FREE(password1); + memset(password2, 0, strlen(password2)); + SAFE_FREE(password2); if (fullname) pdb_set_fullname(sam_pwent, fullname); From ab9ff0fa73f33c064a39859e39fa79af77cc088f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Aug 2002 02:47:46 +0000 Subject: [PATCH 192/262] This fixes a number of ADS problems, particularly with netbiosless setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm (This used to be commit e358d7b24c86a46d8c361b9e32a25d4f71a6dc00) --- source3/auth/auth_domain.c | 6 +- source3/include/ads.h | 41 ++-- source3/libads/ads_struct.c | 117 ++-------- source3/libads/kerberos.c | 12 +- source3/libads/kerberos_verify.c | 2 +- source3/libads/ldap.c | 353 +++++++++++++++++++++++++----- source3/libads/ldap_user.c | 6 +- source3/libads/sasl.c | 9 +- source3/libads/util.c | 2 +- source3/libsmb/namequery.c | 2 +- source3/nsswitch/winbindd.h | 8 +- source3/nsswitch/winbindd_ads.c | 119 +++++----- source3/nsswitch/winbindd_cache.c | 15 +- source3/nsswitch/winbindd_cm.c | 22 +- source3/nsswitch/winbindd_rpc.c | 15 +- source3/nsswitch/winbindd_util.c | 118 ++++++---- source3/rpc_client/cli_lsarpc.c | 5 +- source3/rpcclient/cmd_lsarpc.c | 18 +- source3/smbd/negprot.c | 5 +- source3/smbd/server.c | 4 + source3/smbd/sesssetup.c | 14 +- source3/utils/net_ads.c | 88 +++++--- source3/utils/net_lookup.c | 2 + source3/utils/net_rpc.c | 4 +- 24 files changed, 627 insertions(+), 360 deletions(-) diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index b37ce2cc91e..d48cec5b293 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -46,7 +46,9 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, return NT_STATUS_NO_LOGON_SERVERS; } - DEBUG(4,("ads_resolve_dc: realm=%s\n", ads->realm)); + DEBUG(4,("ads_resolve_dc: realm=%s\n", ads->config.realm)); + + ads->auth.no_bind = 1; #ifdef HAVE_ADS /* a full ads_connect() is actually overkill, as we don't srictly need @@ -55,7 +57,7 @@ static NTSTATUS ads_resolve_dc(fstring remote_machine, ads_connect(ads); #endif - fstrcpy(remote_machine, ads->ldap_server_name); + fstrcpy(remote_machine, ads->config.ldap_server_name); strupper(remote_machine); *dest_ip = ads->ldap_ip; ads_destroy(&ads); diff --git a/source3/include/ads.h b/source3/include/ads.h index 78d2fcf4b52..9305b716710 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -5,19 +5,34 @@ */ typedef struct { - void *ld; - char *realm; - char *workgroup; - char *ldap_server; - char *ldap_server_name; - char *kdc_server; + void *ld; /* the active ldap structure */ + struct in_addr ldap_ip; /* the ip of the active connection, if any */ + time_t last_attempt; /* last attempt to reconnect */ int ldap_port; - char *bind_path; - time_t last_attempt; - char *password; - char *user_name; - char *server_realm; - struct in_addr ldap_ip; + + /* info needed to find the server */ + struct { + char *realm; + char *workgroup; + char *ldap_server; + int foreign; /* set to 1 if connecting to a foreign realm */ + } server; + + /* info needed to authenticate */ + struct { + char *realm; + char *password; + char *user_name; + char *kdc_server; + int no_bind; + } auth; + + /* info derived from the servers config */ + struct { + char *realm; + char *bind_path; + char *ldap_server_name; + } config; } ADS_STRUCT; typedef struct { @@ -95,7 +110,7 @@ typedef void **ADS_MODLIST; /* macros to simplify error returning */ #define ADS_ERROR(rc) ads_build_error(ADS_ERROR_LDAP, rc, 0) -#define ADS_ERROR_SYSTEM(rc) ads_build_error(ADS_ERROR_SYSTEM, rc, 0) +#define ADS_ERROR_SYSTEM(rc) ads_build_error(ADS_ERROR_SYSTEM, rc?rc:EINVAL, 0) #define ADS_ERROR_KRB5(rc) ads_build_error(ADS_ERROR_KRB5, rc, 0) #define ADS_ERROR_GSS(rc, minor) ads_build_error(ADS_ERROR_GSS, rc, minor) diff --git a/source3/libads/ads_struct.c b/source3/libads/ads_struct.c index af0b5d41431..b68c822ce35 100644 --- a/source3/libads/ads_struct.c +++ b/source3/libads/ads_struct.c @@ -72,47 +72,6 @@ char *ads_build_dn(const char *realm) } -#ifdef HAVE_LDAP -/* - find the ldap server from DNS -*/ -static char *find_ldap_server(ADS_STRUCT *ads) -{ - char *list = NULL; - struct in_addr ip; - - if (ads->realm && - strcasecmp(ads->workgroup, lp_workgroup()) == 0 && - ldap_domain2hostlist(ads->realm, &list) == LDAP_SUCCESS) { - char *p; - p = strchr(list, ':'); - if (p) *p = 0; - return list; - } - - /* get desperate, find the domain controller IP */ - if (resolve_name(ads->workgroup, &ip, 0x1B)) { - return strdup(inet_ntoa(ip)); - } - - /* or a BDC ... */ - if (resolve_name(ads->workgroup, &ip, 0x1C)) { - return strdup(inet_ntoa(ip)); - } - - return NULL; -} - -#else - -static char *find_ldap_server(ADS_STRUCT *ads) -{ - /* Without LDAP this doesn't make much sense */ - return NULL; -} - -#endif - #ifndef LDAP_PORT #define LDAP_PORT 389 #endif @@ -122,58 +81,24 @@ static char *find_ldap_server(ADS_STRUCT *ads) */ ADS_STRUCT *ads_init(const char *realm, const char *workgroup, - const char *ldap_server, - const char *bind_path, - const char *password) + const char *ldap_server) { ADS_STRUCT *ads; ads = (ADS_STRUCT *)smb_xmalloc(sizeof(*ads)); ZERO_STRUCTP(ads); - if (!workgroup) { - workgroup = lp_workgroup(); - } + ads->server.realm = realm? strdup(realm) : NULL; + ads->server.workgroup = workgroup ? strdup(workgroup) : NULL; + ads->server.ldap_server = ldap_server? strdup(ldap_server) : NULL; - ads->realm = realm? strdup(realm) : NULL; - ads->workgroup = strdup(workgroup); - ads->ldap_server = ldap_server? strdup(ldap_server) : NULL; - ads->bind_path = bind_path? strdup(bind_path) : NULL; - ads->ldap_port = LDAP_PORT; - if (password) ads->password = strdup(password); - - if (!ads->realm) { - ads->realm = strdup(lp_realm()); - if (!ads->realm[0]) { - SAFE_FREE(ads->realm); - } + /* we need to know if this is a foreign realm to know if we can + use lp_ads_server() */ + if (realm && strcasecmp(lp_realm(), realm) != 0) { + ads->server.foreign = 1; } - - if (!ads->realm && strchr_m(ads->workgroup, '.')) { - /* the smb.conf has specified the realm in 'workgroup =' */ - ads->realm = strdup(ads->workgroup); - } - - if (!ads->bind_path && ads->realm) { - ads->bind_path = ads_build_dn(ads->realm); - } - if (!ads->ldap_server) { - if (strcasecmp(ads->workgroup, lp_workgroup()) == 0) { - ads->ldap_server = strdup(lp_ads_server()); - } - if (!ads->ldap_server || !ads->ldap_server[0]) { - SAFE_FREE(ads->ldap_server); - ads->ldap_server = find_ldap_server(ads); - } - } - if (!ads->kdc_server) { - /* assume its the same as LDAP */ - ads->kdc_server = ads->ldap_server? strdup(ads->ldap_server) : NULL; - } - - if (ads->ldap_server) { - /* its very useful knowing the IP of the ldap server */ - ads->ldap_ip = *interpret_addr2(ads->ldap_server); + if (workgroup && strcasecmp(lp_workgroup(), workgroup) != 0) { + ads->server.foreign = 1; } return ads; @@ -182,7 +107,7 @@ ADS_STRUCT *ads_init(const char *realm, /* a simpler ads_init() interface using all defaults */ ADS_STRUCT *ads_init_simple(void) { - return ads_init(NULL, NULL, NULL, NULL, NULL); + return ads_init(NULL, NULL, NULL); } /* @@ -194,13 +119,19 @@ void ads_destroy(ADS_STRUCT **ads) #if HAVE_LDAP if ((*ads)->ld) ldap_unbind((*ads)->ld); #endif - SAFE_FREE((*ads)->realm); - SAFE_FREE((*ads)->ldap_server); - SAFE_FREE((*ads)->ldap_server_name); - SAFE_FREE((*ads)->kdc_server); - SAFE_FREE((*ads)->bind_path); - SAFE_FREE((*ads)->password); - SAFE_FREE((*ads)->user_name); + SAFE_FREE((*ads)->server.realm); + SAFE_FREE((*ads)->server.workgroup); + SAFE_FREE((*ads)->server.ldap_server); + + SAFE_FREE((*ads)->auth.realm); + SAFE_FREE((*ads)->auth.password); + SAFE_FREE((*ads)->auth.user_name); + SAFE_FREE((*ads)->auth.kdc_server); + + SAFE_FREE((*ads)->config.realm); + SAFE_FREE((*ads)->config.bind_path); + SAFE_FREE((*ads)->config.ldap_server_name); + ZERO_STRUCTP(*ads); SAFE_FREE(*ads); } diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 1ba5d978e8c..9a486237c9f 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -110,16 +110,8 @@ int ads_kinit_password(ADS_STRUCT *ads) char *s; int ret; - if (!ads->user_name) { - /* by default use the machine account */ - extern pstring global_myname; - fstring myname; - fstrcpy(myname, global_myname); - strlower(myname); - asprintf(&ads->user_name, "HOST/%s", global_myname); - } - asprintf(&s, "%s@%s", ads->user_name, ads->realm); - ret = kerberos_kinit_password(s, ads->password); + asprintf(&s, "%s@%s", ads->auth.user_name, ads->auth.realm); + ret = kerberos_kinit_password(s, ads->auth.password); if (ret) { DEBUG(0,("kerberos_kinit_password %s failed: %s\n", diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c index dac90908c45..22b58f47dd9 100644 --- a/source3/libads/kerberos_verify.c +++ b/source3/libads/kerberos_verify.c @@ -67,7 +67,7 @@ NTSTATUS ads_verify_ticket(ADS_STRUCT *ads, const DATA_BLOB *ticket, return NT_STATUS_LOGON_FAILURE; } - ret = krb5_set_default_realm(context, ads->realm); + ret = krb5_set_default_realm(context, ads->auth.realm); if (ret) { DEBUG(1,("krb5_set_default_realm failed (%s)\n", error_message(ret))); ads_destroy(&ads); diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 1753d7d3ade..a8126faffe4 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -37,6 +37,153 @@ * codepoints in UTF-8). This may have to change at some point **/ + +/* + try a connection to a given ldap server, returning True and setting the servers IP + in the ads struct if successful + */ +static BOOL ads_try_connect(ADS_STRUCT *ads, const char *server, unsigned port) +{ + char *srv; + + if (!server || !*server) { + return False; + } + + DEBUG(5,("ads_try_connect: trying ldap server '%s' port %u\n", server, port)); + + /* this copes with inet_ntoa brokenness */ + srv = strdup(server); + + ads->ld = ldap_open(srv, port); + if (!ads->ld) { + free(srv); + return False; + } + ads->ldap_port = port; + ads->ldap_ip = *interpret_addr2(srv); + free(srv); + return True; +} + +/* used by the IP comparison function */ +struct ldap_ip { + struct in_addr ip; + unsigned port; +}; + +/* compare 2 ldap IPs by nearness to our interfaces - used in qsort */ +static int ldap_ip_compare(struct ldap_ip *ip1, struct ldap_ip *ip2) +{ + return ip_compare(&ip1->ip, &ip2->ip); +} + +/* try connecting to a ldap server via DNS */ +static BOOL ads_try_dns(ADS_STRUCT *ads) +{ + char *realm, *ptr; + char *list = NULL; + pstring tok; + struct ldap_ip *ip_list; + int count, i=0; + + realm = ads->server.realm; + if (!realm || !*realm) { + SAFE_FREE(realm); + realm = lp_realm(); + } + if (!realm || !*realm) { + SAFE_FREE(realm); + realm = ads->server.workgroup; + } + if (!realm || !*realm) { + SAFE_FREE(realm); + realm = lp_workgroup(); + } + if (!realm) { + return False; + } + + DEBUG(6,("ads_try_dns: looking for realm '%s'\n", realm)); + if (ldap_domain2hostlist(realm, &list) != LDAP_SUCCESS) { + return False; + } + + DEBUG(6,("ads_try_dns: ldap realm '%s' host list '%s'\n", realm, list)); + + count = count_chars(list, ' ') + 1; + ip_list = malloc(count * sizeof(struct ldap_ip)); + if (!ip_list) { + return False; + } + + ptr = list; + while (next_token(&ptr, tok, " ", sizeof(tok))) { + unsigned port = LDAP_PORT; + char *p = strchr(tok, ':'); + if (p) { + *p = 0; + port = atoi(p+1); + } + ip_list[i].ip = *interpret_addr2(tok); + ip_list[i].port = port; + if (!is_zero_ip(ip_list[i].ip)) { + i++; + } + } + free(list); + + count = i; + + /* we sort the list of addresses by closeness to our interfaces. This + tries to prevent us using a DC on the other side of the country */ + if (count > 1) { + qsort(ip_list, count, sizeof(struct ldap_ip), + QSORT_CAST ldap_ip_compare); + } + + for (i=0;iserver.workgroup; + + if (!workgroup) { + workgroup = lp_workgroup(); + } + + DEBUG(6,("ads_try_netbios: looking for workgroup '%s'\n", workgroup)); + + if (!get_dc_list(True, workgroup, &ip_list, &count) && + !get_dc_list(False, workgroup, &ip_list, &count)) { + return False; + } + + for (i=0;ilast_attempt = time(NULL); - ads->ld = NULL; - if (ads->ldap_server) { - ads->ld = ldap_open(ads->ldap_server, ads->ldap_port); + /* try with a user specified server */ + if (ads->server.ldap_server && + ads_try_connect(ads, ads->server.ldap_server, LDAP_PORT)) { + goto got_connection; } - /* if that failed then try each of the BDC's in turn */ - if (!ads->ld) { - struct in_addr *ip_list; - int count; + /* try with a smb.conf ads server setting if we are connecting + to the primary workgroup or realm */ + if (!ads->server.foreign && + ads_try_connect(ads, lp_ads_server(), LDAP_PORT)) { + goto got_connection; + } - if (get_dc_list(False, ads->workgroup, &ip_list, &count)) { - int i; - for (i=0;ild = ldap_open(inet_ntoa(ip_list[i]), - ads->ldap_port); - if (ads->ld) break; - } - if (ads->ld) { - SAFE_FREE(ads->ldap_server); - ads->ldap_server = strdup(inet_ntoa(ip_list[i])); - } - free(ip_list); + /* try via DNS */ + if (ads_try_dns(ads)) { + goto got_connection; } + + /* try via netbios lookups */ + if (!lp_disable_netbios() && ads_try_netbios(ads)) { + goto got_connection; } - if (!ads->ld) { - return ADS_ERROR_SYSTEM(errno); - } + return ADS_ERROR_SYSTEM(errno?errno:ENOENT); - DEBUG(3,("Connected to LDAP server %s\n", ads->ldap_server)); +got_connection: + DEBUG(3,("Connected to LDAP server %s\n", inet_ntoa(ads->ldap_ip))); status = ads_server_info(ads); if (!ADS_ERR_OK(status)) { @@ -90,22 +234,43 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version); + if (!ads->auth.user_name) { + /* by default use the machine account */ + extern pstring global_myname; + fstring myname; + fstrcpy(myname, global_myname); + strlower(myname); + asprintf(&ads->auth.user_name, "HOST/%s", myname); + } + + if (!ads->auth.realm) { + ads->auth.realm = strdup(ads->config.realm); + } + + if (!ads->auth.kdc_server) { + ads->auth.kdc_server = strdup(inet_ntoa(ads->ldap_ip)); + } + #if KRB5_DNS_HACK /* this is a really nasty hack to avoid ADS DNS problems. It needs a patch to MIT kerberos to work (tridge) */ { char *env; - asprintf(&env, "KRB5_KDC_ADDRESS_%s", ads->server_realm); - setenv(env, inet_ntoa(*interpret_addr2(ads->ldap_server)), 1); + asprintf(&env, "KRB5_KDC_ADDRESS_%s", ads->config.realm); + setenv(env, ads->auth.kdc_server, 1); free(env); } #endif - if (ads->password) { + if (ads->auth.password) { if ((code = ads_kinit_password(ads))) return ADS_ERROR_KRB5(code); } + if (ads->auth.no_bind) { + return ADS_SUCCESS; + } + return ads_sasl_bind(ads); } @@ -494,7 +659,7 @@ ADS_STATUS ads_search(ADS_STRUCT *ads, void **res, const char *exp, const char **attrs) { - return ads_do_search(ads, ads->bind_path, LDAP_SCOPE_SUBTREE, + return ads_do_search(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, exp, attrs, res); } @@ -805,11 +970,11 @@ static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *hostname, if (!(host_spn = talloc_asprintf(ctx, "HOST/%s", hostname))) goto done; - if (!(host_upn = talloc_asprintf(ctx, "%s@%s", host_spn, ads->realm))) + if (!(host_upn = talloc_asprintf(ctx, "%s@%s", host_spn, ads->config.realm))) goto done; ou_str = ads_ou_string(org_unit); new_dn = talloc_asprintf(ctx, "cn=%s,%s,%s", hostname, ou_str, - ads->bind_path); + ads->config.bind_path); free(ou_str); if (!new_dn) goto done; @@ -925,6 +1090,7 @@ static BOOL ads_dump_field(char *field, void **values, void *data_area) } handlers[] = { {"objectGUID", False, dump_binary}, {"nTSecurityDescriptor", False, dump_sd}, + {"dnsRecord", False, dump_binary}, {"objectSid", False, dump_sid}, {NULL, True, NULL} }; @@ -1061,7 +1227,7 @@ ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *hostname, const char *org status = ads_leave_realm(ads, host); if (!ADS_ERR_OK(status)) { DEBUG(0, ("Failed to delete host '%s' from the '%s' realm.\n", - host, ads->realm)); + host, ads->config.realm)); return status; } } @@ -1224,20 +1390,15 @@ ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads, char *host = strdup(hostname); char *principal; - if (!ads->kdc_server) { - DEBUG(0, ("Unable to find KDC server\n")); - return ADS_ERROR(LDAP_SERVER_DOWN); - } - strlower(host); /* we need to use the '$' form of the name here, as otherwise the server might end up setting the password for a user instead */ - asprintf(&principal, "%s$@%s", host, ads->realm); + asprintf(&principal, "%s$@%s", host, ads->auth.realm); - status = krb5_set_password(ads->kdc_server, principal, password); + status = krb5_set_password(ads->auth.kdc_server, principal, password); free(host); free(principal); @@ -1472,33 +1633,27 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads) return ADS_ERROR(LDAP_DECODING_ERROR); } - SAFE_FREE(ads->ldap_server_name); + SAFE_FREE(ads->config.ldap_server_name); - ads->ldap_server_name = strdup(p+1); - p = strchr(ads->ldap_server_name, '$'); + ads->config.ldap_server_name = strdup(p+1); + p = strchr(ads->config.ldap_server_name, '$'); if (!p || p[1] != '@') { ldap_value_free(values); ldap_msgfree(res); - SAFE_FREE(ads->ldap_server_name); + SAFE_FREE(ads->config.ldap_server_name); return ADS_ERROR(LDAP_DECODING_ERROR); } *p = 0; - SAFE_FREE(ads->server_realm); - SAFE_FREE(ads->bind_path); + SAFE_FREE(ads->config.realm); + SAFE_FREE(ads->config.bind_path); - ads->server_realm = strdup(p+2); - ads->bind_path = ads_build_dn(ads->server_realm); - - /* in case the realm isn't configured in smb.conf */ - if (!ads->realm || !ads->realm[0]) { - SAFE_FREE(ads->realm); - ads->realm = strdup(ads->server_realm); - } + ads->config.realm = strdup(p+2); + ads->config.bind_path = ads_build_dn(ads->config.realm); DEBUG(3,("got ldap server name %s@%s\n", - ads->ldap_server_name, ads->realm)); + ads->config.ldap_server_name, ads->config.realm)); return ADS_SUCCESS; } @@ -1514,9 +1669,13 @@ ADS_STATUS ads_server_info(ADS_STRUCT *ads) * @return the count of SIDs pulled **/ ADS_STATUS ads_trusted_domains(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, - int *num_trusts, char ***names, DOM_SID **sids) + int *num_trusts, + char ***names, + char ***alt_names, + DOM_SID **sids) { - const char *attrs[] = {"flatName", "securityIdentifier", NULL}; + const char *attrs[] = {"name", "flatname", "securityIdentifier", + "trustDirection", NULL}; ADS_STATUS status; void *res, *msg; int count, i; @@ -1533,11 +1692,31 @@ ADS_STATUS ads_trusted_domains(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, } (*names) = talloc(mem_ctx, sizeof(char *) * count); + (*alt_names) = talloc(mem_ctx, sizeof(char *) * count); (*sids) = talloc(mem_ctx, sizeof(DOM_SID) * count); if (! *names || ! *sids) return ADS_ERROR(LDAP_NO_MEMORY); for (i=0, msg = ads_first_entry(ads, res); msg; msg = ads_next_entry(ads, msg)) { - (*names)[i] = ads_pull_string(ads, mem_ctx, msg, "flatName"); + uint32 direction; + + /* direction is a 2 bit bitfield, 1 means they trust us + but we don't trust them, so we should not list them + as users from that domain can't login */ + if (ads_pull_uint32(ads, msg, "trustDirection", &direction) && + direction == 1) { + continue; + } + + (*names)[i] = ads_pull_string(ads, mem_ctx, msg, "name"); + (*alt_names)[i] = ads_pull_string(ads, mem_ctx, msg, "flatname"); + + if ((*alt_names)[i] && (*alt_names)[i][0]) { + /* we prefer the flatname as the primary name + for consistency with RPC */ + char *name = (*alt_names)[i]; + (*alt_names)[i] = (*names)[i]; + (*names)[i] = name; + } if (ads_pull_sid(ads, msg, "securityIdentifier", &(*sids)[i])) { i++; } @@ -1562,7 +1741,7 @@ ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, DOM_SID *sid) void *res; ADS_STATUS rc; - rc = ads_do_search(ads, ads->bind_path, LDAP_SCOPE_BASE, "(objectclass=*)", + rc = ads_do_search(ads, ads->config.bind_path, LDAP_SCOPE_BASE, "(objectclass=*)", attrs, &res); if (!ADS_ERR_OK(rc)) return rc; if (!ads_pull_sid(ads, res, "objectSid", sid)) { @@ -1573,4 +1752,66 @@ ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, DOM_SID *sid) return ADS_SUCCESS; } +/* this is rather complex - we need to find the allternate (netbios) name + for the domain, but there isn't a simple query to do this. Instead + we look for the principle names on the DCs account and find one that has + the right form, then extract the netbios name of the domain from that +*/ +ADS_STATUS ads_workgroup_name(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **workgroup) +{ + char *exp; + ADS_STATUS rc; + char **principles; + char *prefix; + int prefix_length; + int i; + void *res; + const char *attrs[] = {"servicePrincipalName", NULL}; + + (*workgroup) = NULL; + + asprintf(&exp, "(&(objectclass=computer)(dnshostname=%s.%s))", + ads->config.ldap_server_name, ads->config.realm); + rc = ads_search(ads, &res, exp, attrs); + free(exp); + + if (!ADS_ERR_OK(rc)) { + return rc; + } + + principles = ads_pull_strings(ads, mem_ctx, res, "servicePrincipalName"); + + ads_msgfree(ads, res); + + if (!principles) { + return ADS_ERROR(LDAP_NO_RESULTS_RETURNED); + } + + asprintf(&prefix, "HOST/%s.%s/", + ads->config.ldap_server_name, + ads->config.realm); + + prefix_length = strlen(prefix); + + for (i=0;principles[i]; i++) { + if (strncasecmp(principles[i], prefix, prefix_length) == 0 && + strcasecmp(ads->config.realm, principles[i]+prefix_length) != 0 && + !strchr(principles[i]+prefix_length, '.')) { + /* found an alternate (short) name for the domain. */ + DEBUG(3,("Found alternate name '%s' for realm '%s'\n", + principles[i]+prefix_length, + ads->config.realm)); + (*workgroup) = talloc_strdup(mem_ctx, principles[i]+prefix_length); + break; + } + } + free(prefix); + + if (!*workgroup) { + return ADS_ERROR(LDAP_NO_RESULTS_RETURNED); + } + + return ADS_SUCCESS; +} + #endif diff --git a/source3/libads/ldap_user.c b/source3/libads/ldap_user.c index b6e3d189c51..b6fef24b5c1 100644 --- a/source3/libads/ldap_user.c +++ b/source3/libads/ldap_user.c @@ -55,10 +55,10 @@ ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user, status = ADS_ERROR(LDAP_NO_MEMORY); - if (!(upn = talloc_asprintf(ctx, "%s@%s", user, ads->realm))) + if (!(upn = talloc_asprintf(ctx, "%s@%s", user, ads->config.realm))) goto done; if (!(new_dn = talloc_asprintf(ctx, "cn=%s,cn=Users,%s", name, - ads->bind_path))) + ads->config.bind_path))) goto done; if (!(controlstr = talloc_asprintf(ctx, "%u", UF_NORMAL_ACCOUNT))) goto done; @@ -94,7 +94,7 @@ ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group, status = ADS_ERROR(LDAP_NO_MEMORY); if (!(new_dn = talloc_asprintf(ctx, "cn=%s,cn=Users,%s", group, - ads->bind_path))) + ads->config.bind_path))) goto done; if (!(mods = ads_init_mods(ctx))) goto done; diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index 1b55453cac9..81dedb0a81e 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -77,7 +77,7 @@ ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) /* we need to fetch a service ticket as the ldap user in the servers realm, regardless of our realm */ - asprintf(&sname, "ldap/%s@%s", ads->ldap_server_name, ads->server_realm); + asprintf(&sname, "ldap/%s@%s", ads->config.ldap_server_name, ads->config.realm); krb5_init_context(&ctx); krb5_set_default_tgs_ktypes(ctx, enc_types); krb5_parse_name(ctx, sname, &principal); @@ -163,7 +163,7 @@ ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) gss_release_buffer(&minor_status, &output_token); - output_token.value = malloc(strlen(ads->bind_path) + 8); + output_token.value = malloc(strlen(ads->config.bind_path) + 8); p = output_token.value; *p++ = 1; /* no sign or seal */ @@ -171,9 +171,10 @@ ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) *p++ = max_msg_size>>16; *p++ = max_msg_size>>8; *p++ = max_msg_size; - snprintf(p, strlen(ads->bind_path)+4, "dn:%s", ads->bind_path); + snprintf(p, strlen(ads->config.bind_path)+4, "dn:%s", ads->config.bind_path); + p += strlen(ads->config.bind_path); - output_token.length = strlen(ads->bind_path) + 8; + output_token.length = strlen(ads->config.bind_path) + 8; gss_rc = gss_wrap(&minor_status, context_handle,0,GSS_C_QOP_DEFAULT, &output_token, &conf_state, diff --git a/source3/libads/util.c b/source3/libads/util.c index d48eb10b710..b10b130a313 100644 --- a/source3/libads/util.c +++ b/source3/libads/util.c @@ -39,7 +39,7 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip new_password = strdup(tmp_password); asprintf(&service_principal, "HOST/%s", host_principal); - ret = kerberos_set_password(ads->kdc_server, host_principal, password, + ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, service_principal, new_password); if (!secrets_store_machine_password(new_password)) { diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 141581e2617..3382ce4f4a0 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -216,7 +216,7 @@ BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr t /* comparison function used by sort_ip_list */ -static int ip_compare(struct in_addr *ip1, struct in_addr *ip2) +int ip_compare(struct in_addr *ip1, struct in_addr *ip2) { int max_bits1=0, max_bits2=0; int num_interfaces = iface_count(); diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h index 11d399be49a..dd92ecefe61 100644 --- a/source3/nsswitch/winbindd.h +++ b/source3/nsswitch/winbindd.h @@ -88,7 +88,7 @@ typedef struct { struct winbindd_domain { fstring name; /* Domain name */ - fstring full_name; /* full Domain name (realm) */ + fstring alt_name; /* alt Domain name (if any) */ DOM_SID sid; /* SID for this domain */ /* Lookup methods for this domain (LDAP or RPC) */ @@ -170,11 +170,15 @@ struct winbindd_methods { TALLOC_CTX *mem_ctx, uint32 *num_domains, char ***names, + char ***alt_names, DOM_SID **dom_sids); /* find the domain sid */ NTSTATUS (*domain_sid)(struct winbindd_domain *domain, DOM_SID *sid); + + /* setup the list of alternate names for the domain, if any */ + NTSTATUS (*alternate_name)(struct winbindd_domain *domain); }; /* Used to glue a policy handle and cli_state together */ @@ -190,6 +194,8 @@ typedef struct { #include "rpc_client.h" #define WINBINDD_ESTABLISH_LOOP 30 +#define WINBINDD_RESCAN_FREQ 300 + #define DOM_SEQUENCE_NONE ((uint32)-1) /* SETENV */ diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index b61348adfe7..b0b70178a45 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -61,8 +61,8 @@ ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path, int scope if (*res) ads_msgfree(ads, *res); *res = NULL; - DEBUG(3,("Reopening ads connection to %s after error %s\n", - ads->ldap_server, ads_errstr(status))); + DEBUG(3,("Reopening ads connection to realm '%s' after error %s\n", + ads->config.realm, ads_errstr(status))); if (ads->ld) { ldap_unbind(ads->ld); } @@ -87,7 +87,7 @@ ADS_STATUS ads_search_retry(ADS_STRUCT *ads, void **res, const char *exp, const char **attrs) { - return ads_do_search_retry(ads, ads->bind_path, LDAP_SCOPE_SUBTREE, + return ads_do_search_retry(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, exp, attrs, res); } @@ -108,8 +108,6 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) ADS_STRUCT *ads; ADS_STATUS status; char *ccache; - struct in_addr server_ip; - char *sname; if (domain->private) { return (ADS_STRUCT *)domain->private; @@ -120,30 +118,23 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) SETENV("KRB5CCNAME", ccache, 1); unlink(ccache); - if (resolve_name(domain->name, &server_ip, 0x1b)) { - sname = inet_ntoa(server_ip); - } else if (resolve_name(domain->name, &server_ip, 0x1c)) { - sname = inet_ntoa(server_ip); - } else { - if (strcasecmp(domain->name, lp_workgroup()) != 0) { - DEBUG(1,("can't find domain controller for %s\n", domain->name)); - return NULL; - } - sname = NULL; - } - - ads = ads_init(primary_realm, domain->name, NULL, NULL, NULL); + ads = ads_init(domain->alt_name, domain->name, NULL); if (!ads) { DEBUG(1,("ads_init for domain %s failed\n", domain->name)); return NULL; } /* the machine acct password might have change - fetch it every time */ - SAFE_FREE(ads->password); - ads->password = secrets_fetch_machine_password(); + SAFE_FREE(ads->auth.password); + ads->auth.password = secrets_fetch_machine_password(); + + if (primary_realm) { + SAFE_FREE(ads->auth.realm); + ads->auth.realm = strdup(primary_realm); + } status = ads_connect(ads); - if (!ADS_ERR_OK(status) || !ads->realm) { + if (!ADS_ERR_OK(status) || !ads->config.realm) { extern struct winbindd_methods msrpc_methods; DEBUG(1,("ads_connect for domain %s failed: %s\n", domain->name, ads_errstr(status))); @@ -161,11 +152,9 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) /* remember our primary realm for trusted domain support */ if (!primary_realm) { - primary_realm = strdup(ads->realm); + primary_realm = strdup(ads->config.realm); } - fstrcpy(domain->full_name, ads->server_realm); - domain->private = (void *)ads; return ads; } @@ -405,7 +394,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain, /* accept either the win2000 or the pre-win2000 username */ asprintf(&exp, "(|(sAMAccountName=%s)(userPrincipalName=%s@%s))", - name, name, ads->realm); + name, name, ads->config.realm); rc = ads_search_retry(ads, &res, exp, attrs); free(exp); if (!ADS_ERR_OK(rc)) { @@ -535,49 +524,6 @@ failed: return False; } - -/* convert a sid to a distnguished name */ -static NTSTATUS sid_to_distinguished_name(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - DOM_SID *sid, - char **dn) -{ - ADS_STRUCT *ads = NULL; - const char *attrs[] = {"distinguishedName", NULL}; - ADS_STATUS rc; - void *msg = NULL; - char *exp; - char *sidstr; - NTSTATUS status = NT_STATUS_UNSUCCESSFUL; - - DEBUG(3,("ads: sid_to_distinguished_name\n")); - - ads = ads_cached_connection(domain); - if (!ads) goto done; - - sidstr = sid_binstring(sid); - asprintf(&exp, "(objectSid=%s)", sidstr); - rc = ads_search_retry(ads, &msg, exp, attrs); - free(exp); - free(sidstr); - if (!ADS_ERR_OK(rc)) { - DEBUG(1,("sid_to_distinguished_name ads_search: %s\n", ads_errstr(rc))); - goto done; - } - - *dn = ads_pull_string(ads, mem_ctx, msg, "distinguishedName"); - - status = NT_STATUS_OK; - - DEBUG(3,("ads sid_to_distinguished_name mapped %s\n", *dn)); - -done: - if (msg) ads_msgfree(ads, msg); - - return status; -} - - /* Lookup user information from a rid */ static NTSTATUS query_user(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, @@ -831,6 +777,7 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, uint32 *num_domains, char ***names, + char ***alt_names, DOM_SID **dom_sids) { ADS_STRUCT *ads; @@ -842,7 +789,7 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, ads = ads_cached_connection(domain); if (!ads) return NT_STATUS_UNSUCCESSFUL; - rc = ads_trusted_domains(ads, mem_ctx, num_domains, names, dom_sids); + rc = ads_trusted_domains(ads, mem_ctx, num_domains, names, alt_names, dom_sids); return ads_ntstatus(rc); } @@ -867,6 +814,37 @@ static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid) return ads_ntstatus(rc); } + +/* find alternate names list for the domain - for ADS this is the + netbios name */ +static NTSTATUS alternate_name(struct winbindd_domain *domain) +{ + ADS_STRUCT *ads; + ADS_STATUS rc; + TALLOC_CTX *ctx; + char *workgroup; + + ads = ads_cached_connection(domain); + if (!ads) return NT_STATUS_UNSUCCESSFUL; + + if (!(ctx = talloc_init_named("alternate_name"))) { + return NT_STATUS_NO_MEMORY; + } + + rc = ads_workgroup_name(ads, ctx, &workgroup); + + if (ADS_ERR_OK(rc)) { + fstrcpy(domain->name, workgroup); + fstrcpy(domain->alt_name, ads->config.realm); + strupper(domain->alt_name); + strupper(domain->name); + } + + talloc_destroy(ctx); + + return ads_ntstatus(rc); +} + /* the ADS backend methods are exposed via this structure */ struct winbindd_methods ads_methods = { True, @@ -879,7 +857,8 @@ struct winbindd_methods ads_methods = { lookup_groupmem, sequence_number, trusted_domains, - domain_sid + domain_sid, + alternate_name }; #endif diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index a607727867f..060139af3ed 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -873,13 +873,14 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, uint32 *num_domains, char ***names, + char ***alt_names, DOM_SID **dom_sids) { struct winbind_cache *cache = get_cache(domain); /* we don't cache this call */ return cache->backend->trusted_domains(domain, mem_ctx, num_domains, - names, dom_sids); + names, alt_names, dom_sids); } /* find the domain sid */ @@ -891,6 +892,15 @@ static NTSTATUS domain_sid(struct winbindd_domain *domain, DOM_SID *sid) return cache->backend->domain_sid(domain, sid); } +/* find the alternate names for the domain, if any */ +static NTSTATUS alternate_name(struct winbindd_domain *domain) +{ + struct winbind_cache *cache = get_cache(domain); + + /* we don't cache this call */ + return cache->backend->alternate_name(domain); +} + /* the ADS backend methods are exposed via this structure */ struct winbindd_methods cache_methods = { True, @@ -903,5 +913,6 @@ struct winbindd_methods cache_methods = { lookup_groupmem, sequence_number, trusted_domains, - domain_sid + domain_sid, + alternate_name }; diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 3175860a79a..be289847912 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -97,12 +97,15 @@ struct get_dc_name_cache { static BOOL cm_ads_find_dc(const char *domain, struct in_addr *dc_ip, fstring srv_name) { ADS_STRUCT *ads; - ads = ads_init_simple(); + ads = ads_init(domain, domain, NULL); if (!ads) { return False; } - DEBUG(4,("cm_ads_find_dc: realm=%s\n", ads->realm)); + /* we don't need to bind, just connect */ + ads->auth.no_bind = 1; + + DEBUG(4,("cm_ads_find_dc: domain=%s\n", domain)); #ifdef HAVE_ADS /* a full ads_connect() is actually overkill, as we don't srictly need @@ -111,15 +114,15 @@ static BOOL cm_ads_find_dc(const char *domain, struct in_addr *dc_ip, fstring sr ads_connect(ads); #endif - fstrcpy(srv_name, ads->ldap_server_name); + if (!ads->config.realm) { + return False; + } + + fstrcpy(srv_name, ads->config.ldap_server_name); strupper(srv_name); *dc_ip = ads->ldap_ip; ads_destroy(&ads); - if (!*srv_name || is_zero_ip(*dc_ip)) { - return False; - } - DEBUG(4,("cm_ads_find_dc: using server='%s' IP=%s\n", srv_name, inet_ntoa(*dc_ip))); @@ -247,9 +250,12 @@ static BOOL cm_get_dc_name(const char *domain, fstring srv_name, struct in_addr zero_ip(&dc_ip); + ret = False; if (lp_security() == SEC_ADS) { ret = cm_ads_find_dc(domain, &dc_ip, srv_name); - } else { + } + if (!ret) { + /* fall back on rpc methods if the ADS methods fail */ ret = cm_rpc_find_dc(domain, &dc_ip, srv_name); } diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c index 2bb0e8c49f4..5ec34f663d8 100644 --- a/source3/nsswitch/winbindd_rpc.c +++ b/source3/nsswitch/winbindd_rpc.c @@ -575,22 +575,23 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, uint32 *num_domains, char ***names, + char ***alt_names, DOM_SID **dom_sids) { CLI_POLICY_HND *hnd; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; uint32 enum_ctx = 0; - uint32 pref_num_domains = 5; DEBUG(3,("rpc: trusted_domains\n")); *num_domains = 0; + *alt_names = NULL; if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) goto done; result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx, - &hnd->pol, &enum_ctx, &pref_num_domains, + &hnd->pol, &enum_ctx, num_domains, names, dom_sids); done: return result; @@ -621,6 +622,13 @@ done: return status; } +/* find alternate names list for the domain - none for rpc */ +static NTSTATUS alternate_name(struct winbindd_domain *domain) +{ + return NT_STATUS_OK; +} + + /* the rpc backend methods are exposed via this structure */ struct winbindd_methods msrpc_methods = { False, @@ -633,5 +641,6 @@ struct winbindd_methods msrpc_methods = { lookup_groupmem, sequence_number, trusted_domains, - domain_sid + domain_sid, + alternate_name }; diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index b927380af87..daa3abb3400 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -74,19 +74,17 @@ void free_domain_list(void) } /* Add a trusted domain to our list of domains */ - -static struct winbindd_domain *add_trusted_domain(char *domain_name, - struct winbindd_methods *methods) +static struct winbindd_domain *add_trusted_domain(const char *domain_name, const char *alt_name, + struct winbindd_methods *methods, + DOM_SID *sid) { struct winbindd_domain *domain; /* We can't call domain_list() as this function is called from init_domain_list() and we'll get stuck in a loop. */ - for (domain = _domain_list; domain; domain = domain->next) { - if (strcmp(domain_name, domain->name) == 0) { - DEBUG(3, ("domain %s already in domain list\n", - domain_name)); + if (strcmp(domain_name, domain->name) == 0 || + strcmp(domain_name, domain->alt_name) == 0) { return domain; } } @@ -101,40 +99,95 @@ static struct winbindd_domain *add_trusted_domain(char *domain_name, ZERO_STRUCTP(domain); + /* prioritise the short name */ + if (strchr_m(domain_name, '.') && alt_name && *alt_name) { + fstrcpy(domain->name, alt_name); + fstrcpy(domain->alt_name, domain_name); + } else { fstrcpy(domain->name, domain_name); + if (alt_name) { + fstrcpy(domain->alt_name, alt_name); + } + } + domain->methods = methods; domain->sequence_number = DOM_SEQUENCE_NONE; domain->last_seq_check = 0; + if (sid) { + sid_copy(&domain->sid, sid); + } /* Link to domain list */ - DLIST_ADD(_domain_list, domain); + DEBUG(1,("Added domain %s %s %s\n", + domain->name, domain->alt_name, + sid?sid_string_static(&domain->sid):"")); + return domain; } -/* Look up global info for the winbind daemon */ +/* + rescan our domains looking for new trusted domains + */ +void rescan_trusted_domains(void) +{ + struct winbindd_domain *domain; + TALLOC_CTX *mem_ctx; + static time_t last_scan; + time_t t = time(NULL); + + /* ony rescan every few minutes */ + if ((unsigned)(t - last_scan) < WINBINDD_RESCAN_FREQ) { + return; + } + last_scan = time(NULL); + + DEBUG(1, ("scanning trusted domain list\n")); + + if (!(mem_ctx = talloc_init_named("init_domain_list"))) + return; + + for (domain = _domain_list; domain; domain = domain->next) { + NTSTATUS result; + char **names; + char **alt_names; + int num_domains = 0; + DOM_SID *dom_sids; + int i; + + result = domain->methods->trusted_domains(domain, mem_ctx, &num_domains, + &names, &alt_names, &dom_sids); + if (!NT_STATUS_IS_OK(result)) { + continue; + } + + /* Add each domain to the trusted domain list. Each domain inherits + the access methods of its parent */ + for(i = 0; i < num_domains; i++) { + DEBUG(10,("Found domain %s\n", names[i])); + add_trusted_domain(names[i], + alt_names?alt_names[i]:NULL, + domain->methods, &dom_sids[i]); + } + } + + talloc_destroy(mem_ctx); +} + +/* Look up global info for the winbind daemon */ BOOL init_domain_list(void) { NTSTATUS result; - TALLOC_CTX *mem_ctx; extern struct winbindd_methods cache_methods; struct winbindd_domain *domain; - DOM_SID *dom_sids; - char **names; - uint32 num_domains = 0; - - if (!(mem_ctx = talloc_init_named("init_domain_list"))) - return False; /* Free existing list */ - free_domain_list(); /* Add ourselves as the first entry */ - - domain = add_trusted_domain(lp_workgroup(), &cache_methods); + domain = add_trusted_domain(lp_workgroup(), NULL, &cache_methods, NULL); /* Now we *must* get the domain sid for our primary domain. Go into a holding pattern until that is available */ @@ -147,29 +200,12 @@ BOOL init_domain_list(void) result = cache_methods.domain_sid(domain, &domain->sid); } - DEBUG(1,("Added domain %s (%s)\n", - domain->name, - sid_string_static(&domain->sid))); + /* get any alternate name for the primary domain */ + cache_methods.alternate_name(domain); - DEBUG(1, ("getting trusted domain list\n")); + /* do an initial scan for trusted domains */ + rescan_trusted_domains(); - result = cache_methods.trusted_domains(domain, mem_ctx, &num_domains, - &names, &dom_sids); - - /* Add each domain to the trusted domain list */ - if (NT_STATUS_IS_OK(result)) { - int i; - for(i = 0; i < num_domains; i++) { - domain = add_trusted_domain(names[i], &cache_methods); - if (!domain) continue; - sid_copy(&domain->sid, &dom_sids[i]); - DEBUG(1,("Added domain %s (%s)\n", - domain->name, - sid_string_static(&domain->sid))); - } - } - - talloc_destroy(mem_ctx); return True; } @@ -184,7 +220,7 @@ struct winbindd_domain *find_domain_from_name(const char *domain_name) for (domain = domain_list(); domain != NULL; domain = domain->next) { if (strequal(domain_name, domain->name) || - strequal(domain_name, domain->full_name)) + (domain->alt_name[0] && strequal(domain_name, domain->alt_name))) return domain; } diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 542fad311c0..14227a349a4 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -542,7 +542,7 @@ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint32 *enum_ctx, - uint32 *pref_num_domains, uint32 *num_domains, + uint32 *num_domains, char ***domain_names, DOM_SID **domain_sids) { prs_struct qbuf, rbuf; @@ -561,7 +561,8 @@ NTSTATUS cli_lsa_enum_trust_dom(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ - init_q_enum_trust_dom(&q, pol, *enum_ctx, *pref_num_domains); + /* 64k is enough for about 2000 trusted domains */ + init_q_enum_trust_dom(&q, pol, *enum_ctx, 0x10000); if (!lsa_io_q_enum_trust_dom("", &q, &qbuf, 0) || !rpc_api_pipe_req(cli, LSA_ENUMTRUSTDOM, &qbuf, &rbuf)) { diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 067325c06e6..51b260cceb8 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -191,23 +191,15 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, /* defaults, but may be changed using params */ uint32 enum_ctx = 0; - uint32 preferred_maxnum = 5; uint32 num_domains = 0; int i; - if (argc > 3) { - printf("Usage: %s [preferred max number (%d)] [enum context (0)]\n", - argv[0], preferred_maxnum); + if (argc > 2) { + printf("Usage: %s [enum context (0)]\n", argv[0]); return NT_STATUS_OK; } - /* enumeration context */ - if (argc >= 2 && argv[1]) { - preferred_maxnum = atoi(argv[1]); - } - - /* preferred maximum number */ - if (argc == 3 && argv[2]) { + if (argc == 2 && argv[1]) { enum_ctx = atoi(argv[2]); } @@ -221,8 +213,8 @@ static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, /* Lookup list of trusted domains */ result = cli_lsa_enum_trust_dom(cli, mem_ctx, &pol, &enum_ctx, - &preferred_maxnum, &num_domains, - &domain_names, &domain_sids); + &num_domains, + &domain_names, &domain_sids); if (!NT_STATUS_IS_OK(result) && !NT_STATUS_EQUAL(result, NT_STATUS_NO_MORE_ENTRIES) && !NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)) diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index d8aea624be3..1d79cbd5d00 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -200,14 +200,11 @@ static int negprot_spnego(char *p) if (lp_security() != SEC_ADS) { blob = spnego_gen_negTokenInit(guid, OIDs_plain, "NONE"); } else { - ADS_STRUCT *ads; - ads = ads_init_simple(); /* win2000 uses host$@REALM, which we will probably use eventually, but for now this works */ - asprintf(&principal, "HOST/%s@%s", guid, ads->realm); + asprintf(&principal, "HOST/%s@%s", guid, lp_realm()); blob = spnego_gen_negTokenInit(guid, OIDs_krb5, principal); free(principal); - ads_destroy(&ads); } memcpy(p, blob.data, blob.length); len = blob.length; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 1eef3d98e8f..d173fec00e4 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -364,6 +364,10 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports) set_socket_options(smbd_server_fd(),"SO_KEEPALIVE"); set_socket_options(smbd_server_fd(),user_socket_options); + /* this is needed so that we get decent entries + in smbstatus for port 445 connects */ + fstrcpy(remote_machine, get_socket_addr(smbd_server_fd())); + /* Reset global variables in util.c so that client substitutions will be done correctly in the process. */ diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index a00554e6389..2e9e54b8d93 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -122,6 +122,12 @@ static int reply_spnego_kerberos(connection_struct *conn, ads = ads_init_simple(); + if (!ads) { + return ERROR_NT(NT_STATUS_LOGON_FAILURE); + } + + ads->auth.realm = strdup(lp_realm()); + ret = ads_verify_ticket(ads, &ticket, &client, &auth_data); if (!NT_STATUS_IS_OK(ret)) { DEBUG(1,("Failed to verify incoming ticket!\n")); @@ -139,7 +145,7 @@ static int reply_spnego_kerberos(connection_struct *conn, } *p = 0; - if (strcasecmp(p+1, ads->realm) != 0) { + if (strcasecmp(p+1, ads->auth.realm) != 0) { DEBUG(3,("Ticket for foreign realm %s@%s\n", client, p+1)); if (!lp_allow_trusted_domains()) { return ERROR_NT(NT_STATUS_LOGON_FAILURE); @@ -379,6 +385,7 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, uint32 auth_flags = AUTH_FLAG_NONE; auth_usersupplied_info *user_info = NULL; auth_serversupplied_info *server_info = NULL; + extern fstring remote_machine; /* we must have setup the auth context by now */ if (!ntlmssp_auth_context) { @@ -413,6 +420,11 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, DEBUG(3,("Got user=[%s] workgroup=[%s] machine=[%s] len1=%d len2=%d\n", user, workgroup, machine, lmhash.length, nthash.length)); + /* the client has given us its machine name (which we otherwise would not get on port 445). + we need to possibly reload smb.conf if smb.conf includes depend on the machine name */ + fstrcpy(remote_machine, machine); + reload_services(True); + #if 0 file_save("nthash1.dat", nthash.data, nthash.length); file_save("lmhash1.dat", lmhash.data, lmhash.length); diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index ef4de3d76f9..f74f633cf98 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -58,23 +58,23 @@ static int net_ads_info(int argc, const char **argv) { ADS_STRUCT *ads; - ads = ads_init(NULL, NULL, opt_host, NULL, NULL); + ads = ads_init(NULL, NULL, opt_host); - /* we want this servers realm, not our realm */ - SAFE_FREE(ads->realm); + if (ads) { + ads->auth.no_bind = 1; + } ads_connect(ads); - if (!ads) { + if (!ads || !ads->config.realm) { d_printf("Didn't find the ldap server!\n"); return -1; } - d_printf("LDAP server: %s\n", ads->ldap_server); - d_printf("LDAP server IP: %s\n", inet_ntoa(ads->ldap_ip)); - d_printf("LDAP server name: %s\n", ads->ldap_server_name); - d_printf("Realm: %s\n", ads->realm); - d_printf("Bind Path: %s\n", ads->bind_path); + d_printf("LDAP server: %s\n", inet_ntoa(ads->ldap_ip)); + d_printf("LDAP server name: %s\n", ads->config.ldap_server_name); + d_printf("Realm: %s\n", ads->config.realm); + d_printf("Bind Path: %s\n", ads->config.bind_path); d_printf("LDAP port: %d\n", ads->ldap_port); return 0; @@ -88,7 +88,7 @@ static ADS_STRUCT *ads_startup(void) BOOL need_password = False; BOOL second_time = False; - ads = ads_init(NULL, NULL, opt_host, NULL, NULL); + ads = ads_init(NULL, NULL, opt_host); if (!opt_user_name) { opt_user_name = "administrator"; @@ -106,9 +106,9 @@ retry: } if (opt_password) - ads->password = strdup(opt_password); + ads->auth.password = strdup(opt_password); - ads->user_name = strdup(opt_user_name); + ads->auth.user_name = strdup(opt_user_name); status = ads_connect(ads); if (!ADS_ERR_OK(status)) { @@ -141,8 +141,38 @@ int net_ads_check(void) return 0; } +/* + determine the netbios workgroup name for a domain + */ +static int net_ads_workgroup(int argc, const char **argv) +{ + ADS_STRUCT *ads; + TALLOC_CTX *ctx; + char *workgroup; -static BOOL usergrp_display(char *field, void **values, void *data_area) + if (!(ads = ads_startup())) return -1; + + if (!(ctx = talloc_init_named("net_ads_workgroup"))) { + return -1; + } + + if (!ADS_ERR_OK(ads_workgroup_name(ads, ctx, &workgroup))) { + d_printf("Failed to find workgroup for realm '%s'\n", + ads->config.realm); + talloc_destroy(ctx); + return -1; + } + + d_printf("Workgroup: %s\n", workgroup); + + talloc_destroy(ctx); + + return 0; +} + + + +static void usergrp_display(char *field, void **values, void *data_area) { char **disp_fields = (char **) data_area; @@ -156,16 +186,15 @@ static BOOL usergrp_display(char *field, void **values, void *data_area) } SAFE_FREE(disp_fields[0]); SAFE_FREE(disp_fields[1]); - return True; + return; } if (!values) /* must be new field, indicate string field */ - return True; + return; if (StrCaseCmp(field, "sAMAccountName") == 0) { disp_fields[0] = strdup((char *) values[0]); } if (StrCaseCmp(field, "description") == 0) disp_fields[1] = strdup((char *) values[0]); - return True; /* always strings here */ } static int net_ads_user_usage(int argc, const char **argv) @@ -213,8 +242,8 @@ static int ads_user_add(int argc, const char **argv) } /* try setting the password */ - asprintf(&upn, "%s@%s", argv[0], ads->realm); - status = krb5_set_password(ads->kdc_server, upn, argv[1]); + asprintf(&upn, "%s@%s", argv[0], ads->config.realm); + status = krb5_set_password(ads->auth.kdc_server, upn, argv[1]); safe_free(upn); if (ADS_ERR_OK(status)) { d_printf("User %s added\n", argv[0]); @@ -331,7 +360,7 @@ int net_ads_user(int argc, const char **argv) d_printf("\nUser name Comment"\ "\n-----------------------------\n"); - rc = ads_do_search_all_fn(ads, ads->bind_path, + rc = ads_do_search_all_fn(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, "(objectclass=user)", opt_long_list_entries ? longattrs : @@ -438,7 +467,7 @@ int net_ads_group(int argc, const char **argv) if (opt_long_list_entries) d_printf("\nGroup name Comment"\ "\n-----------------------------\n"); - rc = ads_do_search_all_fn(ads, ads->bind_path, + rc = ads_do_search_all_fn(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, "(objectclass=group)", opt_long_list_entries ? longattrs : @@ -499,11 +528,11 @@ static int net_ads_leave(int argc, const char **argv) rc = ads_leave_realm(ads, global_myname); if (!ADS_ERR_OK(rc)) { d_printf("Failed to delete host '%s' from the '%s' realm.\n", - global_myname, ads->realm); + global_myname, ads->config.realm); return -1; } - d_printf("Removed '%s' from realm '%s'\n", global_myname, ads->realm); + d_printf("Removed '%s' from realm '%s'\n", global_myname, ads->config.realm); return 0; } @@ -534,7 +563,7 @@ int net_ads_join(int argc, const char **argv) if (!(ads = ads_startup())) return -1; ou_str = ads_ou_string(org_unit); - asprintf(&dn, "%s,%s", ou_str, ads->bind_path); + asprintf(&dn, "%s,%s", ou_str, ads->config.bind_path); free(ou_str); rc = ads_search_dn(ads, &res, dn, NULL); @@ -580,7 +609,7 @@ int net_ads_join(int argc, const char **argv) return -1; } - d_printf("Joined '%s' to realm '%s'\n", global_myname, ads->realm); + d_printf("Joined '%s' to realm '%s'\n", global_myname, ads->config.realm); free(password); @@ -675,7 +704,7 @@ static int net_ads_printer_publish(int argc, const char **argv) get_a_printer, because the server name might be localhost or an ip address */ prt.printerName = argv[0]; - asprintf(&servername, "%s.%s", global_myname, ads->realm); + asprintf(&servername, "%s.%s", global_myname, ads->config.realm); prt.serverName = servername; prt.shortServerName = global_myname; prt.versionNumber = "4"; @@ -779,13 +808,13 @@ static int net_ads_password(int argc, const char **argv) /* use the realm so we can eventually change passwords for users in realms other than default */ - if (!(ads = ads_init(realm, NULL, NULL, NULL, NULL))) return -1; + if (!(ads = ads_init(realm, NULL, NULL))) return -1; asprintf(&prompt, "Enter new password for %s:", argv[0]); new_password = getpass(prompt); - ret = kerberos_set_password(ads->kdc_server, auth_principal, + ret = kerberos_set_password(ads->auth.kdc_server, auth_principal, auth_password, argv[0], new_password); if (!ADS_ERR_OK(ret)) { d_printf("Password change failed :-( ...\n"); @@ -814,7 +843,7 @@ static int net_ads_change_localhost_pass(int argc, const char **argv) hostname = strdup(global_myname); strlower(hostname); - asprintf(&host_principal, "%s@%s", hostname, ads->realm); + asprintf(&host_principal, "%s@%s", hostname, ads->config.realm); SAFE_FREE(hostname); d_printf("Changing password for principal: HOST/%s\n", host_principal); @@ -873,7 +902,7 @@ static int net_ads_search(int argc, const char **argv) exp = argv[0]; attrs = (argv + 1); - rc = ads_do_search_all(ads, ads->bind_path, + rc = ads_do_search_all(ads, ads->config.bind_path, LDAP_SCOPE_SUBTREE, exp, attrs, &res); if (!ADS_ERR_OK(rc)) { @@ -927,6 +956,7 @@ int net_ads(int argc, const char **argv) {"CHOSTPASS", net_ads_change_localhost_pass}, {"PRINTER", net_ads_printer}, {"SEARCH", net_ads_search}, + {"WORKGROUP", net_ads_workgroup}, {"HELP", net_ads_help}, {NULL, NULL} }; diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index a9aa0800549..f76b1862518 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -215,6 +215,8 @@ static int net_lookup_kdc(int argc, const char **argv) DEBUG(1, ("No kerberos support\n")); return -1; } + + /* lookup hosts or IP addresses using internal samba lookup fns */ int net_lookup(int argc, const char **argv) { diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 9b3248cf633..ae956076d52 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -1824,7 +1824,7 @@ static int rpc_trustdom_list(int argc, const char **argv) POLICY_HND connect_hnd; /* trusted domains listing variables */ - int enum_ctx = 0, pref_num_domains = 5; + int enum_ctx = 0; int num_domains, i, pad_len, col_len = 20; DOM_SID *domain_sids; char **trusted_dom_names; @@ -1894,7 +1894,7 @@ static int rpc_trustdom_list(int argc, const char **argv) do { nt_status = cli_lsa_enum_trust_dom(cli, mem_ctx, &connect_hnd, &enum_ctx, - &pref_num_domains, &num_domains, + &num_domains, &trusted_dom_names, &domain_sids); if (NT_STATUS_IS_ERR(nt_status)) { From b745d8b1cdadcc8836514f1a1a11467db94db6f4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Aug 2002 03:27:04 +0000 Subject: [PATCH 193/262] Try to make this easier to debug - display the username that failed. Andrew Bartlett (This used to be commit 8405bccd4e7a5315e58890ffa5d481031636f88a) --- source3/passdb/pdb_ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 8575d8b30f0..51d26825e3b 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1281,7 +1281,7 @@ static BOOL ldapsam_getsampwnam(struct pdb_methods *my_methods, SAM_ACCOUNT * us if (entry) { if (!init_sam_from_ldap(ldap_state, user, ldap_struct, entry)) { - DEBUG(1,("ldapsam_getsampwnam: init_sam_from_ldap failed!\n")); + DEBUG(1,("ldapsam_getsampwnam: init_sam_from_ldap failed for user '%s'!\n", sname)); ldap_msgfree(result); ldap_unbind(ldap_struct); return False; From b0565dac76581400518fcbe1196fdc6297b9351c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Aug 2002 03:43:26 +0000 Subject: [PATCH 194/262] I must have missed this when I was adding 'const' to these earlier... Andrew Bartlett (This used to be commit ce6c8a647ca56dcbb60ff898d77c2df297c1fe79) --- source3/passdb/pdb_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/passdb/pdb_unix.c b/source3/passdb/pdb_unix.c index b4092b88f8a..88334f2b703 100644 --- a/source3/passdb/pdb_unix.c +++ b/source3/passdb/pdb_unix.c @@ -65,7 +65,7 @@ static BOOL unixsam_getsampwrid (struct pdb_methods *methods, return ret; } -static BOOL unixsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid) +static BOOL unixsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, const DOM_SID *sid) { uint32 rid; if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) From e04c25b40650ea75b6f5e551c29c4acc1f4f24b9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Aug 2002 05:04:13 +0000 Subject: [PATCH 195/262] fixed wbinfo -t for netbiosless domains (This used to be commit 68e70b000b273ba72206c87ad1efd6efc2c7c487) --- source3/nsswitch/winbindd_cm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index be289847912..2dec9f05586 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -97,7 +97,13 @@ struct get_dc_name_cache { static BOOL cm_ads_find_dc(const char *domain, struct in_addr *dc_ip, fstring srv_name) { ADS_STRUCT *ads; - ads = ads_init(domain, domain, NULL); + const char *realm = domain; + + if (strcasecmp(realm, lp_workgroup()) == 0) { + realm = lp_realm(); + } + + ads = ads_init(realm, domain, NULL); if (!ads) { return False; } From ff2132e1b37cfca8d36fe515dd1a5139459dd719 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 5 Aug 2002 06:28:58 +0000 Subject: [PATCH 196/262] Spelling fix. (This used to be commit 28ba237a9e02e284fb541562270db758612e425a) --- source3/rpc_parse/parse_reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 473e2554b40..365ad2dc70b 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1754,7 +1754,7 @@ BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int if(!prs_uint32("unknown_0 ", ps, depth, &r_q->unknown_0)) return False; - if(!prs_uint32("asccess_desired ", ps, depth, &r_q->access_desired)) + if(!prs_uint32("access_desired ", ps, depth, &r_q->access_desired)) return False; return True; From cded51d936dcbd31f5968570de5be6ad0ad9931d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Aug 2002 14:11:50 +0000 Subject: [PATCH 197/262] added 'net rpc testjoin' and 'net ads testjoin' commands unfortuately we don't seem to be able to auto-test the ADS join due to a rather nasty property of the GSSAPI library. (This used to be commit 87c34a974a91e940bd26078a68dd84f4341d6913) --- source3/utils/net_ads.c | 42 +++++++++++++++ source3/utils/net_rpc.c | 2 + source3/utils/net_rpc_join.c | 101 ++++++++++++++++++++++++++++------- 3 files changed, 125 insertions(+), 20 deletions(-) diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index f74f633cf98..6916bcb4062 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -32,6 +32,8 @@ int net_ads_usage(int argc, const char **argv) "\n\tjoins the local machine to a ADS realm\n"\ "\nnet ads leave"\ "\n\tremoves the local machine from a ADS realm\n"\ +"\nnet ads testjoin"\ +"\n\ttests that an exiting join is OK\n"\ "\nnet ads user"\ "\n\tlist, add, or delete users in the realm\n"\ "\nnet ads group"\ @@ -537,6 +539,45 @@ static int net_ads_leave(int argc, const char **argv) return 0; } +static int net_ads_join_ok(void) +{ + ADS_STRUCT *ads = NULL; + extern pstring global_myname; + + if (!secrets_init()) { + DEBUG(1,("Failed to initialise secrets database\n")); + return -1; + } + + asprintf(&opt_user_name, "%s$", global_myname); + opt_password = secrets_fetch_machine_password(); + + if (!(ads = ads_startup())) { + return -1; + } + + ads_destroy(&ads); + return 0; +} + +/* + check that an existing join is OK + */ +int net_ads_testjoin(int argc, const char **argv) +{ + /* Display success or failure */ + if (net_ads_join_ok() != 0) { + fprintf(stderr,"Join to domain is not valid\n"); + return -1; + } + + printf("Join is OK\n"); + return 0; +} + +/* + join a domain using ADS + */ int net_ads_join(int argc, const char **argv) { ADS_STRUCT *ads; @@ -948,6 +989,7 @@ int net_ads(int argc, const char **argv) struct functable func[] = { {"INFO", net_ads_info}, {"JOIN", net_ads_join}, + {"TESTJOIN", net_ads_testjoin}, {"LEAVE", net_ads_leave}, {"STATUS", net_ads_status}, {"USER", net_ads_user}, diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index ae956076d52..55e8a497cca 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -2120,6 +2120,7 @@ int net_rpc_usage(int argc, const char **argv) { d_printf(" net rpc info \t\t\tshow basic info about a domain \n"); d_printf(" net rpc join \t\t\tto join a domain \n"); + d_printf(" net rpc testjoin \t\t\ttests that a join is valid\n"); d_printf(" net rpc user \t\t\tto add, delete and list users\n"); d_printf(" net rpc group \t\tto list groups\n"); d_printf(" net rpc share \t\tto add, delete, and list shares\n"); @@ -2182,6 +2183,7 @@ int net_rpc(int argc, const char **argv) struct functable func[] = { {"info", net_rpc_info}, {"join", net_rpc_join}, + {"testjoin", net_rpc_testjoin}, {"user", net_rpc_user}, {"group", net_rpc_group}, {"share", net_rpc_share}, diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index cfa37d25df5..c8be93c39cc 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -35,6 +35,61 @@ goto done; \ } + +/** + * confirm that a domain join is still valid + * + * @return A shell status integer (0 for success) + * + **/ +int net_rpc_join_ok(const char *domain) +{ + struct cli_state *cli; + uchar stored_md4_trust_password[16]; + int retval = 1; + uint32 channel; + NTSTATUS result; + + /* Connect to remote machine */ + if (!(cli = net_make_ipc_connection(NET_FLAGS_ANONYMOUS | NET_FLAGS_PDC))) { + return 1; + } + + if (!cli_nt_session_open(cli, PIPE_NETLOGON)) { + DEBUG(0,("Error connecting to NETLOGON pipe\n")); + goto done; + } + + if (!secrets_fetch_trust_account_password(domain, + stored_md4_trust_password, NULL)) { + DEBUG(0,("Could not reterive domain trust secret")); + goto done; + } + + if (lp_server_role() == ROLE_DOMAIN_BDC || + lp_server_role() == ROLE_DOMAIN_PDC) { + channel = SEC_CHAN_BDC; + } else { + channel = SEC_CHAN_WKSTA; + } + + CHECK_RPC_ERR(cli_nt_setup_creds(cli, + channel, + stored_md4_trust_password), + "error in domain join verification"); + + retval = 0; /* Success! */ + +done: + /* Close down pipe - this will clean up open policy handles */ + if (cli->nt_pipe_fnum) + cli_nt_session_close(cli); + + cli_shutdown(cli); + + return retval; +} + /** * Join a domain using the administrator username and password * @@ -67,7 +122,6 @@ int net_rpc_join_newstyle(int argc, const char **argv) char *clear_trust_password = NULL; fstring ucs2_trust_password; int ucs2_pw_len; - uchar stored_md4_trust_password[16]; uchar pwbuf[516], sess_key[16]; SAM_USERINFO_CTR ctr; SAM_USER_INFO_24 p24; @@ -256,28 +310,10 @@ int net_rpc_join_newstyle(int argc, const char **argv) } /* Now check the whole process from top-to-bottom */ - cli_samr_close(cli, mem_ctx, &user_pol); - cli_nt_session_close(cli); /* Done with this pipe */ - if (!cli_nt_session_open(cli, PIPE_NETLOGON)) { - DEBUG(0, ("Error connecting to NETLOGON pipe\n")); - goto done; - } - - if (!secrets_fetch_trust_account_password(domain, - stored_md4_trust_password, NULL)) { - DEBUG(0, ("Could not reterive secrets we just stored!")); - goto done; - } - - CHECK_RPC_ERR(cli_nt_setup_creds(cli, - (acb_info & ACB_SVRTRUST) ? SEC_CHAN_BDC : SEC_CHAN_WKSTA, - stored_md4_trust_password), - "error in domain join verification"); - - retval = 0; /* Success! */ + retval = net_rpc_join_ok(domain); done: /* Close down pipe - this will clean up open policy handles */ @@ -300,3 +336,28 @@ done: return retval; } + + +/** + * check that a join is OK + * + * @return A shell status integer (0 for success) + * + **/ +int net_rpc_testjoin(int argc, const char **argv) +{ + char *domain = lp_workgroup(); + + domain = smb_xstrdup(domain); + + /* Display success or failure */ + if (net_rpc_join_ok(domain) != 0) { + fprintf(stderr,"Join to domain '%s' is not valid\n",domain); + free(domain); + return -1; + } + + printf("Join to '%s' is OK\n",domain); + free(domain); + return 0; +} From 4da476001e13dd032059ddaf72676c998089272d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Aug 2002 00:56:39 +0000 Subject: [PATCH 198/262] fixed a memory corruption bug in the wins code (This used to be commit 3f6ca04003172c22d02111f2170ad60f0d7936d9) --- source3/lib/wins_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/wins_srv.c b/source3/lib/wins_srv.c index adf405ae7e2..61e77aca587 100644 --- a/source3/lib/wins_srv.c +++ b/source3/lib/wins_srv.c @@ -236,7 +236,7 @@ char **wins_srv_tags(void) } /* add it to the list */ - ret = (char **)Realloc(ret, (count+1) * sizeof(char *)); + ret = (char **)Realloc(ret, (count+2) * sizeof(char *)); ret[count] = strdup(t_ip.tag); if (!ret[count]) break; count++; From 269c713edf9554e3b0670a8ed6b606e743e807f7 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 6 Aug 2002 01:07:07 +0000 Subject: [PATCH 199/262] Compile fix for new cli_lsa_enum_trust_dom() argument list. (This used to be commit 2f46bdeb4fa1d32fe948af5d7fa80480ff2d2c86) --- source3/python/py_lsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/python/py_lsa.c b/source3/python/py_lsa.c index 21e6463c5f2..0584cf716bf 100644 --- a/source3/python/py_lsa.c +++ b/source3/python/py_lsa.c @@ -276,7 +276,7 @@ static PyObject *lsa_enum_trust_dom(PyObject *self, PyObject *args) { lsa_policy_hnd_object *hnd = (lsa_policy_hnd_object *)self; NTSTATUS ntstatus; - uint32 enum_ctx = 0, num_domains, i, pref_num_domains = 0; + uint32 enum_ctx = 0, num_domains, i; char **domain_names; DOM_SID *domain_sids; PyObject *result; @@ -286,7 +286,7 @@ static PyObject *lsa_enum_trust_dom(PyObject *self, PyObject *args) ntstatus = cli_lsa_enum_trust_dom( hnd->cli, hnd->mem_ctx, &hnd->pol, &enum_ctx, - &pref_num_domains, &num_domains, &domain_names, &domain_sids); + &num_domains, &domain_names, &domain_sids); if (!NT_STATUS_IS_OK(ntstatus)) { PyErr_SetObject(lsa_ntstatus, py_ntstatus_tuple(ntstatus)); From 74c8441e9d21f317b74032b5bdd17c8d2f78c015 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Aug 2002 03:26:58 +0000 Subject: [PATCH 200/262] fixed a memory corruption bug in ads_try_dns() (This used to be commit 2ee0abb50f25e5a4529d8c9409c979a7a00e5984) --- source3/libads/ldap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index a8126faffe4..c8d940f331d 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -89,27 +89,27 @@ static BOOL ads_try_dns(ADS_STRUCT *ads) realm = ads->server.realm; if (!realm || !*realm) { - SAFE_FREE(realm); realm = lp_realm(); } if (!realm || !*realm) { - SAFE_FREE(realm); realm = ads->server.workgroup; } if (!realm || !*realm) { - SAFE_FREE(realm); realm = lp_workgroup(); } if (!realm) { return False; } + realm = smb_xstrdup(realm); DEBUG(6,("ads_try_dns: looking for realm '%s'\n", realm)); if (ldap_domain2hostlist(realm, &list) != LDAP_SUCCESS) { + SAFE_FREE(realm); return False; } DEBUG(6,("ads_try_dns: ldap realm '%s' host list '%s'\n", realm, list)); + SAFE_FREE(realm); count = count_chars(list, ' ') + 1; ip_list = malloc(count * sizeof(struct ldap_ip)); From 4361b5cea56972b534ba36d89b521f9ad240d3d7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 6 Aug 2002 05:11:57 +0000 Subject: [PATCH 201/262] when using netbios lookup methods make sure we try any BDCs even if we get a response from WINS for a PDC, if the PDC isn't responding. (This used to be commit 57916316ffc70b0b6659f3ad9d14aad41fad4c71) --- source3/libads/ldap.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index c8d940f331d..26724894829 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -167,20 +167,32 @@ static BOOL ads_try_netbios(ADS_STRUCT *ads) DEBUG(6,("ads_try_netbios: looking for workgroup '%s'\n", workgroup)); - if (!get_dc_list(True, workgroup, &ip_list, &count) && - !get_dc_list(False, workgroup, &ip_list, &count)) { - return False; - } - - for (i=0;i Date: Tue, 6 Aug 2002 10:01:38 +0000 Subject: [PATCH 202/262] fixed 'net ads chostpass' for new ads structures (This used to be commit 3b0e60e522b669bad77e70d9c6f484a08ff84612) --- source3/utils/net_ads.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 6916bcb4062..ad405fe68c3 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -880,7 +880,17 @@ static int net_ads_change_localhost_pass(int argc, const char **argv) char *hostname; ADS_STATUS ret; - if (!(ads = ads_init_simple())) return -1; + if (!secrets_init()) { + DEBUG(1,("Failed to initialise secrets database\n")); + return -1; + } + + asprintf(&opt_user_name, "%s$", global_myname); + opt_password = secrets_fetch_machine_password(); + + if (!(ads = ads_startup())) { + return -1; + } hostname = strdup(global_myname); strlower(hostname); From 9542ef87c08de135cf3bf91c17c4b28bd8afb3ea Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 6 Aug 2002 10:10:54 +0000 Subject: [PATCH 203/262] Back out idra's change (at his request) - the values in the tdb *should* be upper cased already. However, if you created your registry tdb in the very early versions of jerry's patch, you could find that usrmgr doesn't function. Simply delete the registry.tdb, it will be recreated on startup. Andrew Bartlett (This used to be commit 17136a88c326bf338f948a67c92bb048c5a148af) --- source3/registry/reg_db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index db32568f157..b4c8f60ccf5 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -248,7 +248,7 @@ int regdb_fetch_reg_keys( char* key, REGSUBKEY_CTR *ctr ) /* convert to key format */ pstring_sub( path, "\\", "/" ); - /*strupper_m( path );*/ + strupper_m( path ); dbuf = tdb_fetch_by_string( tdb_reg, path ); From f23d88ab786c81fdd9e3036d862907ab06f7f5d1 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 6 Aug 2002 11:48:17 +0000 Subject: [PATCH 204/262] Try to bind with LDAPv3 if possible. Andrew Bartlett (This used to be commit 0e420878f26bdd19b5defb78a5fe4c31662ec941) --- source3/passdb/pdb_ldap.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 51d26825e3b..f82cb4488fc 100644 --- a/source3/passdb/pdb_ldap.c +++ b/source3/passdb/pdb_ldap.c @@ -1,11 +1,12 @@ /* Unix SMB/CIFS implementation. LDAP protocol helper functions for SAMBA - Copyright (C) Gerald Carter 2001 - Copyright (C) Shahms King 2001 - Copyright (C) Jean François Micouleau 1998 - Copyright (C) Andrew Bartlett 2002 - + Copyright (C) Jean François Micouleau 1998 + Copyright (C) Gerald Carter 2001 + Copyright (C) Shahms King 2001 + Copyright (C) Andrew Bartlett 2002 + Copyright (C) Stefan (metze) Metzmacher 2002 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -159,6 +160,8 @@ static const char *attr[] = {"uid", "pwdLastSet", "logonTime", static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP ** ldap_struct) { + int version; + if (geteuid() != 0) { DEBUG(0, ("ldap_open_connection: cannot access LDAP when not root..\n")); return False; @@ -171,6 +174,16 @@ static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP * DEBUG(0, ("ldap_initialize: %s\n", strerror(errno))); return (False); } + + if (ldap_get_option(*ldap_struct, LDAP_OPT_PROTOCOL_VERSION, &version) == LDAP_OPT_SUCCESS) + { + if (version != LDAP_VERSION3) + { + version = LDAP_VERSION3; + ldap_set_option (*ldap_struct, LDAP_OPT_PROTOCOL_VERSION, &version); + } + } + #else /* Parse the string manually */ @@ -179,7 +192,6 @@ static BOOL ldapsam_open_connection (struct ldapsam_privates *ldap_state, LDAP * int rc; int tls = LDAP_OPT_X_TLS_HARD; int port = 0; - int version; fstring protocol; fstring host; const char *p = ldap_state->uri; @@ -1353,7 +1365,7 @@ static BOOL ldapsam_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT * us } } -static BOOL ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid) +static BOOL ldapsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, const DOM_SID *sid) { uint32 rid; if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) From 5e42dcfe467d48fa7e8d87b88ae2bb2f54e5d28d Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 6 Aug 2002 18:02:56 +0000 Subject: [PATCH 205/262] Add SAMR 0x3e, which is samr_connect4. Seems to be the same as our existing connect (which I've been told is really connect2), with one extra dword. We've only seen 0x00000002 there... (This used to be commit 266344634944dff30f56453f9d86c490e7ac7a55) --- source3/include/rpc_samr.h | 19 +++++++++- source3/rpc_parse/parse_samr.c | 62 ++++++++++++++++++++++++++++++-- source3/rpc_server/srv_samr.c | 40 +++++++++++++++++++-- source3/rpc_server/srv_samr_nt.c | 60 ++++++++++++++++++++++++++++--- 4 files changed, 171 insertions(+), 10 deletions(-) diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index 78d5c244a6f..d9707c2ebfb 100644 --- a/source3/include/rpc_samr.h +++ b/source3/include/rpc_samr.h @@ -4,7 +4,10 @@ Copyright (C) Andrew Tridgell 1992-2000 Copyright (C) Luke Kenneth Casson Leighton 1996-2000 Copyright (C) Paul Ashton 1997-2000 - Copyright (C) Jean François Micouleau 1998-2001. + Copyright (C) Jean François Micouleau 1998-2001 + Copyright (C) Anthony Liguori 2002 + Copyright (C) Jim McDonough 2002 + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -144,6 +147,7 @@ SamrTestPrivateFunctionsUser #define SAMR_GET_DOM_PWINFO 0x38 #define SAMR_CONNECT 0x39 #define SAMR_SET_USERINFO 0x3A +#define SAMR_CONNECT4 0x3E /* Access bits to the SAM-object */ @@ -1870,6 +1874,19 @@ typedef struct r_samr_connect_info } SAMR_R_CONNECT; +/* SAMR_Q_CONNECT4 */ +typedef struct q_samr_connect4_info +{ + uint32 ptr_srv_name; /* pointer to server name */ + UNISTR2 uni_srv_name; + + uint32 unk_0; /* possible server name type, 1 for IP num, 2 for name */ + uint32 access_mask; +} SAMR_Q_CONNECT4; + +/* SAMR_R_CONNECT4 - same format as connect */ +typedef struct r_samr_connect_info SAMR_R_CONNECT4; + /* SAMR_Q_GET_DOM_PWINFO */ typedef struct q_samr_get_dom_pwinfo { diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 36ce59b7f26..5131f3b4f23 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5,8 +5,10 @@ * Copyright (C) Luke Kenneth Casson Leighton 1996-2000, * Copyright (C) Paul Ashton 1997-2000, * Copyright (C) Elrond 2000, - * Copyright (C) Jeremy Allison 2001 - * Copyright (C) Jean François Micouleau 1998-2001. + * Copyright (C) Jeremy Allison 2001, + * Copyright (C) Jean François Micouleau 1998-2001, + * Copyright (C) Anthony Liguori 2002, + * Copyright (C) Jim McDonough 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -6716,6 +6718,62 @@ BOOL samr_io_r_connect(char *desc, SAMR_R_CONNECT * r_u, return True; } +/******************************************************************* +reads or writes a structure. +********************************************************************/ + +BOOL samr_io_q_connect4(char *desc, SAMR_Q_CONNECT4 * q_u, + prs_struct *ps, int depth) +{ + if (q_u == NULL) + return False; + + prs_debug(ps, depth, desc, "samr_io_q_connect4"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("ptr_srv_name", ps, depth, &q_u->ptr_srv_name)) + return False; + if(!smb_io_unistr2("", &q_u->uni_srv_name, q_u->ptr_srv_name, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + if(!prs_uint32("unk_0", ps, depth, &q_u->unk_0)) + return False; + if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) + return False; + + return True; +} + +/******************************************************************* +reads or writes a structure. +********************************************************************/ + +BOOL samr_io_r_connect4(char *desc, SAMR_R_CONNECT4 * r_u, + prs_struct *ps, int depth) +{ + if (r_u == NULL) + return False; + + prs_debug(ps, depth, desc, "samr_io_r_connect4"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("connect_pol", &r_u->connect_pol, ps, depth)) + return False; + + if(!prs_ntstatus("status", ps, depth, &r_u->status)) + return False; + + return True; +} + /******************************************************************* inits a SAMR_Q_CONNECT_ANON structure. ********************************************************************/ diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c index f002a7d1c92..bc3b8970d6e 100644 --- a/source3/rpc_server/srv_samr.c +++ b/source3/rpc_server/srv_samr.c @@ -3,9 +3,11 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Marc Jacobsen 1999. - * Copyright (C) Jean François Micouleau 1998-2001. + * Copyright (C) Paul Ashton 1997, + * Copyright (C) Marc Jacobsen 1999, + * Copyright (C) Jean François Micouleau 1998-2001, + * Copyright (C) Anthony Liguori 2002, + * Copyright (C) Jim McDonough 2002. * * Split into interface and implementation modules by, * @@ -652,6 +654,37 @@ static BOOL api_samr_connect(pipes_struct *p) return True; } +/******************************************************************* + api_samr_connect4 + ********************************************************************/ + +static BOOL api_samr_connect4(pipes_struct *p) +{ + SAMR_Q_CONNECT4 q_u; + SAMR_R_CONNECT4 r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + /* grab the samr open policy */ + if(!samr_io_q_connect4("", &q_u, data, 0)) { + DEBUG(0,("api_samr_connect4: unable to unmarshall SAMR_Q_CONNECT4.\n")); + return False; + } + + r_u.status = _samr_connect4(p, &q_u, &r_u); + + /* store the response in the SMB stream */ + if(!samr_io_r_connect4("", &r_u, rdata, 0)) { + DEBUG(0,("api_samr_connect4: unable to marshall SAMR_R_CONNECT4.\n")); + return False; + } + + return True; +} + /********************************************************************** api_samr_lookup_domain **********************************************************************/ @@ -1465,6 +1498,7 @@ static struct api_struct api_samr_cmds [] = {"SAMR_GET_USRDOM_PWINFO" , SAMR_GET_USRDOM_PWINFO, api_samr_get_usrdom_pwinfo}, {"SAMR_UNKNOWN_2E" , SAMR_UNKNOWN_2E , api_samr_unknown_2e }, {"SAMR_SET_DOMAIN_INFO" , SAMR_SET_DOMAIN_INFO , api_samr_set_dom_info }, + {"SAMR_CONNECT4" , SAMR_CONNECT4 , api_samr_connect4 }, {NULL , 0 , NULL } }; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 2a7a5518cdd..f427eb70462 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -3,10 +3,12 @@ * RPC Pipe client / server routines * Copyright (C) Andrew Tridgell 1992-1997, * Copyright (C) Luke Kenneth Casson Leighton 1996-1997, - * Copyright (C) Paul Ashton 1997. - * Copyright (C) Marc Jacobsen 1999. - * Copyright (C) Jeremy Allison 2001-2002. - * Copyright (C) Jean François Micouleau 1998-2001. + * Copyright (C) Paul Ashton 1997, + * Copyright (C) Marc Jacobsen 1999, + * Copyright (C) Jeremy Allison 2001-2002, + * Copyright (C) Jean François Micouleau 1998-2001, + * Copyright (C) Anthony Liguori 2002, + * Copyright (C) Jim McDonough 2002. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -2449,6 +2451,56 @@ NTSTATUS _samr_connect(pipes_struct *p, SAMR_Q_CONNECT *q_u, SAMR_R_CONNECT *r_u return r_u->status; } +/******************************************************************* + samr_connect4 + ********************************************************************/ + +NTSTATUS _samr_connect4(pipes_struct *p, SAMR_Q_CONNECT4 *q_u, SAMR_R_CONNECT4 *r_u) +{ + struct samr_info *info = NULL; + SEC_DESC *psd = NULL; + uint32 acc_granted; + uint32 des_access = q_u->access_mask; + size_t sd_size; + NTSTATUS nt_status; + + + DEBUG(5,("_samr_connect4: %d\n", __LINE__)); + + /* Access check */ + + if (!pipe_access_check(p)) { + DEBUG(3, ("access denied to samr_connect4\n")); + r_u->status = NT_STATUS_ACCESS_DENIED; + return r_u->status; + } + + samr_make_sam_obj_sd(p->mem_ctx, &psd, &sd_size); + se_map_generic(&des_access, &sam_generic_mapping); + if (!NT_STATUS_IS_OK(nt_status = + access_check_samr_object(psd, p->pipe_user.nt_user_token, + des_access, &acc_granted, "_samr_connect"))) { + return nt_status; + } + + r_u->status = NT_STATUS_OK; + + /* associate the user's SID and access granted with the new handle. */ + if ((info = get_samr_info_by_sid(NULL)) == NULL) + return NT_STATUS_NO_MEMORY; + + info->acc_granted = acc_granted; + info->status = q_u->access_mask; + + /* get a (unique) handle. open a policy on it. */ + if (!create_policy_hnd(p, &r_u->connect_pol, free_samr_info, (void *)info)) + return NT_STATUS_OBJECT_NAME_NOT_FOUND; + + DEBUG(5,("_samr_connect: %d\n", __LINE__)); + + return r_u->status; +} + /********************************************************************** api_samr_lookup_domain **********************************************************************/ From 6cfff280d838c1fdd1d6b22c9638a797c40ac06d Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 6 Aug 2002 18:16:28 +0000 Subject: [PATCH 206/262] Add AD version of samlogon replies for getdc. ATM it will only function if you have an ADS DC. (This used to be commit 059a352ebb7c7286d205bc86a92f5fd26ab1ff8e) --- source3/include/ads.h | 22 ++++++ source3/include/nameserv.h | 2 + source3/nmbd/nmbd_processlogon.c | 112 ++++++++++++++++++++++++++++--- 3 files changed, 126 insertions(+), 10 deletions(-) diff --git a/source3/include/ads.h b/source3/include/ads.h index 9305b716710..7504a369b4b 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -145,3 +145,25 @@ typedef void **ADS_MODLIST; /* account types */ #define ATYPE_GROUP 0x10000000 #define ATYPE_USER 0x30000000 + +/* Mailslot or cldap getdcname response flags */ +#define ADS_PDC 0x00000001 /* DC is PDC */ +#define ADS_GC 0x00000004 /* DC is a GC of forest */ +#define ADS_LDAP 0x00000008 /* DC is an LDAP server */ +#define ADS_DS 0x00000010 /* DC supports DS */ +#define ADS_KDC 0x00000020 /* DC is running KDC */ +#define ADS_TIMESERV 0x00000040 /* DC is running time services */ +#define ADS_CLOSEST 0x00000080 /* DC is closest to client */ +#define ADS_WRITABLE 0x00000100 /* DC has writable DS */ +#define ADS_GOOD_TIMESERV 0x00000200 /* DC has hardware clock + (and running time) */ +#define ADS_NDNC 0x00000400 /* DomainName is non-domain NC serviced + by LDAP server */ +#define ADS_PINGS 0x0000FFFF /* Ping response */ +#define ADS_DNS_CONTROLLER 0x20000000 /* DomainControllerName is a DNS name*/ +#define ADS_DNS_DOMAIN 0x40000000 /* DomainName is a DNS name */ +#define ADS_DNS_FOREST 0x80000000 /* DnsForestName is a DNS name */ + +/* DomainCntrollerAddressType */ +#define ADS_INET_ADDRESS 0x00000001 +#define ADS_NETBIOS_ADDRESS 0x00000002 diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h index fefa243c3fd..14561cf44d1 100644 --- a/source3/include/nameserv.h +++ b/source3/include/nameserv.h @@ -557,6 +557,8 @@ struct packet_struct #define SAMLOGON 18 #define SAMLOGON_R 19 #define SAMLOGON_UNK_R 21 +#define SAMLOGON_AD_UNK_R 23 +#define SAMLOGON_AD_R 25 /* Ids for netbios packet types. */ diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 23e4f935cab..605cdb435b0 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -4,6 +4,8 @@ Copyright (C) Andrew Tridgell 1994-1998 Copyright (C) Luke Kenneth Casson Leighton 1994-1998 Copyright (C) Jeremy Allison 1994-1998 + Copyright (C) Jim McDonough 2002 + Copyright (C) Anthony Liguori 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -225,6 +227,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", case SAMLOGON: { char *q = buf + 2; + char *q1; fstring asccomp; q += 2; @@ -284,19 +287,108 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", /* Construct reply. */ q = outbuf; - if (SVAL(uniuser, 0) == 0) { - SSVAL(q, 0, SAMLOGON_UNK_R); /* user unknown */ - } else { - SSVAL(q, 0, SAMLOGON_R); - } - q += 2; + /* we want the simple version unless we are an ADS PDC..which means */ + /* never, at least for now */ + if ((ntversion < 11) || (SEC_ADS != lp_security()) || (ROLE_DOMAIN_PDC != lp_server_role())) { + if (SVAL(uniuser, 0) == 0) { + SSVAL(q, 0, SAMLOGON_UNK_R); /* user unknown */ + } else { + SSVAL(q, 0, SAMLOGON_R); + } - q += dos_PutUniCode(q, reply_name,sizeof(pstring), True); - q += dos_PutUniCode(q, ascuser, sizeof(pstring), True); - q += dos_PutUniCode(q, global_myworkgroup,sizeof(pstring), True); + q += 2; + + q += dos_PutUniCode(q, reply_name,sizeof(pstring), True); + q += dos_PutUniCode(q, ascuser, sizeof(pstring), True); + q += dos_PutUniCode(q, global_myworkgroup,sizeof(pstring), True); + } +#ifdef HAVE_ADS + else { + GUID domain_guid; + pstring domain; + char *component, *dc; + uint8 size; + + safe_strcpy(domain, lp_realm(), sizeof(domain)); + + if (SVAL(uniuser, 0) == 0) { + SSVAL(q, 0, SAMLOGON_AD_UNK_R); /* user unknown */ + } else { + SSVAL(q, 0, SAMLOGON_AD_R); + } + q += 2; + + SSVAL(q, 0, 0); + q += 2; + SIVAL(q, 0, ADS_PDC|ADS_GC|ADS_LDAP|ADS_DS| + ADS_KDC|ADS_TIMESERV|ADS_CLOSEST|ADS_WRITABLE); + q += 4; + + /* Push Domain GUID */ + if (False == secrets_fetch_domain_guid(domain, &domain_guid)) { + DEBUG(2, ("Could not fetch DomainGUID for %s\n", domain)); + return; + } + memcpy(q, &domain_guid, sizeof(domain_guid)); + q += sizeof(domain_guid); + + /* Push domain components */ + dc = domain; + q1 = q; + while ((component = strsep(&dc, "."))) { + size = push_ascii(&q[1], component, -1, 0); + SCVAL(q, 0, size); + q += (size + 1); + } + SCVAL(q, 0, 0); q++; + SSVAL(q, 0, 0x18c0); /* not sure what this is for, but */ + q += 2; /* it must follow the domain name. */ + + /* Push dns host name */ + size = push_ascii(&q[1], global_myname, -1, 0); + SCVAL(q, 0, size); + q += (size + 1); + SSVAL(q, 0, 0x18c0); /* not sure what this is for, but */ + q += 2; /* it must follow the domain name. */ + + /* Push NETBIOS of domain */ + size = push_ascii(&q[1], domain, -1, STR_UPPER); + SCVAL(q, 0, size); + q += (size + 1); + SCVAL(q, 0, 0); q++; /* is this a null terminator or empty field */ + /* null terminator would not be needed because size is included */ + + /* Push NETBIOS of hostname */ + size = push_ascii(&q[1], my_name, -1, 0); + SCVAL(q, 0, size); + q += (size + 1); + SCVAL(q, 0, 0); q++; /* null terminator or empty field? */ + + /* Push user account */ + size = push_ascii(&q[1], ascuser, -1, 0); + SCVAL(q, 0, size); + q += (size + 1); + + /* Push 'Default-First-Site-Name' */ + size = push_ascii(&q[1], "Default-First-Site-Name", -1, 0); + SCVAL(q, 0, size); + q += (size + 1); + + SSVAL(q, 0, 0xc000); /* unknown */ + SCVAL(q, 2, PTR_DIFF(q,q1)); + SCVAL(q, 3, 0x10); /* unknown */ + q += 4; + + SIVAL(q, 0, 0x00000002); q += 4; /* unknown */ + SIVAL(q, 0, (iface_ip(p->ip))->s_addr); q += 4; + SIVAL(q, 0, 0x00000000); q += 4; /* unknown */ + SIVAL(q, 0, 0x00000000); q += 4; /* unknown */ + } +#endif /* tell the client what version we are */ - SIVAL(q, 0, 1); /* our ntversion */ + SIVAL(q, 0, ((ntversion < 11) || (SEC_ADS != lp_security())) ? 1 : 13); + /* our ntversion */ SSVAL(q, 4, 0xffff); /* our lmnttoken */ SSVAL(q, 6, 0xffff); /* our lm20token */ q += 8; From 6f1245822e7d881b01325acf6ed57aa922071a36 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 6 Aug 2002 19:52:43 +0000 Subject: [PATCH 207/262] Ooops...forgot to put this in with the new nmbd samlogon response code. THis should fix the build. (This used to be commit ef984b99614c07ef5934849a9ad85190b636d421) --- source3/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index 74576c449a2..b7178e1907c 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -282,7 +282,8 @@ NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ - $(PROFILE_OBJ) $(LIB_OBJ) + $(PROFILE_OBJ) $(LIB_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) \ + $(GROUPDB_OBJ) WREPL_OBJ1 = wrepld/server.o wrepld/process.o wrepld/parser.o wrepld/socket.o \ wrepld/partners.o From a51897cf9b431f9638b73a51e7a13d40e4e4c505 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 7 Aug 2002 07:22:43 +0000 Subject: [PATCH 208/262] Add const to a pile of const to *DOM_SID paramaters. Andrew Bartlett (This used to be commit fd0ebf976eb6e5fc25bc75ff471c69c3f3761e32) --- source3/passdb/passdb.c | 4 ++-- source3/passdb/pdb_interface.c | 4 ++-- source3/passdb/pdb_nisplus.c | 2 +- source3/passdb/pdb_smbpasswd.c | 2 +- source3/passdb/pdb_tdb.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index f1328cbc311..c800cf5ed9c 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -799,7 +799,7 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid) Convert a SID to uid - locally. ****************************************************************************/ -BOOL local_sid_to_uid(uid_t *puid, DOM_SID *psid, enum SID_NAME_USE *name_type) +BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_type) { fstring str; SAM_ACCOUNT *sam_user = NULL; @@ -879,7 +879,7 @@ DOM_SID *local_gid_to_sid(DOM_SID *psid, gid_t gid) Convert a SID to gid - locally. ****************************************************************************/ -BOOL local_sid_to_gid(gid_t *pgid, DOM_SID *psid, enum SID_NAME_USE *name_type) +BOOL local_sid_to_gid(gid_t *pgid, const DOM_SID *psid, enum SID_NAME_USE *name_type) { fstring str; GROUP_MAP map; diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index daa3222c5a0..f311223d772 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -123,7 +123,7 @@ static BOOL context_getsampwnam(struct pdb_context *context, SAM_ACCOUNT *sam_ac return False; } -static BOOL context_getsampwsid(struct pdb_context *context, SAM_ACCOUNT *sam_acct, DOM_SID *sid) +static BOOL context_getsampwsid(struct pdb_context *context, SAM_ACCOUNT *sam_acct, const DOM_SID *sid) { struct pdb_methods *curmethods; if ((!context)) { @@ -434,7 +434,7 @@ BOOL pdb_getsampwnam(SAM_ACCOUNT *sam_acct, const char *username) return pdb_context->pdb_getsampwnam(pdb_context, sam_acct, username); } -BOOL pdb_getsampwsid(SAM_ACCOUNT *sam_acct, DOM_SID *sid) +BOOL pdb_getsampwsid(SAM_ACCOUNT *sam_acct, const DOM_SID *sid) { struct pdb_context *pdb_context = pdb_get_static_context(False); diff --git a/source3/passdb/pdb_nisplus.c b/source3/passdb/pdb_nisplus.c index d6c0bcb6721..2d37c3b8fbb 100644 --- a/source3/passdb/pdb_nisplus.c +++ b/source3/passdb/pdb_nisplus.c @@ -1032,7 +1032,7 @@ BOOL pdb_getsampwnam(SAM_ACCOUNT * user, const char *sname) Routine to search the nisplus passwd file for an entry matching the username *************************************************************************/ -BOOL pdb_getsampwsid(SAM_ACCOUNT * user, DOM_SID *sid) +BOOL pdb_getsampwsid(SAM_ACCOUNT * user, const DOM_SID *sid) { uint32 rid; if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 8c7ba364b8a..a5af0a786e1 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1417,7 +1417,7 @@ static BOOL smbpasswd_getsampwrid(struct pdb_methods *my_methods, SAM_ACCOUNT *s return True; } -static BOOL smbpasswd_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid) +static BOOL smbpasswd_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, const DOM_SID *sid) { uint32 rid; if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 17b44026446..27453fc1af7 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -669,7 +669,7 @@ static BOOL tdbsam_getsampwrid (struct pdb_methods *my_methods, SAM_ACCOUNT *use return tdbsam_getsampwnam (my_methods, user, name); } -static BOOL tdbsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid) +static BOOL tdbsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, const DOM_SID *sid) { uint32 rid; if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid)) From 39d575d68e57d7e874b30fa1bceb1db7e1a228cb Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 7 Aug 2002 07:28:24 +0000 Subject: [PATCH 209/262] Add some more const :-) This also makes it a easier to see which paramaters are 'in', and which are 'out'. Andrew Bartlett (This used to be commit 122cf648d7f364c68ecb7a576a42e94a954e9e56) --- source3/nsswitch/wb_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c index bcb339864ae..9ac1515d7d3 100644 --- a/source3/nsswitch/wb_client.c +++ b/source3/nsswitch/wb_client.c @@ -65,7 +65,7 @@ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid, /* Call winbindd to convert sid to name */ -BOOL winbind_lookup_sid(DOM_SID *sid, +BOOL winbind_lookup_sid(const DOM_SID *sid, fstring dom_name, fstring name, enum SID_NAME_USE *name_type) { @@ -102,7 +102,7 @@ BOOL winbind_lookup_sid(DOM_SID *sid, /* Call winbindd to convert SID to uid */ -BOOL winbind_sid_to_uid(uid_t *puid, DOM_SID *sid) +BOOL winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid) { struct winbindd_request request; struct winbindd_response response; @@ -168,7 +168,7 @@ BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid) /* Call winbindd to convert SID to gid */ -BOOL winbind_sid_to_gid(gid_t *pgid, DOM_SID *sid) +BOOL winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid) { struct winbindd_request request; struct winbindd_response response; From 7a0af712b0752c2cc14da98843d03683c4d7e216 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 7 Aug 2002 07:46:01 +0000 Subject: [PATCH 210/262] Add 'const' to the function prototypes to match the recent commit. (This used to be commit 0118e459b603a991f23d48cfd7f5e68c4374f950) --- source3/include/passdb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/include/passdb.h b/source3/include/passdb.h index a79c8a0289f..7a791ddac4f 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -57,7 +57,7 @@ typedef struct pdb_context BOOL (*pdb_getsampwnam)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const char *username); - BOOL (*pdb_getsampwsid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, DOM_SID *sid); + BOOL (*pdb_getsampwsid)(struct pdb_context *, SAM_ACCOUNT *sam_acct, const DOM_SID *sid); BOOL (*pdb_add_sam_account)(struct pdb_context *, SAM_ACCOUNT *sampass); @@ -88,7 +88,7 @@ typedef struct pdb_methods BOOL (*getsampwnam)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const char *username); - BOOL (*getsampwsid)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, DOM_SID *Sid); + BOOL (*getsampwsid)(struct pdb_methods *, SAM_ACCOUNT *sam_acct, const DOM_SID *Sid); BOOL (*add_sam_account)(struct pdb_methods *, SAM_ACCOUNT *sampass); From ab0ca0f0b2f58cd1e37a3ec12113bb83e211ef71 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 7 Aug 2002 09:51:59 +0000 Subject: [PATCH 211/262] Patch from Steve Langasek to split up our -l dependencies. This benifits packagers (like debian) becouse then our client code won't have references to 'server only' libraries. (In particular, it removes the client dependency on CUPS, which was raised in a debian bug report). Andrew Bartlett (This used to be commit d5f2e33b34fe0e67153894b6bf582b7eaca40e7f) --- source3/Makefile.in | 10 +- source3/configure | 1650 +++++++++++++++++++++--------------------- source3/configure.in | 24 +- 3 files changed, 848 insertions(+), 836 deletions(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index b7178e1907c..aeb4ac1ce38 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -22,6 +22,10 @@ DYNEXP=@DYNEXP@ TERMLDFLAGS=@TERMLDFLAGS@ TERMLIBS=@TERMLIBS@ +PRINTLIBS=@PRINTLIBS@ + +SMBDLIBS=$(PRINTLIBS) @SMBDLIBS@ + LINK=$(CC) $(FLAGS) $(LDFLAGS) INSTALLCMD=@INSTALL@ @@ -609,7 +613,7 @@ bin/.dummy: bin/smbd: $(SMBD_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(SMBDLIBS) $(LIBS) bin/nmbd: $(NMBD_OBJ) bin/.dummy @echo Linking $@ @@ -621,7 +625,7 @@ bin/wrepld: $(WREPL_OBJ) bin/.dummy bin/swat: $(SWAT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINTLIBS) $(LIBS) bin/rpcclient: $(RPCCLIENT_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ @@ -661,7 +665,7 @@ bin/testparm: $(TESTPARM_OBJ) bin/.dummy bin/testprns: $(TESTPRNS_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(TESTPRNS_OBJ) $(LDFLAGS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(TESTPRNS_OBJ) $(LDFLAGS) $(PRINTLIBS) $(LIBS) bin/smbstatus: $(STATUS_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ diff --git a/source3/configure b/source3/configure index 69fc5fc1e3d..d18bd96186e 100755 --- a/source3/configure +++ b/source3/configure @@ -757,6 +757,8 @@ fi + + @@ -813,7 +815,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:817: checking for $ac_word" >&5 +echo "configure:819: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -843,7 +845,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:847: checking for $ac_word" >&5 +echo "configure:849: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -894,7 +896,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:898: checking for $ac_word" >&5 +echo "configure:900: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -926,7 +928,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -937,12 +939,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 941 "configure" +#line 943 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -968,12 +970,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:977: checking whether we are using GNU C" >&5 +echo "configure:979: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -982,7 +984,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1001,7 +1003,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1007: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1063,7 +1065,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1067: checking for a BSD compatible install" >&5 +echo "configure:1069: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1115,12 +1117,12 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1124: checking for $ac_word" >&5 +echo "configure:1126: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1152,7 +1154,7 @@ done LD=ld echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1156: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1158: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1168,7 +1170,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1172: checking for POSIXized ISC" >&5 +echo "configure:1174: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1191,10 +1193,10 @@ fi if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:1195: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1197: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:1198: checking whether cc understands -c and -o together" >&5 +echo "configure:1200: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" @@ -1206,16 +1208,16 @@ else # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1249,20 +1251,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1253: checking that the C compiler understands volatile" >&5 +echo "configure:1255: checking that the C compiler understands volatile" >&5 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1311,7 +1313,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1315: checking host system type" >&5 +echo "configure:1317: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1332,7 +1334,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1336: checking target system type" >&5 +echo "configure:1338: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1350,7 +1352,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1354: checking build system type" >&5 +echo "configure:1356: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1384,7 +1386,7 @@ esac echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1388: checking config.cache system type" >&5 +echo "configure:1390: checking config.cache system type" >&5 if { test x"${ac_cv_host_system_type+set}" = x"set" && test x"$ac_cv_host_system_type" != x"$host"; } || { test x"${ac_cv_build_system_type+set}" = x"set" && @@ -1412,7 +1414,7 @@ case "$host_os" in *hpux*) echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6 -echo "configure:1416: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1418: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1573,14 +1575,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1577: checking for LFS support" >&5 +echo "configure:1579: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1592,7 +1594,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1623,14 +1625,14 @@ EOF # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1627: checking for LFS support" >&5 +echo "configure:1629: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1668,7 +1670,7 @@ main() { } EOF -if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1701,14 +1703,14 @@ EOF *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1705: checking for LFS support" >&5 +echo "configure:1707: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then GLIBC_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1720,7 +1722,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then GLIBC_LFS_SUPPORT=yes else @@ -1750,21 +1752,21 @@ EOF esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1754: checking for inline" >&5 +echo "configure:1756: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1790,7 +1792,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1794: checking how to run the C preprocessor" >&5 +echo "configure:1796: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1805,13 +1807,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1822,13 +1824,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1839,13 +1841,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1870,12 +1872,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1874: checking for ANSI C header files" >&5 +echo "configure:1876: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1883,7 +1885,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1900,7 +1902,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1918,7 +1920,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1939,7 +1941,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1950,7 +1952,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1978,12 +1980,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1982: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1984: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1991,7 +1993,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2016,7 +2018,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2020: checking for opendir in -ldir" >&5 +echo "configure:2022: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2024,7 +2026,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2057,7 +2059,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2061: checking for opendir in -lx" >&5 +echo "configure:2063: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2065,7 +2067,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2099,12 +2101,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2103: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2105: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2113,7 +2115,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2134,12 +2136,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2138: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2140: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2155,7 +2157,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2179,17 +2181,17 @@ for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2183: checking for $ac_hdr" >&5 +echo "configure:2185: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2219,17 +2221,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2223: checking for $ac_hdr" >&5 +echo "configure:2225: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2259,17 +2261,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2263: checking for $ac_hdr" >&5 +echo "configure:2265: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2299,17 +2301,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2303: checking for $ac_hdr" >&5 +echo "configure:2305: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2339,17 +2341,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2343: checking for $ac_hdr" >&5 +echo "configure:2345: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2379,17 +2381,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2383: checking for $ac_hdr" >&5 +echo "configure:2385: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2419,17 +2421,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2423: checking for $ac_hdr" >&5 +echo "configure:2425: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2459,17 +2461,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2463: checking for $ac_hdr" >&5 +echo "configure:2465: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2503,14 +2505,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2532,17 +2534,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2536: checking for $ac_hdr" >&5 +echo "configure:2538: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2572,17 +2574,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2576: checking for $ac_hdr" >&5 +echo "configure:2578: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2612,17 +2614,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2616: checking for $ac_hdr" >&5 +echo "configure:2618: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2652,17 +2654,17 @@ for ac_hdr in sys/capability.h syscall.h sys/syscall.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2656: checking for $ac_hdr" >&5 +echo "configure:2658: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2692,17 +2694,17 @@ for ac_hdr in sys/acl.h sys/cdefs.h glob.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2696: checking for $ac_hdr" >&5 +echo "configure:2698: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2734,17 +2736,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2738: checking for $ac_hdr" >&5 +echo "configure:2740: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2776,17 +2778,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2780: checking for $ac_hdr" >&5 +echo "configure:2782: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2818,17 +2820,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2822: checking for $ac_hdr" >&5 +echo "configure:2824: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2856,7 +2858,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2860: checking size of int" >&5 +echo "configure:2862: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2864,19 +2866,18 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < -#include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF -if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2896,7 +2897,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2900: checking size of long" >&5 +echo "configure:2901: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2904,16 +2905,15 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < -#include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2947,16 +2947,15 @@ else #line 2948 "configure" #include "confdefs.h" #include -#include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF -if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2977,12 +2976,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2981: checking for working const" >&5 +echo "configure:2980: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3052,21 +3051,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3056: checking for inline" >&5 +echo "configure:3055: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3092,14 +3091,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3096: checking whether byte ordering is bigendian" >&5 +echo "configure:3095: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3110,11 +3109,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3125,7 +3124,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3145,7 +3144,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3182,14 +3181,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3186: checking whether char is unsigned" >&5 +echo "configure:3185: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3246,12 +3245,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3250: checking return type of signal handlers" >&5 +echo "configure:3249: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3268,7 +3267,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3287,12 +3286,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3291: checking for uid_t in sys/types.h" >&5 +echo "configure:3290: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3321,12 +3320,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3325: checking for mode_t" >&5 +echo "configure:3324: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3354,12 +3353,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3358: checking for off_t" >&5 +echo "configure:3357: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3387,12 +3386,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3391: checking for size_t" >&5 +echo "configure:3390: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3420,12 +3419,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3424: checking for pid_t" >&5 +echo "configure:3423: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3453,12 +3452,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3457: checking for st_rdev in struct stat" >&5 +echo "configure:3456: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3466,7 +3465,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3487,12 +3486,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3491: checking for d_off in dirent" >&5 +echo "configure:3490: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3502,7 +3501,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3523,12 +3522,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3527: checking for ino_t" >&5 +echo "configure:3526: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3556,12 +3555,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3560: checking for loff_t" >&5 +echo "configure:3559: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3589,12 +3588,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3593: checking for offset_t" >&5 +echo "configure:3592: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3622,12 +3621,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3626: checking for ssize_t" >&5 +echo "configure:3625: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3655,12 +3654,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3659: checking for wchar_t" >&5 +echo "configure:3658: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3702,7 +3701,7 @@ if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3706: checking for $ac_word" >&5 +echo "configure:3705: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3742,7 +3741,7 @@ EOF CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" - LIBS="$LIBS `$CUPS_CONFIG --libs`" + PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`" fi fi @@ -3751,12 +3750,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3755: checking for $ac_func" >&5 +echo "configure:3754: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3805,7 +3804,7 @@ done if test x"$ac_cv_func_dlopen" = x"no"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3809: checking for dlopen in -ldl" >&5 +echo "configure:3808: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3813,7 +3812,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3839,7 +3838,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -ldl"; + SMBDLIBS="$SMBDLIBS -ldl"; cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF @@ -3854,13 +3853,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3858: checking for immediate structures" >&5 +echo "configure:3857: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3878,7 +3877,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3901,13 +3900,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3905: checking for unix domain sockets" >&5 +echo "configure:3904: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3922,7 +3921,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3944,13 +3943,13 @@ fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3948: checking for socklen_t type" >&5 +echo "configure:3947: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3963,7 +3962,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3984,13 +3983,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3988: checking for sig_atomic_t type" >&5 +echo "configure:3987: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4003,7 +4002,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -4026,20 +4025,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4030: checking for errno declaration" >&5 +echo "configure:4029: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -4061,20 +4060,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4065: checking for setresuid declaration" >&5 +echo "configure:4064: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -4096,20 +4095,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4100: checking for setresgid declaration" >&5 +echo "configure:4099: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -4131,20 +4130,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4135: checking for asprintf declaration" >&5 +echo "configure:4134: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4166,20 +4165,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4170: checking for vasprintf declaration" >&5 +echo "configure:4169: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4201,20 +4200,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4205: checking for vsnprintf declaration" >&5 +echo "configure:4204: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4236,20 +4235,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4240: checking for snprintf declaration" >&5 +echo "configure:4239: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4273,7 +4272,7 @@ EOF # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4277: checking for real setresuid" >&5 +echo "configure:4276: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4282,12 +4281,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -4312,7 +4311,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4316: checking for real setresgid" >&5 +echo "configure:4315: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4321,13 +4320,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresgid=yes else @@ -4350,7 +4349,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4354: checking for 8-bit clean memcmp" >&5 +echo "configure:4353: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4358,7 +4357,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4391,12 +4390,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4395: checking for $ac_func" >&5 +echo "configure:4394: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4445,7 +4444,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4449: checking for crypt in -lcrypt" >&5 +echo "configure:4448: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4453,7 +4452,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4479,7 +4478,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lcrypt"; + SMBDLIBS="$SMBDLIBS -lcrypt"; cat >> confdefs.h <<\EOF #define HAVE_CRYPT 1 EOF @@ -4497,7 +4496,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4501: checking whether to use readline" >&5 +echo "configure:4500: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4509,17 +4508,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4513: checking for $ac_hdr" >&5 +echo "configure:4512: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4549,17 +4548,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4553: checking for $ac_hdr" >&5 +echo "configure:4552: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4590,17 +4589,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4594: checking for $ac_hdr" >&5 +echo "configure:4593: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4623,7 +4622,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4627: checking for tgetent in -l${termlib}" >&5 +echo "configure:4626: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4631,7 +4630,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4664,7 +4663,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4668: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4667: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4672,7 +4671,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4734,17 +4733,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4738: checking for $ac_hdr" >&5 +echo "configure:4737: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4774,17 +4773,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4778: checking for $ac_hdr" >&5 +echo "configure:4777: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4815,17 +4814,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4819: checking for $ac_hdr" >&5 +echo "configure:4818: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4848,7 +4847,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4852: checking for tgetent in -l${termlib}" >&5 +echo "configure:4851: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4856,7 +4855,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4889,7 +4888,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4893: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4892: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4897,7 +4896,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4958,7 +4957,7 @@ fi # code will generate warnings on one of them unless we have a few # special cases. echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:4962: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:4961: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4966,7 +4965,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5010,12 +5009,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5014: checking for $ac_func" >&5 +echo "configure:5013: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5066,7 +5065,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5070: checking for printf in -lnsl_s" >&5 +echo "configure:5069: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5074,7 +5073,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5116,7 +5115,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5120: checking for printf in -lnsl" >&5 +echo "configure:5119: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5124,7 +5123,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5166,7 +5165,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5170: checking for connect in -lsocket" >&5 +echo "configure:5169: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5174,7 +5173,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5216,7 +5215,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5220: checking for connect in -linet" >&5 +echo "configure:5219: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5224,7 +5223,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5279,12 +5278,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5283: checking for $ac_func" >&5 +echo "configure:5282: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5333,7 +5332,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5337: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5336: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5341,7 +5340,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5382,12 +5381,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5386: checking for $ac_func" >&5 +echo "configure:5385: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5443,12 +5442,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5447: checking for $ac_func" >&5 +echo "configure:5446: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5498,12 +5497,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5502: checking for $ac_func" >&5 +echo "configure:5501: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5553,12 +5552,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5557: checking for $ac_func" >&5 +echo "configure:5556: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5608,12 +5607,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5612: checking for $ac_func" >&5 +echo "configure:5611: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5663,12 +5662,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5667: checking for $ac_func" >&5 +echo "configure:5666: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5718,12 +5717,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5722: checking for $ac_func" >&5 +echo "configure:5721: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5773,12 +5772,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5777: checking for $ac_func" >&5 +echo "configure:5776: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5828,12 +5827,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5832: checking for $ac_func" >&5 +echo "configure:5831: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5883,12 +5882,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5887: checking for $ac_func" >&5 +echo "configure:5886: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5938,12 +5937,12 @@ done for ac_func in syslog vsyslog getgrouplist do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5942: checking for $ac_func" >&5 +echo "configure:5941: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5994,12 +5993,12 @@ done for ac_func in setbuffer do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5998: checking for $ac_func" >&5 +echo "configure:5997: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6051,12 +6050,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6055: checking for $ac_func" >&5 +echo "configure:6054: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6107,12 +6106,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6111: checking for $ac_func" >&5 +echo "configure:6110: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6162,12 +6161,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6166: checking for $ac_func" >&5 +echo "configure:6165: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6217,12 +6216,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6221: checking for $ac_func" >&5 +echo "configure:6220: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6272,12 +6271,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6276: checking for $ac_func" >&5 +echo "configure:6275: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6327,12 +6326,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6331: checking for $ac_func" >&5 +echo "configure:6330: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6382,12 +6381,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6386: checking for $ac_func" >&5 +echo "configure:6385: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6437,12 +6436,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6441: checking for $ac_func" >&5 +echo "configure:6440: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6492,12 +6491,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6496: checking for $ac_func" >&5 +echo "configure:6495: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6547,12 +6546,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6551: checking for $ac_func" >&5 +echo "configure:6550: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6602,12 +6601,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6606: checking for $ac_func" >&5 +echo "configure:6605: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6657,12 +6656,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6661: checking for $ac_func" >&5 +echo "configure:6660: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6712,12 +6711,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6716: checking for $ac_func" >&5 +echo "configure:6715: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6767,12 +6766,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6771: checking for $ac_func" >&5 +echo "configure:6770: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6822,12 +6821,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6826: checking for $ac_func" >&5 +echo "configure:6825: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6881,9 +6880,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6885: checking for stat64 in " >&5 +echo "configure:6884: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6914,9 +6913,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6918: checking for lstat64 in " >&5 +echo "configure:6917: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6947,9 +6946,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6951: checking for fstat64 in " >&5 +echo "configure:6950: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6981,7 +6980,7 @@ fi ##################################### # we might need the resolv library on some systems echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:6985: checking for dn_expand in -lresolv" >&5 +echo "configure:6984: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6989,7 +6988,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7038,12 +7037,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7042: checking for $ac_func" >&5 +echo "configure:7041: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7091,7 +7090,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7095: checking for putprpwnam in -lsecurity" >&5 +echo "configure:7094: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7099,7 +7098,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7140,12 +7139,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7144: checking for $ac_func" >&5 +echo "configure:7143: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7199,12 +7198,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7203: checking for $ac_func" >&5 +echo "configure:7202: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7252,7 +7251,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7256: checking for putprpwnam in -lsec" >&5 +echo "configure:7255: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7260,7 +7259,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7301,12 +7300,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7305: checking for $ac_func" >&5 +echo "configure:7304: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7361,12 +7360,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7365: checking for $ac_func" >&5 +echo "configure:7364: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7414,7 +7413,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7418: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7417: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7422,7 +7421,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7463,12 +7462,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7467: checking for $ac_func" >&5 +echo "configure:7466: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7522,12 +7521,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7526: checking for $ac_func" >&5 +echo "configure:7525: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7575,7 +7574,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7579: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7578: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7583,7 +7582,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7624,12 +7623,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7628: checking for $ac_func" >&5 +echo "configure:7627: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7685,12 +7684,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7689: checking for $ac_func" >&5 +echo "configure:7688: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7738,7 +7737,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7742: checking for getspnam in -lgen" >&5 +echo "configure:7741: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7746,7 +7745,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7787,12 +7786,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7791: checking for $ac_func" >&5 +echo "configure:7790: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7847,12 +7846,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7851: checking for $ac_func" >&5 +echo "configure:7850: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7900,7 +7899,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7904: checking for getspnam in -lsecurity" >&5 +echo "configure:7903: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7908,7 +7907,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7949,12 +7948,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7953: checking for $ac_func" >&5 +echo "configure:7952: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8008,12 +8007,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8012: checking for $ac_func" >&5 +echo "configure:8011: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8061,7 +8060,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8065: checking for getspnam in -lsec" >&5 +echo "configure:8064: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8069,7 +8068,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8110,12 +8109,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8114: checking for $ac_func" >&5 +echo "configure:8113: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8170,12 +8169,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8174: checking for $ac_func" >&5 +echo "configure:8173: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8223,7 +8222,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8227: checking for bigcrypt in -lsecurity" >&5 +echo "configure:8226: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8231,7 +8230,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8272,12 +8271,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8276: checking for $ac_func" >&5 +echo "configure:8275: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8331,12 +8330,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8335: checking for $ac_func" >&5 +echo "configure:8334: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8384,7 +8383,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8388: checking for bigcrypt in -lsec" >&5 +echo "configure:8387: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8392,7 +8391,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8433,12 +8432,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8437: checking for $ac_func" >&5 +echo "configure:8436: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8493,12 +8492,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8497: checking for $ac_func" >&5 +echo "configure:8496: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8546,7 +8545,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8550: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8549: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8554,7 +8553,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8595,12 +8594,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8599: checking for $ac_func" >&5 +echo "configure:8598: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8654,12 +8653,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8658: checking for $ac_func" >&5 +echo "configure:8657: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8707,7 +8706,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8711: checking for getprpwnam in -lsec" >&5 +echo "configure:8710: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8715,7 +8714,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8756,12 +8755,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8760: checking for $ac_func" >&5 +echo "configure:8759: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8828,7 +8827,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8832: checking ability to build shared libraries" >&5 +echo "configure:8831: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8988,7 +8987,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8992: checking for $ac_word" >&5 +echo "configure:8991: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9045,17 +9044,17 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9049: checking linker flags for shared libraries" >&5 +echo "configure:9048: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9052: checking compiler flags for position-independent code" >&5 +echo "configure:9051: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9059: checking whether building shared libraries actually works" >&5 +echo "configure:9058: checking whether building shared libraries actually works" >&5 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9086,7 +9085,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9090: checking for long long" >&5 +echo "configure:9089: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9095,12 +9094,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -9127,20 +9126,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9131: checking for LL suffix on long long integers" >&5 +echo "configure:9130: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:9144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -9162,7 +9161,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9166: checking for 64 bit off_t" >&5 +echo "configure:9165: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9171,13 +9170,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -9200,7 +9199,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9204: checking for off64_t" >&5 +echo "configure:9203: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9209,7 +9208,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -9242,7 +9241,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9246: checking for 64 bit ino_t" >&5 +echo "configure:9245: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9251,13 +9250,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -9280,7 +9279,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9284: checking for ino64_t" >&5 +echo "configure:9283: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9289,7 +9288,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -9322,7 +9321,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9326: checking for dev64_t" >&5 +echo "configure:9325: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9331,7 +9330,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9364,13 +9363,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9368: checking for struct dirent64" >&5 +echo "configure:9367: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9403,7 +9402,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9407: checking for major macro" >&5 +echo "configure:9406: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9412,7 +9411,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9444,7 +9443,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9448: checking for minor macro" >&5 +echo "configure:9447: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9453,7 +9452,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9485,7 +9484,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9489: checking for unsigned char" >&5 +echo "configure:9488: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9494,12 +9493,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -9522,13 +9521,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9526: checking for sin_len in sock" >&5 +echo "configure:9525: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9537,7 +9536,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9558,13 +9557,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9562: checking whether seekdir returns void" >&5 +echo "configure:9561: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9573,7 +9572,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9594,20 +9593,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9598: checking for __FILE__ macro" >&5 +echo "configure:9597: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9628,20 +9627,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9632: checking for __FUNCTION__ macro" >&5 +echo "configure:9631: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9662,7 +9661,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9666: checking if gettimeofday takes tz argument" >&5 +echo "configure:9665: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9671,14 +9670,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -9701,13 +9700,13 @@ EOF fi echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9705: checking for __va_copy" >&5 +echo "configure:9704: checking for __va_copy" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < va_list ap1,ap2; @@ -9715,7 +9714,7 @@ int main() { __va_copy(ap1,ap2); ; return 0; } EOF -if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_VA_COPY=yes else @@ -9736,7 +9735,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9740: checking for C99 vsnprintf" >&5 +echo "configure:9739: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9745,7 +9744,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9772,7 +9771,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9795,7 +9794,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9799: checking for broken readdir" >&5 +echo "configure:9798: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9804,7 +9803,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9812,7 +9811,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -9835,13 +9834,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9839: checking for utimbuf" >&5 +echo "configure:9838: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9849,7 +9848,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9873,12 +9872,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9877: checking for $ac_func" >&5 +echo "configure:9876: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9927,13 +9926,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9931: checking for ut_name in utmp" >&5 +echo "configure:9930: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9941,7 +9940,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9962,13 +9961,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9966: checking for ut_user in utmp" >&5 +echo "configure:9965: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9976,7 +9975,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9997,13 +9996,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:10001: checking for ut_id in utmp" >&5 +echo "configure:10000: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10011,7 +10010,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -10032,13 +10031,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10036: checking for ut_host in utmp" >&5 +echo "configure:10035: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10046,7 +10045,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -10067,13 +10066,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10071: checking for ut_time in utmp" >&5 +echo "configure:10070: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10081,7 +10080,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:10085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -10102,13 +10101,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10106: checking for ut_tv in utmp" >&5 +echo "configure:10105: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10116,7 +10115,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:10120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -10137,13 +10136,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10141: checking for ut_type in utmp" >&5 +echo "configure:10140: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10151,7 +10150,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:10155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -10172,13 +10171,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10176: checking for ut_pid in utmp" >&5 +echo "configure:10175: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10186,7 +10185,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:10190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -10207,13 +10206,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10211: checking for ut_exit in utmp" >&5 +echo "configure:10210: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10221,7 +10220,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:10225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -10242,13 +10241,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10246: checking for ut_addr in utmp" >&5 +echo "configure:10245: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10256,7 +10255,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:10260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -10278,13 +10277,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10282: checking whether pututline returns pointer" >&5 +echo "configure:10281: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10292,7 +10291,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:10296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -10314,13 +10313,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10318: checking for ut_syslen in utmpx" >&5 +echo "configure:10317: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10328,7 +10327,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10352,7 +10351,7 @@ fi ################################################# # check for libiconv support echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10356: checking whether to use libiconv" >&5 +echo "configure:10355: checking whether to use libiconv" >&5 # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" @@ -10365,7 +10364,7 @@ if test "${with_libiconv+set}" = set; then CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10369: checking for iconv_open in -liconv" >&5 +echo "configure:10368: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10373,7 +10372,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10427,7 +10426,7 @@ fi ############ # check for iconv in libc echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10431: checking for working iconv" >&5 +echo "configure:10430: checking for working iconv" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10436,7 +10435,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else cat > conftest.$ac_ext < @@ -10447,7 +10446,7 @@ main() { } EOF -if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NATIVE_ICONV=yes else @@ -10471,7 +10470,7 @@ fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10475: checking for Linux kernel oplocks" >&5 +echo "configure:10474: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10480,7 +10479,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10494,7 +10493,7 @@ main() { } EOF -if { (eval echo configure:10498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10517,7 +10516,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10521: checking for kernel change notify support" >&5 +echo "configure:10520: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10526,7 +10525,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10540,7 +10539,7 @@ main() { } EOF -if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10563,7 +10562,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10567: checking for kernel share modes" >&5 +echo "configure:10566: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10572,7 +10571,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10588,7 +10587,7 @@ main() { } EOF -if { (eval echo configure:10592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10614,13 +10613,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10618: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10617: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10628,7 +10627,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:10632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10649,7 +10648,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10653: checking for irix specific capabilities" >&5 +echo "configure:10652: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10658,7 +10657,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10673,7 +10672,7 @@ main() { } EOF -if { (eval echo configure:10677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10701,13 +10700,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10705: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10704: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10717,7 +10716,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10738,13 +10737,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10742: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10741: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10754,7 +10753,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10775,13 +10774,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10779: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10778: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10791,7 +10790,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10812,13 +10811,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10816: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10815: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10828,7 +10827,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10850,13 +10849,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10854: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10853: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10870,7 +10869,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10891,16 +10890,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10895: checking for test routines" >&5 +echo "configure:10894: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -10914,7 +10913,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10918: checking for ftruncate extend" >&5 +echo "configure:10917: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10923,11 +10922,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -10950,7 +10949,7 @@ EOF fi echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:10954: checking for AF_LOCAL socket support" >&5 +echo "configure:10953: checking for AF_LOCAL socket support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10959,11 +10958,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_WORKING_AF_LOCAL=yes else @@ -10987,7 +10986,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10991: checking for broken getgroups" >&5 +echo "configure:10990: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10996,11 +10995,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -11023,7 +11022,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11027: checking whether getpass should be replaced" >&5 +echo "configure:11026: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11031,7 +11030,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -11067,7 +11066,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11071: checking for broken inet_ntoa" >&5 +echo "configure:11070: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11076,7 +11075,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -11090,7 +11089,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -11113,7 +11112,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11117: checking for secure mkstemp" >&5 +echo "configure:11116: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11122,7 +11121,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -11139,7 +11138,7 @@ main() { exit(0); } EOF -if { (eval echo configure:11143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -11162,7 +11161,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11166: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:11165: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11171,12 +11170,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:11180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -11199,7 +11198,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11203: checking for root" >&5 +echo "configure:11202: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11208,11 +11207,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -11240,7 +11239,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11244: checking for iface AIX" >&5 +echo "configure:11243: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11249,7 +11248,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -11281,7 +11280,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11285: checking for iface ifconf" >&5 +echo "configure:11284: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11290,7 +11289,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -11323,7 +11322,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11327: checking for iface ifreq" >&5 +echo "configure:11326: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11332,7 +11331,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -11369,7 +11368,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11373: checking for setresuid" >&5 +echo "configure:11372: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11378,7 +11377,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -11412,7 +11411,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11416: checking for setreuid" >&5 +echo "configure:11415: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11421,7 +11420,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -11454,7 +11453,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11458: checking for seteuid" >&5 +echo "configure:11457: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11463,7 +11462,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -11496,7 +11495,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11500: checking for setuidx" >&5 +echo "configure:11499: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11505,7 +11504,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -11538,7 +11537,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11542: checking for working mmap" >&5 +echo "configure:11541: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11547,11 +11546,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11574,7 +11573,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11578: checking for ftruncate needs root" >&5 +echo "configure:11577: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11583,11 +11582,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11610,7 +11609,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11614: checking for fcntl locking" >&5 +echo "configure:11613: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11619,11 +11618,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -11646,7 +11645,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11650: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11649: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11655,11 +11654,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11684,7 +11683,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11688: checking for 64 bit fcntl locking" >&5 +echo "configure:11687: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11693,7 +11692,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -11742,13 +11741,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11746: checking for st_blocks in struct stat" >&5 +echo "configure:11745: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11757,7 +11756,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11780,13 +11779,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11784: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11783: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11823,13 +11822,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11827: checking for broken nisplus include files" >&5 +echo "configure:11826: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11839,7 +11838,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11863,7 +11862,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11867: checking whether to use smbwrapper" >&5 +echo "configure:11866: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -11910,7 +11909,7 @@ fi ################################################# # check for AFS clear-text auth support echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11914: checking whether to use AFS clear-text auth" >&5 +echo "configure:11913: checking whether to use AFS clear-text auth" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -11936,7 +11935,7 @@ fi ################################################# # check for the DFS clear-text auth system echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11940: checking whether to use DFS clear-text auth" >&5 +echo "configure:11939: checking whether to use DFS clear-text auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11962,7 +11961,7 @@ fi ################################################# # see if this box has the RedHat location for kerberos echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:11966: checking for /usr/kerberos" >&5 +echo "configure:11965: checking for /usr/kerberos" >&5 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" @@ -11975,7 +11974,7 @@ fi ################################################# # check for location of Kerberos 5 install echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:11979: checking for kerberos 5 install path" >&5 +echo "configure:11978: checking for kerberos 5 install path" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -12004,17 +12003,17 @@ for ac_hdr in krb5.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12008: checking for $ac_hdr" >&5 +echo "configure:12007: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12047,17 +12046,17 @@ for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12051: checking for $ac_hdr" >&5 +echo "configure:12050: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12087,7 +12086,7 @@ done ################################################################## # we might need the k5crypto and com_err libraries on some systems echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12091: checking for _et_list in -lcom_err" >&5 +echo "configure:12090: checking for _et_list in -lcom_err" >&5 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12095,7 +12094,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12127,7 +12126,7 @@ else fi echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12131: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo "configure:12130: checking for krb5_encrypt_data in -lk5crypto" >&5 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12135,7 +12134,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12171,7 +12170,7 @@ fi # now see if we can find the krb5 libs in standard paths # or as specified above echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12175: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo "configure:12174: checking for krb5_mk_req_extended in -lkrb5" >&5 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12179,7 +12178,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12218,7 +12217,7 @@ fi ######################################################## # now see if we can find the gssapi libs in standard paths echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12222: checking for gss_display_status in -lgssapi_krb5" >&5 +echo "configure:12221: checking for gss_display_status in -lgssapi_krb5" >&5 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12226,7 +12225,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi_krb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12266,7 +12265,7 @@ fi # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12270: checking for ber_scanf in -llber" >&5 +echo "configure:12269: checking for ber_scanf in -llber" >&5 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12274,7 +12273,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12310,7 +12309,7 @@ fi # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12314: checking for ldap_domain2hostlist in -lldap" >&5 +echo "configure:12313: checking for ldap_domain2hostlist in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12318,7 +12317,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lldap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12360,12 +12359,12 @@ fi for ac_func in ldap_set_rebind_proc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12364: checking for $ac_func" >&5 +echo "configure:12363: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12413,13 +12412,13 @@ fi done echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12417: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo "configure:12416: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12428,7 +12427,7 @@ int main() { ldap_set_rebind_proc(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pam_ldap_cv_ldap_set_rebind_proc=3 else @@ -12450,7 +12449,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:12454: checking whether to use AUTOMOUNT" >&5 +echo "configure:12453: checking whether to use AUTOMOUNT" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -12475,7 +12474,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:12479: checking whether to use SMBMOUNT" >&5 +echo "configure:12478: checking whether to use SMBMOUNT" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -12512,7 +12511,7 @@ fi # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:12516: checking whether to use PAM" >&5 +echo "configure:12515: checking whether to use PAM" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -12538,7 +12537,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:12542: checking for pam_get_data in -lpam" >&5 +echo "configure:12541: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12546,7 +12545,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12584,7 +12583,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:12588: checking whether to use pam_smbpass" >&5 +echo "configure:12587: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -12622,12 +12621,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12626: checking for $ac_func" >&5 +echo "configure:12625: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12676,7 +12675,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12680: checking for crypt in -lcrypt" >&5 +echo "configure:12679: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12684,7 +12683,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12710,7 +12709,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lcrypt"; + SMBDLIBS="$SMBDLIBS -lcrypt"; cat >> confdefs.h <<\EOF #define HAVE_CRYPT 1 EOF @@ -12730,7 +12729,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:12734: checking for a crypt that needs truncated salt" >&5 +echo "configure:12733: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12739,11 +12738,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -12777,7 +12776,7 @@ fi ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:12781: checking whether to use TDB SAM database" >&5 +echo "configure:12780: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -12802,7 +12801,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:12806: checking whether to use NISPLUS SAM database" >&5 +echo "configure:12805: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -12833,7 +12832,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:12837: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12836: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -12858,7 +12857,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12862: checking whether to use syslog logging" >&5 +echo "configure:12861: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -12883,7 +12882,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12887: checking whether to use profiling" >&5 +echo "configure:12886: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12911,7 +12910,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12915: checking whether to support disk-quotas" >&5 +echo "configure:12914: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -12922,13 +12921,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12926: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12925: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12940,7 +12939,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12989,7 +12988,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12993: checking whether to support utmp accounting" >&5 +echo "configure:12992: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -13014,7 +13013,7 @@ fi ################################################# # choose native language(s) of man pages echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13018: checking chosen man pages' language(s)" >&5 +echo "configure:13017: checking chosen man pages' language(s)" >&5 # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" @@ -13045,7 +13044,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13049: checking whether to build the libsmbclient shared library" >&5 +echo "configure:13048: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -13073,14 +13072,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13077: checking how to get filesystem space usage" >&5 +echo "configure:13076: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13084: checking statvfs64 function (SVR4)" >&5 +echo "configure:13083: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13088,7 +13087,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -13135,12 +13134,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:13139: checking statvfs function (SVR4)" >&5 +echo "configure:13138: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13148,7 +13147,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -13173,7 +13172,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:13177: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:13176: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13181,7 +13180,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -13194,7 +13193,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:13198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -13221,7 +13220,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:13225: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:13224: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13229,7 +13228,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -13275,7 +13274,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:13279: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:13278: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13283,7 +13282,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -13293,7 +13292,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:13297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -13320,7 +13319,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:13324: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:13323: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13328,7 +13327,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13344,7 +13343,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:13348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -13371,7 +13370,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:13375: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:13374: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13379,7 +13378,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13399,7 +13398,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -13432,9 +13431,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:13436: checking if large file support can be enabled" >&5 +echo "configure:13435: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -13512,7 +13511,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:13516: checking whether to support ACLs" >&5 +echo "configure:13515: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -13561,11 +13560,11 @@ EOF #define HAVE_TRU64_ACLS 1 EOF - LIBS="$LIBS -lpacl" + SMBDLIBS="$SMBDLIBS -lpacl" ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13569: checking for acl_get_file in -lacl" >&5 +echo "configure:13568: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13573,7 +13572,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13599,26 +13598,21 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:13616: checking for ACL support" >&5 +echo "configure:13608: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else + acl_LIBS=$LIBS + LIBS="$LIBS -lacl" cat > conftest.$ac_ext < #include @@ -13626,7 +13620,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -13636,6 +13630,7 @@ else samba_cv_HAVE_POSIX_ACLS=no fi rm -f conftest* + LIBS=$acl_LIBS fi echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 @@ -13646,13 +13641,15 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:13650: checking for acl_get_perm_np" >&5 +echo "configure:13645: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else + acl_LIBS=$LIBS + LIBS="$LIBS -lacl" cat > conftest.$ac_ext < #include @@ -13660,7 +13657,7 @@ int main() { acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); ; return 0; } EOF -if { (eval echo configure:13664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_ACL_GET_PERM_NP=yes else @@ -13670,6 +13667,7 @@ else samba_cv_HAVE_ACL_GET_PERM_NP=no fi rm -f conftest* + LIBS=$acl_LIBS fi echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6 @@ -13707,7 +13705,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:13711: checking whether to build winbind" >&5 +echo "configure:13709: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13803,20 +13801,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:13807: checking whether struct passwd has pw_comment" >&5 +echo "configure:13805: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:13820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -13841,20 +13839,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:13845: checking whether struct passwd has pw_age" >&5 +echo "configure:13843: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:13858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -13893,7 +13891,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13897: checking for poptGetContext in -lpopt" >&5 +echo "configure:13895: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13901,7 +13899,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13936,7 +13934,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13940: checking whether to use included popt" >&5 +echo "configure:13938: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""yes" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13959,16 +13957,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13963: checking configure summary" >&5 +echo "configure:13961: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -14139,6 +14137,8 @@ s%@POBAD_CC@%$POBAD_CC%g s%@SHLIBEXT@%$SHLIBEXT%g s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g +s%@SMBDLIBS@%$SMBDLIBS%g +s%@PRINTLIBS@%$PRINTLIBS%g s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g diff --git a/source3/configure.in b/source3/configure.in index db34c266c58..f9720fc28b8 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -147,6 +147,8 @@ AC_SUBST(POBAD_CC) AC_SUBST(SHLIBEXT) AC_SUBST(LIBSMBCLIENT_SHARED) AC_SUBST(LIBSMBCLIENT) +AC_SUBST(SMBDLIBS) +AC_SUBST(PRINTLIBS) # compile with optimization and without debugging by default CFLAGS="-O ${CFLAGS}" @@ -496,7 +498,7 @@ if test x$enable_cups != xno; then AC_DEFINE(HAVE_CUPS) CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" - LIBS="$LIBS `$CUPS_CONFIG --libs`" + PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`" fi fi @@ -504,7 +506,7 @@ fi # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code AC_CHECK_FUNCS(dlopen) if test x"$ac_cv_func_dlopen" = x"no"; then - AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"; + AC_CHECK_LIB(dl, dlopen, [SMBDLIBS="$SMBDLIBS -ldl"; AC_DEFINE(HAVE_DLOPEN)]) fi # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then @@ -611,7 +613,7 @@ AC_FUNC_MEMCMP # test for where we get crypt() from AC_CHECK_FUNCS(crypt) if test x"$ac_cv_func_crypt" = x"no"; then - AC_CHECK_LIB(crypt, crypt, [LIBS="$LIBS -lcrypt"; + AC_CHECK_LIB(crypt, crypt, [SMBDLIBS="$SMBDLIBS -lcrypt"; AC_DEFINE(HAVE_CRYPT)]) fi @@ -2107,7 +2109,7 @@ AC_ARG_WITH(pam_smbpass, if test $with_pam_for_crypt = no; then AC_CHECK_FUNCS(crypt) if test x"$ac_cv_func_crypt" = x"no"; then - AC_CHECK_LIB(crypt, crypt, [LIBS="$LIBS -lcrypt"; + AC_CHECK_LIB(crypt, crypt, [SMBDLIBS="$SMBDLIBS -lcrypt"; AC_DEFINE(HAVE_CRYPT)]) fi fi @@ -2600,23 +2602,29 @@ AC_ARG_WITH(acl-support, *osf*) AC_MSG_RESULT(Using Tru64 ACLs) AC_DEFINE(HAVE_TRU64_ACLS) - LIBS="$LIBS -lpacl" + SMBDLIBS="$SMBDLIBS -lpacl" ;; *) - AC_CHECK_LIB(acl,acl_get_file) + AC_CHECK_LIB(acl,acl_get_file, [SMBDLIBS="$SMBDLIBS -lacl"]) AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[ + acl_LIBS=$LIBS + LIBS="$LIBS -lacl" AC_TRY_LINK([#include #include ], [ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);], -samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no)]) +samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no) + LIBS=$acl_LIBS]) if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then AC_MSG_RESULT(Using posix ACLs) AC_DEFINE(HAVE_POSIX_ACLS) AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[ + acl_LIBS=$LIBS + LIBS="$LIBS -lacl" AC_TRY_LINK([#include #include ], [ acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);], -samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)]) +samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no) + LIBS=$acl_LIBS]) if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then AC_DEFINE(HAVE_ACL_GET_PERM_NP) fi From 16c172c3a4bf8395763844fd584c981babf7033b Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Wed, 7 Aug 2002 12:17:35 +0000 Subject: [PATCH 212/262] Hmm, had too many objects added last time in the nmbd changes. Don't need all of them. Hopefully this will fix a few builds. (This used to be commit 521eed1277956b0ebc47c3312edf57d386e026e6) --- source3/Makefile.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index aeb4ac1ce38..a19369416a1 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -286,8 +286,7 @@ NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ - $(PROFILE_OBJ) $(LIB_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) \ - $(GROUPDB_OBJ) + $(PROFILE_OBJ) $(LIB_OBJ) $(SECRETS_OBJ) WREPL_OBJ1 = wrepld/server.o wrepld/process.o wrepld/parser.o wrepld/socket.o \ wrepld/partners.o From 335aa54b466896d6623ec2e61c1ca38442cddb6f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 8 Aug 2002 04:58:19 +0000 Subject: [PATCH 213/262] Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD. (This used to be commit fe43c2ac2d2e1dd3b3a25c807d4dd379c5ac4960) --- source3/rpc_client/cli_spoolss_notify.c | 44 ++++++++++++++ source3/rpc_parse/parse_spoolss.c | 28 +++++++++ source3/rpc_server/srv_spoolss.c | 63 +++++++++++++++++++ source3/rpc_server/srv_spoolss_nt.c | 21 +++++++ source3/rpcclient/cmd_spoolss.c | 80 +++++++++++++++++++++++++ 5 files changed, 236 insertions(+) diff --git a/source3/rpc_client/cli_spoolss_notify.c b/source3/rpc_client/cli_spoolss_notify.c index 922b0fbb1da..f03046558ee 100644 --- a/source3/rpc_client/cli_spoolss_notify.c +++ b/source3/rpc_client/cli_spoolss_notify.c @@ -221,3 +221,47 @@ done: return result; } + +WERROR cli_spoolss_rffpcnex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 flags, uint32 options, + char *localmachine, uint32 printerlocal, + SPOOL_NOTIFY_OPTION *option) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_RFFPCNEX q; + SPOOL_R_RFFPCNEX r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_rffpcnex( + &q, pol, flags, options, localmachine, printerlocal, + option); + + /* Marshall data and send request */ + + if(!spoolss_io_q_rffpcnex("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_RFFPCNEX, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if(!spoolss_io_r_rffpcnex("", &r, &rbuf, 0)) + goto done; + + result = r.status; + +done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index bc1691d26ba..ab8c4e1ab6d 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -7528,3 +7528,31 @@ BOOL make_spoolss_q_deleteprinterdata(SPOOL_Q_DELETEPRINTERDATA *q_u, return True; } + +/******************************************************************* + * init a structure. + ********************************************************************/ + +BOOL make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle, + uint32 flags, uint32 options, char *localmachine, + uint32 printerlocal, SPOOL_NOTIFY_OPTION *option) +{ + memcpy(&q_u->handle, handle, sizeof(POLICY_HND)); + + q_u->flags = flags; + q_u->options = options; + + q_u->localmachine_ptr = 1; + + init_unistr2(&q_u->localmachine, localmachine, + strlen(localmachine) + 1); + + q_u->printerlocal = printerlocal; + + if (option) + q_u->option_ptr = 1; + + q_u->option = option; + + return True; +} diff --git a/source3/rpc_server/srv_spoolss.c b/source3/rpc_server/srv_spoolss.c index 6e3463e79bd..5924c5831bc 100755 --- a/source3/rpc_server/srv_spoolss.c +++ b/source3/rpc_server/srv_spoolss.c @@ -1515,6 +1515,65 @@ static BOOL api_spoolss_deleteprinterdriverex(pipes_struct *p) return True; } +#if 0 + +/**************************************************************************** +****************************************************************************/ + +static BOOL api_spoolss_replyopenprinter(pipes_struct *p) +{ + SPOOL_Q_REPLYOPENPRINTER q_u; + SPOOL_R_REPLYOPENPRINTER r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if(!spoolss_io_q_replyopenprinter("", &q_u, data, 0)) { + DEBUG(0,("spoolss_io_q_replyopenprinter: unable to unmarshall SPOOL_Q_REPLYOPENPRINTER.\n")); + return False; + } + + r_u.status = _spoolss_replyopenprinter(p, &q_u, &r_u); + + if(!spoolss_io_r_replyopenprinter("", &r_u, rdata, 0)) { + DEBUG(0,("spoolss_io_r_replyopenprinter: unable to marshall SPOOL_R_REPLYOPENPRINTER.\n")); + return False; + } + + return True; +} + +/**************************************************************************** +****************************************************************************/ + +static BOOL api_spoolss_replycloseprinter(pipes_struct *p) +{ + SPOOL_Q_REPLYCLOSEPRINTER q_u; + SPOOL_R_REPLYCLOSEPRINTER r_u; + prs_struct *data = &p->in_data.data; + prs_struct *rdata = &p->out_data.rdata; + + ZERO_STRUCT(q_u); + ZERO_STRUCT(r_u); + + if(!spoolss_io_q_replycloseprinter("", &q_u, data, 0)) { + DEBUG(0,("spoolss_io_q_replycloseprinter: unable to unmarshall SPOOL_Q_REPLYCLOSEPRINTER.\n")); + return False; + } + + r_u.status = _spoolss_replycloseprinter(p, &q_u, &r_u); + + if(!spoolss_io_r_replycloseprinter("", &r_u, rdata, 0)) { + DEBUG(0,("spoolss_io_r_replycloseprinter: unable to marshall SPOOL_R_REPLYCLOSEPRINTER.\n")); + return False; + } + + return True; +} + +#endif /******************************************************************* \pipe\spoolss commands @@ -1573,6 +1632,10 @@ struct api_struct api_spoolss_cmds[] = {"SPOOLSS_GETPRINTPROCESSORDIRECTORY",SPOOLSS_GETPRINTPROCESSORDIRECTORY,api_spoolss_getprintprocessordirectory}, {"SPOOLSS_ADDPRINTERDRIVEREX", SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_addprinterdriverex }, {"SPOOLSS_DELETEPRINTERDRIVEREX", SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_deleteprinterdriverex }, +#if 0 + {"SPOOLSS_REPLYOPENPRINTER", SPOOLSS_REPLYOPENPRINTER, api_spoolss_replyopenprinter }, + {"SPOOLSS_REPLYCLOSEPRINTER", SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_replycloseprinter }, +#endif { NULL, 0, NULL } }; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 20a586a6fb4..558a7a47d76 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8372,3 +8372,24 @@ WERROR _spoolss_getprintprocessordirectory(pipes_struct *p, SPOOL_Q_GETPRINTPROC return result; } + +#if 0 + +WERROR _spoolss_replyopenprinter(pipes_struct *p, SPOOL_Q_REPLYOPENPRINTER *q_u, + SPOOL_R_REPLYOPENPRINTER *r_u) +{ + DEBUG(5,("_spoolss_replyopenprinter\n")); + + DEBUG(10, ("replyopenprinter for localprinter %d\n", q_u->printer)); + + return WERR_OK; +} + +WERROR _spoolss_replycloseprinter(pipes_struct *p, SPOOL_Q_REPLYCLOSEPRINTER *q_u, + SPOOL_R_REPLYCLOSEPRINTER *r_u) +{ + DEBUG(5,("_spoolss_replycloseprinter\n")); + return WERR_OK; +} + +#endif diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 47e3f123ba7..22e2db41f31 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1796,6 +1796,85 @@ done: return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; } +static NTSTATUS cmd_spoolss_rffpcnex(struct cli_state *cli, + TALLOC_CTX *mem_ctx, int argc, + char **argv) +{ + fstring servername, printername; + POLICY_HND hnd; + BOOL got_hnd = False; + WERROR result; + SPOOL_NOTIFY_OPTION option; + + if (argc != 2) { + printf("Usage: %s printername\n", argv[0]); + result = WERR_OK; + goto done; + } + + /* Open printer */ + + slprintf(servername, sizeof(fstring) - 1, "\\\\%s", cli->desthost); + strupper(servername); + + slprintf(printername, sizeof(fstring) - 1, "\\\\%s\\%s", cli->desthost, + argv[1]); + strupper(printername); + + result = cli_spoolss_open_printer_ex( + cli, mem_ctx, printername, "", MAXIMUM_ALLOWED_ACCESS, + servername, cli->user_name, &hnd); + + if (!W_ERROR_IS_OK(result)) { + printf("Error opening %s\n", argv[1]); + goto done; + } + + got_hnd = True; + + /* Create spool options */ + + ZERO_STRUCT(option); + + option.version = 2; + option.option_type_ptr = 1; + option.count = option.ctr.count = 2; + + option.ctr.type = (SPOOL_NOTIFY_OPTION_TYPE *)talloc( + mem_ctx, sizeof(SPOOL_NOTIFY_OPTION_TYPE) * 2); + + ZERO_STRUCT(option.ctr.type[0]); + option.ctr.type[0].type = PRINTER_NOTIFY_TYPE; + option.ctr.type[0].count = option.ctr.type[0].count2 = 1; + option.ctr.type[0].fields_ptr = 1; + option.ctr.type[0].fields[0] = PRINTER_NOTIFY_SERVER_NAME; + + ZERO_STRUCT(option.ctr.type[1]); + option.ctr.type[1].type = JOB_NOTIFY_TYPE; + option.ctr.type[1].count = option.ctr.type[1].count2 = 1; + option.ctr.type[1].fields_ptr = 1; + option.ctr.type[1].fields[0] = JOB_NOTIFY_PRINTER_NAME; + + /* Send rffpcnex */ + + slprintf(servername, sizeof(fstring) - 1, "\\\\%s", myhostname()); + strupper(servername); + + result = cli_spoolss_rffpcnex( + cli, mem_ctx, &hnd, 0, 0, servername, 123, &option); + + if (!W_ERROR_IS_OK(result)) { + printf("Error rffpcnex %s\n", argv[1]); + goto done; + } + +done: + if (got_hnd) + cli_spoolss_close_printer(cli, mem_ctx, &hnd); + + return W_ERROR_IS_OK(result) ? NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL; +} + /* List of commands exported by this module */ struct cmd_set spoolss_commands[] = { @@ -1824,6 +1903,7 @@ struct cmd_set spoolss_commands[] = { { "enumforms", cmd_spoolss_enum_forms, PIPE_SPOOLSS, "Enumerate forms", "" }, { "setprinter", cmd_spoolss_setprinter, PIPE_SPOOLSS, "Set printer comment", "" }, { "setprinterdata", cmd_spoolss_setprinterdata, PIPE_SPOOLSS, "Set REG_SZ printer data", "" }, + { "rffpcnex", cmd_spoolss_rffpcnex, PIPE_SPOOLSS, "Rffpcnex test", "" }, { NULL } }; From 4267fcccdab729a54de68d15f6d2fc36584e7e92 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 8 Aug 2002 06:44:03 +0000 Subject: [PATCH 214/262] Samba dependency hell claim's another victim... Back out last night's patch to to reduce -l dependencies until we can ensure that *all* configurations/platforms work... Andrew Bartlett (This used to be commit 35eefe7a19b2b684d3ca05a665e9c13e9d17acc3) --- source3/Makefile.in | 10 +- source3/configure | 1629 +++++++++++++++++++++--------------------- source3/configure.in | 24 +- 3 files changed, 824 insertions(+), 839 deletions(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index a19369416a1..22e641eb063 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -22,10 +22,6 @@ DYNEXP=@DYNEXP@ TERMLDFLAGS=@TERMLDFLAGS@ TERMLIBS=@TERMLIBS@ -PRINTLIBS=@PRINTLIBS@ - -SMBDLIBS=$(PRINTLIBS) @SMBDLIBS@ - LINK=$(CC) $(FLAGS) $(LDFLAGS) INSTALLCMD=@INSTALL@ @@ -612,7 +608,7 @@ bin/.dummy: bin/smbd: $(SMBD_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(SMBDLIBS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/nmbd: $(NMBD_OBJ) bin/.dummy @echo Linking $@ @@ -624,7 +620,7 @@ bin/wrepld: $(WREPL_OBJ) bin/.dummy bin/swat: $(SWAT_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINTLIBS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) bin/rpcclient: $(RPCCLIENT_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ @@ -664,7 +660,7 @@ bin/testparm: $(TESTPARM_OBJ) bin/.dummy bin/testprns: $(TESTPRNS_OBJ) bin/.dummy @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(TESTPRNS_OBJ) $(LDFLAGS) $(PRINTLIBS) $(LIBS) + @$(CC) $(FLAGS) -o $@ $(TESTPRNS_OBJ) $(LDFLAGS) $(LIBS) bin/smbstatus: $(STATUS_OBJ) @BUILD_POPT@ bin/.dummy @echo Linking $@ diff --git a/source3/configure b/source3/configure index d18bd96186e..06694c8e64a 100755 --- a/source3/configure +++ b/source3/configure @@ -757,8 +757,6 @@ fi - - @@ -815,7 +813,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:819: checking for $ac_word" >&5 +echo "configure:817: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -845,7 +843,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:849: checking for $ac_word" >&5 +echo "configure:847: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -896,7 +894,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:900: checking for $ac_word" >&5 +echo "configure:898: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -928,7 +926,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:932: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:930: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -939,12 +937,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 943 "configure" +#line 941 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -970,12 +968,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:972: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:979: checking whether we are using GNU C" >&5 +echo "configure:977: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -984,7 +982,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1003,7 +1001,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1007: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1005: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1065,7 +1063,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1069: checking for a BSD compatible install" >&5 +echo "configure:1067: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1122,7 +1120,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1126: checking for $ac_word" >&5 +echo "configure:1124: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1154,7 +1152,7 @@ done LD=ld echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1158: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1156: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1170,7 +1168,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1174: checking for POSIXized ISC" >&5 +echo "configure:1172: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1193,10 +1191,10 @@ fi if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:1197: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1195: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:1200: checking whether cc understands -c and -o together" >&5 +echo "configure:1198: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" @@ -1208,16 +1206,16 @@ else # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1251,20 +1249,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1255: checking that the C compiler understands volatile" >&5 +echo "configure:1253: checking that the C compiler understands volatile" >&5 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1313,7 +1311,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1317: checking host system type" >&5 +echo "configure:1315: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -1334,7 +1332,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1338: checking target system type" >&5 +echo "configure:1336: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1352,7 +1350,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1356: checking build system type" >&5 +echo "configure:1354: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1386,7 +1384,7 @@ esac echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1390: checking config.cache system type" >&5 +echo "configure:1388: checking config.cache system type" >&5 if { test x"${ac_cv_host_system_type+set}" = x"set" && test x"$ac_cv_host_system_type" != x"$host"; } || { test x"${ac_cv_build_system_type+set}" = x"set" && @@ -1414,7 +1412,7 @@ case "$host_os" in *hpux*) echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6 -echo "configure:1418: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1416: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1575,14 +1573,14 @@ EOF *sysv4*) if test $host = mips-sni-sysv4 ; then echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1579: checking for LFS support" >&5 +echo "configure:1577: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then SINIX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1594,7 +1592,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SINIX_LFS_SUPPORT=yes else @@ -1625,14 +1623,14 @@ EOF # *linux*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1629: checking for LFS support" >&5 +echo "configure:1627: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then LINUX_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1670,7 +1668,7 @@ main() { } EOF -if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then LINUX_LFS_SUPPORT=yes else @@ -1703,14 +1701,14 @@ EOF *hurd*) echo $ac_n "checking for LFS support""... $ac_c" 1>&6 -echo "configure:1707: checking for LFS support" >&5 +echo "configure:1705: checking for LFS support" >&5 old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" if test "$cross_compiling" = yes; then GLIBC_LFS_SUPPORT=cross else cat > conftest.$ac_ext < @@ -1722,7 +1720,7 @@ exit(1); #endif } EOF -if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then GLIBC_LFS_SUPPORT=yes else @@ -1752,21 +1750,21 @@ EOF esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1756: checking for inline" >&5 +echo "configure:1754: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1792,7 +1790,7 @@ EOF esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1796: checking how to run the C preprocessor" >&5 +echo "configure:1794: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1807,13 +1805,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1824,13 +1822,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1841,13 +1839,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1872,12 +1870,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1876: checking for ANSI C header files" >&5 +echo "configure:1874: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1885,7 +1883,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1902,7 +1900,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1920,7 +1918,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1941,7 +1939,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1952,7 +1950,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1980,12 +1978,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1984: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1982: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1993,7 +1991,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2018,7 +2016,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2022: checking for opendir in -ldir" >&5 +echo "configure:2020: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2026,7 +2024,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2059,7 +2057,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2063: checking for opendir in -lx" >&5 +echo "configure:2061: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2067,7 +2065,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2101,12 +2099,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2105: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2103: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2115,7 +2113,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2136,12 +2134,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2140: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2138: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2157,7 +2155,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2181,17 +2179,17 @@ for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2185: checking for $ac_hdr" >&5 +echo "configure:2183: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2221,17 +2219,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2225: checking for $ac_hdr" >&5 +echo "configure:2223: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2261,17 +2259,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2265: checking for $ac_hdr" >&5 +echo "configure:2263: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2301,17 +2299,17 @@ for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2305: checking for $ac_hdr" >&5 +echo "configure:2303: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2341,17 +2339,17 @@ for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h std do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2345: checking for $ac_hdr" >&5 +echo "configure:2343: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2381,17 +2379,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h term do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2385: checking for $ac_hdr" >&5 +echo "configure:2383: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2421,17 +2419,17 @@ for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2425: checking for $ac_hdr" >&5 +echo "configure:2423: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2461,17 +2459,17 @@ for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h dlfcn. do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2465: checking for $ac_hdr" >&5 +echo "configure:2463: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2505,14 +2503,14 @@ done case "$host_os" in *hpux*) cat > conftest.$ac_ext < int main() { struct spwd testme ; return 0; } EOF -if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_shadow_h=yes else @@ -2534,17 +2532,17 @@ for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2538: checking for $ac_hdr" >&5 +echo "configure:2536: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2574,17 +2572,17 @@ for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h sec do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2578: checking for $ac_hdr" >&5 +echo "configure:2576: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2614,17 +2612,17 @@ for ac_hdr in stropts.h poll.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2618: checking for $ac_hdr" >&5 +echo "configure:2616: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2654,17 +2652,17 @@ for ac_hdr in sys/capability.h syscall.h sys/syscall.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2658: checking for $ac_hdr" >&5 +echo "configure:2656: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2694,17 +2692,17 @@ for ac_hdr in sys/acl.h sys/cdefs.h glob.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2698: checking for $ac_hdr" >&5 +echo "configure:2696: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2736,17 +2734,17 @@ for ac_hdr in utmp.h utmpx.h lastlog.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2740: checking for $ac_hdr" >&5 +echo "configure:2738: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2778,17 +2776,17 @@ for ac_hdr in sys/fs/vx_quota.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2782: checking for $ac_hdr" >&5 +echo "configure:2780: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2820,17 +2818,17 @@ for ac_hdr in linux/xqm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2824: checking for $ac_hdr" >&5 +echo "configure:2822: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2858,7 +2856,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2862: checking size of int" >&5 +echo "configure:2860: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2866,7 +2864,7 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext < int main() @@ -2877,7 +2875,7 @@ int main() return(0); } EOF -if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2897,7 +2895,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2901: checking size of long" >&5 +echo "configure:2899: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2905,7 +2903,7 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext < int main() @@ -2916,7 +2914,7 @@ int main() return(0); } EOF -if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2936,7 +2934,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2940: checking size of short" >&5 +echo "configure:2938: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2944,7 +2942,7 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext < int main() @@ -2955,7 +2953,7 @@ int main() return(0); } EOF -if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2976,12 +2974,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2980: checking for working const" >&5 +echo "configure:2978: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3051,21 +3049,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3055: checking for inline" >&5 +echo "configure:3053: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3091,14 +3089,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3095: checking whether byte ordering is bigendian" >&5 +echo "configure:3093: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -3109,11 +3107,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -3124,7 +3122,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3144,7 +3142,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3181,14 +3179,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3185: checking whether char is unsigned" >&5 +echo "configure:3183: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3245,12 +3243,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3249: checking return type of signal handlers" >&5 +echo "configure:3247: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3267,7 +3265,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3286,12 +3284,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3290: checking for uid_t in sys/types.h" >&5 +echo "configure:3288: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3320,12 +3318,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3324: checking for mode_t" >&5 +echo "configure:3322: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3353,12 +3351,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3357: checking for off_t" >&5 +echo "configure:3355: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3386,12 +3384,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3390: checking for size_t" >&5 +echo "configure:3388: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3419,12 +3417,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3423: checking for pid_t" >&5 +echo "configure:3421: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3452,12 +3450,12 @@ EOF fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:3456: checking for st_rdev in struct stat" >&5 +echo "configure:3454: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3465,7 +3463,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:3469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -3486,12 +3484,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3490: checking for d_off in dirent" >&5 +echo "configure:3488: checking for d_off in dirent" >&5 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3501,7 +3499,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3522,12 +3520,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3526: checking for ino_t" >&5 +echo "configure:3524: checking for ino_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3555,12 +3553,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3559: checking for loff_t" >&5 +echo "configure:3557: checking for loff_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3588,12 +3586,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3592: checking for offset_t" >&5 +echo "configure:3590: checking for offset_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3621,12 +3619,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3625: checking for ssize_t" >&5 +echo "configure:3623: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3654,12 +3652,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3658: checking for wchar_t" >&5 +echo "configure:3656: checking for wchar_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3701,7 +3699,7 @@ if test x$enable_cups != xno; then # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3705: checking for $ac_word" >&5 +echo "configure:3703: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CUPS_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3741,7 +3739,7 @@ EOF CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" - PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`" + LIBS="$LIBS `$CUPS_CONFIG --libs`" fi fi @@ -3750,12 +3748,12 @@ fi for ac_func in dlopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3754: checking for $ac_func" >&5 +echo "configure:3752: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3804,7 +3802,7 @@ done if test x"$ac_cv_func_dlopen" = x"no"; then echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:3808: checking for dlopen in -ldl" >&5 +echo "configure:3806: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3812,7 +3810,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3838,7 +3836,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - SMBDLIBS="$SMBDLIBS -ldl"; + LIBS="$LIBS -ldl"; cat >> confdefs.h <<\EOF #define HAVE_DLOPEN 1 EOF @@ -3853,13 +3851,13 @@ fi ############################################ # check if the compiler can do immediate structures echo $ac_n "checking for immediate structures""... $ac_c" 1>&6 -echo "configure:3857: checking for immediate structures" >&5 +echo "configure:3855: checking for immediate structures" >&5 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3877,7 +3875,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_immediate_structures=yes else @@ -3900,13 +3898,13 @@ fi ############################################ # check for unix domain sockets echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6 -echo "configure:3904: checking for unix domain sockets" >&5 +echo "configure:3902: checking for unix domain sockets" >&5 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3921,7 +3919,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:3925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_unixsocket=yes else @@ -3943,13 +3941,13 @@ fi echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6 -echo "configure:3947: checking for socklen_t type" >&5 +echo "configure:3945: checking for socklen_t type" >&5 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -3962,7 +3960,7 @@ int main() { socklen_t i = 0 ; return 0; } EOF -if { (eval echo configure:3966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_socklen_t=yes else @@ -3983,13 +3981,13 @@ EOF fi echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 -echo "configure:3987: checking for sig_atomic_t type" >&5 +echo "configure:3985: checking for sig_atomic_t type" >&5 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4002,7 +4000,7 @@ int main() { sig_atomic_t i = 0 ; return 0; } EOF -if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_sig_atomic_t=yes else @@ -4025,20 +4023,20 @@ fi # stupid headers have the functions but no declaration. grrrr. echo $ac_n "checking for errno declaration""... $ac_c" 1>&6 -echo "configure:4029: checking for errno declaration" >&5 +echo "configure:4027: checking for errno declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)errno ; return 0; } EOF -if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_errno_decl=yes else @@ -4060,20 +4058,20 @@ EOF echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:4064: checking for setresuid declaration" >&5 +echo "configure:4062: checking for setresuid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresuid_decl=yes else @@ -4095,20 +4093,20 @@ EOF echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 -echo "configure:4099: checking for setresgid declaration" >&5 +echo "configure:4097: checking for setresgid declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)setresgid ; return 0; } EOF -if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_setresgid_decl=yes else @@ -4130,20 +4128,20 @@ EOF echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6 -echo "configure:4134: checking for asprintf declaration" >&5 +echo "configure:4132: checking for asprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)asprintf ; return 0; } EOF -if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_asprintf_decl=yes else @@ -4165,20 +4163,20 @@ EOF echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6 -echo "configure:4169: checking for vasprintf declaration" >&5 +echo "configure:4167: checking for vasprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vasprintf ; return 0; } EOF -if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vasprintf_decl=yes else @@ -4200,20 +4198,20 @@ EOF echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6 -echo "configure:4204: checking for vsnprintf declaration" >&5 +echo "configure:4202: checking for vsnprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)vsnprintf ; return 0; } EOF -if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_vsnprintf_decl=yes else @@ -4235,20 +4233,20 @@ EOF echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6 -echo "configure:4239: checking for snprintf declaration" >&5 +echo "configure:4237: checking for snprintf declaration" >&5 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { int i = (int)snprintf ; return 0; } EOF -if { (eval echo configure:4252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_snprintf_decl=yes else @@ -4272,7 +4270,7 @@ EOF # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:4276: checking for real setresuid" >&5 +echo "configure:4274: checking for real setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4281,12 +4279,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext < main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -4311,7 +4309,7 @@ fi # Do the same check for setresguid... # echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 -echo "configure:4315: checking for real setresgid" >&5 +echo "configure:4313: checking for real setresgid" >&5 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4320,13 +4318,13 @@ else samba_cv_have_setresgid=cross else cat > conftest.$ac_ext < #include main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);} EOF -if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresgid=yes else @@ -4349,7 +4347,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:4353: checking for 8-bit clean memcmp" >&5 +echo "configure:4351: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4357,7 +4355,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -4390,12 +4388,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4394: checking for $ac_func" >&5 +echo "configure:4392: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4444,7 +4442,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4448: checking for crypt in -lcrypt" >&5 +echo "configure:4446: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4452,7 +4450,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4478,7 +4476,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - SMBDLIBS="$SMBDLIBS -lcrypt"; + LIBS="$LIBS -lcrypt"; cat >> confdefs.h <<\EOF #define HAVE_CRYPT 1 EOF @@ -4496,7 +4494,7 @@ test "${with_readline+set}" != "set" && with_readline=yes # test for where we get readline() from echo $ac_n "checking whether to use readline""... $ac_c" 1>&6 -echo "configure:4500: checking whether to use readline" >&5 +echo "configure:4498: checking whether to use readline" >&5 # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" @@ -4508,17 +4506,17 @@ if test "${with_readline+set}" = set; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4512: checking for $ac_hdr" >&5 +echo "configure:4510: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4548,17 +4546,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4552: checking for $ac_hdr" >&5 +echo "configure:4550: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4589,17 +4587,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4593: checking for $ac_hdr" >&5 +echo "configure:4591: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4622,7 +4620,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4626: checking for tgetent in -l${termlib}" >&5 +echo "configure:4624: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4630,7 +4628,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4663,7 +4661,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4667: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4665: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4671,7 +4669,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4733,17 +4731,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4737: checking for $ac_hdr" >&5 +echo "configure:4735: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4773,17 +4771,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4777: checking for $ac_hdr" >&5 +echo "configure:4775: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4814,17 +4812,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4818: checking for $ac_hdr" >&5 +echo "configure:4816: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4847,7 +4845,7 @@ EOF for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6 -echo "configure:4851: checking for tgetent in -l${termlib}" >&5 +echo "configure:4849: checking for tgetent in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4855,7 +4853,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4888,7 +4886,7 @@ fi done echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6 -echo "configure:4892: checking for rl_callback_handler_install in -lreadline" >&5 +echo "configure:4890: checking for rl_callback_handler_install in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4896,7 +4894,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4957,7 +4955,7 @@ fi # code will generate warnings on one of them unless we have a few # special cases. echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:4961: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:4959: checking for rl_completion_matches in -lreadline" >&5 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4965,7 +4963,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $TERMLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5009,12 +5007,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5013: checking for $ac_func" >&5 +echo "configure:5011: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5065,7 +5063,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:5069: checking for printf in -lnsl_s" >&5 +echo "configure:5067: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5073,7 +5071,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5115,7 +5113,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:5119: checking for printf in -lnsl" >&5 +echo "configure:5117: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5123,7 +5121,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5165,7 +5163,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:5169: checking for connect in -lsocket" >&5 +echo "configure:5167: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5173,7 +5171,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5215,7 +5213,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:5219: checking for connect in -linet" >&5 +echo "configure:5217: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5223,7 +5221,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5278,12 +5276,12 @@ fi for ac_func in yp_get_default_domain do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5282: checking for $ac_func" >&5 +echo "configure:5280: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5332,7 +5330,7 @@ done if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6 -echo "configure:5336: checking for yp_get_default_domain in -lnsl" >&5 +echo "configure:5334: checking for yp_get_default_domain in -lnsl" >&5 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5340,7 +5338,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5381,12 +5379,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5385: checking for $ac_func" >&5 +echo "configure:5383: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5442,12 +5440,12 @@ fi for ac_func in dlopen dlclose dlsym dlerror waitpid getcwd strdup strndup strnlen strtoul strerror chown fchown chmod fchmod chroot link mknod mknod64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5446: checking for $ac_func" >&5 +echo "configure:5444: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5497,12 +5495,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5501: checking for $ac_func" >&5 +echo "configure:5499: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5552,12 +5550,12 @@ done for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5556: checking for $ac_func" >&5 +echo "configure:5554: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5607,12 +5605,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5611: checking for $ac_func" >&5 +echo "configure:5609: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5662,12 +5660,12 @@ done for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf realpath do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5666: checking for $ac_func" >&5 +echo "configure:5664: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5717,12 +5715,12 @@ done for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5721: checking for $ac_func" >&5 +echo "configure:5719: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5772,12 +5770,12 @@ done for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5776: checking for $ac_func" >&5 +echo "configure:5774: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5827,12 +5825,12 @@ done for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5831: checking for $ac_func" >&5 +echo "configure:5829: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5882,12 +5880,12 @@ done for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5886: checking for $ac_func" >&5 +echo "configure:5884: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5937,12 +5935,12 @@ done for ac_func in syslog vsyslog getgrouplist do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5941: checking for $ac_func" >&5 +echo "configure:5939: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5993,12 +5991,12 @@ done for ac_func in setbuffer do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5997: checking for $ac_func" >&5 +echo "configure:5995: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6050,12 +6048,12 @@ done for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6054: checking for $ac_func" >&5 +echo "configure:6052: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6106,12 +6104,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6110: checking for $ac_func" >&5 +echo "configure:6108: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6161,12 +6159,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6165: checking for $ac_func" >&5 +echo "configure:6163: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6216,12 +6214,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6220: checking for $ac_func" >&5 +echo "configure:6218: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6271,12 +6269,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6275: checking for $ac_func" >&5 +echo "configure:6273: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6326,12 +6324,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6330: checking for $ac_func" >&5 +echo "configure:6328: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6381,12 +6379,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6385: checking for $ac_func" >&5 +echo "configure:6383: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6436,12 +6434,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6440: checking for $ac_func" >&5 +echo "configure:6438: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6491,12 +6489,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6495: checking for $ac_func" >&5 +echo "configure:6493: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6546,12 +6544,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6550: checking for $ac_func" >&5 +echo "configure:6548: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6601,12 +6599,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6605: checking for $ac_func" >&5 +echo "configure:6603: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6656,12 +6654,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6660: checking for $ac_func" >&5 +echo "configure:6658: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6711,12 +6709,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6715: checking for $ac_func" >&5 +echo "configure:6713: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6766,12 +6764,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6770: checking for $ac_func" >&5 +echo "configure:6768: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6821,12 +6819,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6825: checking for $ac_func" >&5 +echo "configure:6823: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6880,9 +6878,9 @@ done if test x$ac_cv_func_stat64 = xno ; then echo $ac_n "checking for stat64 in ""... $ac_c" 1>&6 -echo "configure:6884: checking for stat64 in " >&5 +echo "configure:6882: checking for stat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_stat64=yes else @@ -6913,9 +6911,9 @@ fi if test x$ac_cv_func_lstat64 = xno ; then echo $ac_n "checking for lstat64 in ""... $ac_c" 1>&6 -echo "configure:6917: checking for lstat64 in " >&5 +echo "configure:6915: checking for lstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat64=yes else @@ -6946,9 +6944,9 @@ fi if test x$ac_cv_func_fstat64 = xno ; then echo $ac_n "checking for fstat64 in ""... $ac_c" 1>&6 -echo "configure:6950: checking for fstat64 in " >&5 +echo "configure:6948: checking for fstat64 in " >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_fstat64=yes else @@ -6980,7 +6978,7 @@ fi ##################################### # we might need the resolv library on some systems echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:6984: checking for dn_expand in -lresolv" >&5 +echo "configure:6982: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6988,7 +6986,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7037,12 +7035,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7041: checking for $ac_func" >&5 +echo "configure:7039: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7090,7 +7088,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7094: checking for putprpwnam in -lsecurity" >&5 +echo "configure:7092: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7098,7 +7096,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7139,12 +7137,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7143: checking for $ac_func" >&5 +echo "configure:7141: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7198,12 +7196,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7202: checking for $ac_func" >&5 +echo "configure:7200: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7251,7 +7249,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7255: checking for putprpwnam in -lsec" >&5 +echo "configure:7253: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7259,7 +7257,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7300,12 +7298,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7304: checking for $ac_func" >&5 +echo "configure:7302: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7360,12 +7358,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7364: checking for $ac_func" >&5 +echo "configure:7362: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7413,7 +7411,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:7417: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:7415: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7421,7 +7419,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7462,12 +7460,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7466: checking for $ac_func" >&5 +echo "configure:7464: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7521,12 +7519,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7525: checking for $ac_func" >&5 +echo "configure:7523: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7574,7 +7572,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:7578: checking for set_auth_parameters in -lsec" >&5 +echo "configure:7576: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7582,7 +7580,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7623,12 +7621,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7627: checking for $ac_func" >&5 +echo "configure:7625: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7684,12 +7682,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7688: checking for $ac_func" >&5 +echo "configure:7686: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7737,7 +7735,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:7741: checking for getspnam in -lgen" >&5 +echo "configure:7739: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7745,7 +7743,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7786,12 +7784,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7790: checking for $ac_func" >&5 +echo "configure:7788: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7846,12 +7844,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7850: checking for $ac_func" >&5 +echo "configure:7848: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7899,7 +7897,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7903: checking for getspnam in -lsecurity" >&5 +echo "configure:7901: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7907,7 +7905,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7948,12 +7946,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7952: checking for $ac_func" >&5 +echo "configure:7950: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8007,12 +8005,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8011: checking for $ac_func" >&5 +echo "configure:8009: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8060,7 +8058,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:8064: checking for getspnam in -lsec" >&5 +echo "configure:8062: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8068,7 +8066,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8109,12 +8107,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8113: checking for $ac_func" >&5 +echo "configure:8111: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8169,12 +8167,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8173: checking for $ac_func" >&5 +echo "configure:8171: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8222,7 +8220,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:8226: checking for bigcrypt in -lsecurity" >&5 +echo "configure:8224: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8230,7 +8228,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8271,12 +8269,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8275: checking for $ac_func" >&5 +echo "configure:8273: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8330,12 +8328,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8334: checking for $ac_func" >&5 +echo "configure:8332: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8383,7 +8381,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:8387: checking for bigcrypt in -lsec" >&5 +echo "configure:8385: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8391,7 +8389,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8432,12 +8430,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8436: checking for $ac_func" >&5 +echo "configure:8434: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8492,12 +8490,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8496: checking for $ac_func" >&5 +echo "configure:8494: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8545,7 +8543,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:8549: checking for getprpwnam in -lsecurity" >&5 +echo "configure:8547: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8553,7 +8551,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8594,12 +8592,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8598: checking for $ac_func" >&5 +echo "configure:8596: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8653,12 +8651,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8657: checking for $ac_func" >&5 +echo "configure:8655: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8706,7 +8704,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:8710: checking for getprpwnam in -lsec" >&5 +echo "configure:8708: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8714,7 +8712,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8755,12 +8753,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8759: checking for $ac_func" >&5 +echo "configure:8757: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8827,7 +8825,7 @@ SHLIBEXT="so" # Assume non-shared by default and override below BLDSHARED="false" echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6 -echo "configure:8831: checking ability to build shared libraries" >&5 +echo "configure:8829: checking ability to build shared libraries" >&5 # and these are for particular systems case "$host_os" in @@ -8987,7 +8985,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:8991: checking for $ac_word" >&5 +echo "configure:8989: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9044,17 +9042,17 @@ esac echo "$ac_t""$BLDSHARED" 1>&6 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6 -echo "configure:9048: checking linker flags for shared libraries" >&5 +echo "configure:9046: checking linker flags for shared libraries" >&5 echo "$ac_t""$LDSHFLAGS" 1>&6 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6 -echo "configure:9051: checking compiler flags for position-independent code" >&5 +echo "configure:9049: checking compiler flags for position-independent code" >&5 echo "$ac_t""$PICFLAGS" 1>&6 ####################################################### # test whether building a shared library actually works if test $BLDSHARED = true; then echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6 -echo "configure:9058: checking whether building shared libraries actually works" >&5 +echo "configure:9056: checking whether building shared libraries actually works" >&5 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9085,7 +9083,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:9089: checking for long long" >&5 +echo "configure:9087: checking for long long" >&5 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9094,12 +9092,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext < main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -9126,20 +9124,20 @@ fi # AIX needs this. echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6 -echo "configure:9130: checking for LL suffix on long long integers" >&5 +echo "configure:9128: checking for LL suffix on long long integers" >&5 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { long long i = 0x8000000000LL ; return 0; } EOF -if { (eval echo configure:9143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_compiler_supports_ll=yes else @@ -9161,7 +9159,7 @@ fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:9165: checking for 64 bit off_t" >&5 +echo "configure:9163: checking for 64 bit off_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9170,13 +9168,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -9199,7 +9197,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:9203: checking for off64_t" >&5 +echo "configure:9201: checking for off64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9208,7 +9206,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -9241,7 +9239,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:9245: checking for 64 bit ino_t" >&5 +echo "configure:9243: checking for 64 bit ino_t" >&5 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9250,13 +9248,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext < #include main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -9279,7 +9277,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:9283: checking for ino64_t" >&5 +echo "configure:9281: checking for ino64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9288,7 +9286,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -9321,7 +9319,7 @@ EOF fi echo $ac_n "checking for dev64_t""... $ac_c" 1>&6 -echo "configure:9325: checking for dev64_t" >&5 +echo "configure:9323: checking for dev64_t" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEV64_T'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9330,7 +9328,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEV64_T=cross else cat > conftest.$ac_ext < main() { struct stat64 st; dev64_t s; if (sizeof(dev_t) == sizeof(dev64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEV64_T=yes else @@ -9363,13 +9361,13 @@ EOF fi echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6 -echo "configure:9367: checking for struct dirent64" >&5 +echo "configure:9365: checking for struct dirent64" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STRUCT_DIRENT64=yes else @@ -9402,7 +9400,7 @@ EOF fi echo $ac_n "checking for major macro""... $ac_c" 1>&6 -echo "configure:9406: checking for major macro" >&5 +echo "configure:9404: checking for major macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MAJOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9411,7 +9409,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MAJOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = major(dev); return 0; } EOF -if { (eval echo configure:9424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MAJOR_FN=yes else @@ -9443,7 +9441,7 @@ EOF fi echo $ac_n "checking for minor macro""... $ac_c" 1>&6 -echo "configure:9447: checking for minor macro" >&5 +echo "configure:9445: checking for minor macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_DEVICE_MINOR_FN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9452,7 +9450,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_DEVICE_MINOR_FN=cross else cat > conftest.$ac_ext < main() { dev_t dev; int i = minor(dev); return 0; } EOF -if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_DEVICE_MINOR_FN=yes else @@ -9484,7 +9482,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:9488: checking for unsigned char" >&5 +echo "configure:9486: checking for unsigned char" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9493,12 +9491,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext < main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:9502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -9521,13 +9519,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:9525: checking for sin_len in sock" >&5 +echo "configure:9523: checking for sin_len in sock" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9536,7 +9534,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:9540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -9557,13 +9555,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:9561: checking whether seekdir returns void" >&5 +echo "configure:9559: checking whether seekdir returns void" >&5 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9572,7 +9570,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:9576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -9593,20 +9591,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:9597: checking for __FILE__ macro" >&5 +echo "configure:9595: checking for __FILE__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:9610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -9627,20 +9625,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:9631: checking for __FUNCTION__ macro" >&5 +echo "configure:9629: checking for __FUNCTION__ macro" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:9644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -9661,7 +9659,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:9665: checking if gettimeofday takes tz argument" >&5 +echo "configure:9663: checking if gettimeofday takes tz argument" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9670,14 +9668,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext < #include main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:9681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -9700,13 +9698,13 @@ EOF fi echo $ac_n "checking for __va_copy""... $ac_c" 1>&6 -echo "configure:9704: checking for __va_copy" >&5 +echo "configure:9702: checking for __va_copy" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_VA_COPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < va_list ap1,ap2; @@ -9714,7 +9712,7 @@ int main() { __va_copy(ap1,ap2); ; return 0; } EOF -if { (eval echo configure:9718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_VA_COPY=yes else @@ -9735,7 +9733,7 @@ EOF fi echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6 -echo "configure:9739: checking for C99 vsnprintf" >&5 +echo "configure:9737: checking for C99 vsnprintf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9744,7 +9742,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_C99_VSNPRINTF=cross else cat > conftest.$ac_ext < @@ -9771,7 +9769,7 @@ void foo(const char *format, ...) { main() { foo("hello"); } EOF -if { (eval echo configure:9775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_C99_VSNPRINTF=yes else @@ -9794,7 +9792,7 @@ EOF fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:9798: checking for broken readdir" >&5 +echo "configure:9796: checking for broken readdir" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9803,7 +9801,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext < #include @@ -9811,7 +9809,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:9815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -9834,13 +9832,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:9838: checking for utimbuf" >&5 +echo "configure:9836: checking for utimbuf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9848,7 +9846,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:9852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -9872,12 +9870,12 @@ fi for ac_func in pututline pututxline updwtmp updwtmpx getutmpx do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9876: checking for $ac_func" >&5 +echo "configure:9874: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -9926,13 +9924,13 @@ done echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6 -echo "configure:9930: checking for ut_name in utmp" >&5 +echo "configure:9928: checking for ut_name in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9940,7 +9938,7 @@ int main() { struct utmp ut; ut.ut_name[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_NAME=yes else @@ -9961,13 +9959,13 @@ EOF fi echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6 -echo "configure:9965: checking for ut_user in utmp" >&5 +echo "configure:9963: checking for ut_user in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -9975,7 +9973,7 @@ int main() { struct utmp ut; ut.ut_user[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:9979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_USER=yes else @@ -9996,13 +9994,13 @@ EOF fi echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6 -echo "configure:10000: checking for ut_id in utmp" >&5 +echo "configure:9998: checking for ut_id in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10010,7 +10008,7 @@ int main() { struct utmp ut; ut.ut_id[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ID=yes else @@ -10031,13 +10029,13 @@ EOF fi echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6 -echo "configure:10035: checking for ut_host in utmp" >&5 +echo "configure:10033: checking for ut_host in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10045,7 +10043,7 @@ int main() { struct utmp ut; ut.ut_host[0] = 'a'; ; return 0; } EOF -if { (eval echo configure:10049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_HOST=yes else @@ -10066,13 +10064,13 @@ EOF fi echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6 -echo "configure:10070: checking for ut_time in utmp" >&5 +echo "configure:10068: checking for ut_time in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10080,7 +10078,7 @@ int main() { struct utmp ut; time_t t; ut.ut_time = t; ; return 0; } EOF -if { (eval echo configure:10084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TIME=yes else @@ -10101,13 +10099,13 @@ EOF fi echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6 -echo "configure:10105: checking for ut_tv in utmp" >&5 +echo "configure:10103: checking for ut_tv in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10115,7 +10113,7 @@ int main() { struct utmp ut; struct timeval tv; ut.ut_tv = tv; ; return 0; } EOF -if { (eval echo configure:10119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TV=yes else @@ -10136,13 +10134,13 @@ EOF fi echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6 -echo "configure:10140: checking for ut_type in utmp" >&5 +echo "configure:10138: checking for ut_type in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10150,7 +10148,7 @@ int main() { struct utmp ut; ut.ut_type = 0; ; return 0; } EOF -if { (eval echo configure:10154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_TYPE=yes else @@ -10171,13 +10169,13 @@ EOF fi echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6 -echo "configure:10175: checking for ut_pid in utmp" >&5 +echo "configure:10173: checking for ut_pid in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10185,7 +10183,7 @@ int main() { struct utmp ut; ut.ut_pid = 0; ; return 0; } EOF -if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_PID=yes else @@ -10206,13 +10204,13 @@ EOF fi echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6 -echo "configure:10210: checking for ut_exit in utmp" >&5 +echo "configure:10208: checking for ut_exit in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10220,7 +10218,7 @@ int main() { struct utmp ut; ut.ut_exit.e_exit = 0; ; return 0; } EOF -if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_EXIT=yes else @@ -10241,13 +10239,13 @@ EOF fi echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6 -echo "configure:10245: checking for ut_addr in utmp" >&5 +echo "configure:10243: checking for ut_addr in utmp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10255,7 +10253,7 @@ int main() { struct utmp ut; ut.ut_addr = 0; ; return 0; } EOF -if { (eval echo configure:10259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UT_UT_ADDR=yes else @@ -10277,13 +10275,13 @@ fi if test x$ac_cv_func_pututline = xyes ; then echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6 -echo "configure:10281: checking whether pututline returns pointer" >&5 +echo "configure:10279: checking whether pututline returns pointer" >&5 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10291,7 +10289,7 @@ int main() { struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg); ; return 0; } EOF -if { (eval echo configure:10295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_PUTUTLINE_RETURNS_UTMP=yes else @@ -10313,13 +10311,13 @@ EOF fi echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6 -echo "configure:10317: checking for ut_syslen in utmpx" >&5 +echo "configure:10315: checking for ut_syslen in utmpx" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10327,7 +10325,7 @@ int main() { struct utmpx ux; ux.ut_syslen = 0; ; return 0; } EOF -if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UX_UT_SYSLEN=yes else @@ -10351,7 +10349,7 @@ fi ################################################# # check for libiconv support echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6 -echo "configure:10355: checking whether to use libiconv" >&5 +echo "configure:10353: checking whether to use libiconv" >&5 # Check whether --with-libiconv or --without-libiconv was given. if test "${with_libiconv+set}" = set; then withval="$with_libiconv" @@ -10364,7 +10362,7 @@ if test "${with_libiconv+set}" = set; then CFLAGS="$CFLAGS -I$withval/include" LDFLAGS="$LDFLAGS -L$withval/lib" echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6 -echo "configure:10368: checking for iconv_open in -liconv" >&5 +echo "configure:10366: checking for iconv_open in -liconv" >&5 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10372,7 +10370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-liconv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10426,7 +10424,7 @@ fi ############ # check for iconv in libc echo $ac_n "checking for working iconv""... $ac_c" 1>&6 -echo "configure:10430: checking for working iconv" >&5 +echo "configure:10428: checking for working iconv" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10435,7 +10433,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NATIVE_ICONV=cross else cat > conftest.$ac_ext < @@ -10446,7 +10444,7 @@ main() { } EOF -if { (eval echo configure:10450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NATIVE_ICONV=yes else @@ -10470,7 +10468,7 @@ fi echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6 -echo "configure:10474: checking for Linux kernel oplocks" >&5 +echo "configure:10472: checking for Linux kernel oplocks" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10479,7 +10477,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross else cat > conftest.$ac_ext < @@ -10493,7 +10491,7 @@ main() { } EOF -if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes else @@ -10516,7 +10514,7 @@ EOF fi echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6 -echo "configure:10520: checking for kernel change notify support" >&5 +echo "configure:10518: checking for kernel change notify support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10525,7 +10523,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross else cat > conftest.$ac_ext < @@ -10539,7 +10537,7 @@ main() { } EOF -if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes else @@ -10562,7 +10560,7 @@ EOF fi echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6 -echo "configure:10566: checking for kernel share modes" >&5 +echo "configure:10564: checking for kernel share modes" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10571,7 +10569,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_KERNEL_SHARE_MODES=cross else cat > conftest.$ac_ext < @@ -10587,7 +10585,7 @@ main() { } EOF -if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_KERNEL_SHARE_MODES=yes else @@ -10613,13 +10611,13 @@ fi echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:10617: checking for IRIX kernel oplock type definitions" >&5 +echo "configure:10615: checking for IRIX kernel oplock type definitions" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -10627,7 +10625,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:10631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes else @@ -10648,7 +10646,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:10652: checking for irix specific capabilities" >&5 +echo "configure:10650: checking for irix specific capabilities" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10657,7 +10655,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext < #include @@ -10672,7 +10670,7 @@ main() { } EOF -if { (eval echo configure:10676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -10700,13 +10698,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10704: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:10702: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10716,7 +10714,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:10720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -10737,13 +10735,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10741: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:10739: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10753,7 +10751,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:10757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -10774,13 +10772,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10778: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:10776: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10790,7 +10788,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:10794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -10811,13 +10809,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10815: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:10813: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPC_RPC_H) @@ -10827,7 +10825,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:10831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -10849,13 +10847,13 @@ fi echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:10853: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 +echo "configure:10851: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifdef HAVE_SYS_SECURITY_H @@ -10869,7 +10867,7 @@ int main() { int testvar; ; return 0; } EOF -if { (eval echo configure:10873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no else @@ -10890,16 +10888,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:10894: checking for test routines" >&5 +echo "configure:10892: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -10913,7 +10911,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:10917: checking for ftruncate extend" >&5 +echo "configure:10915: checking for ftruncate extend" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10922,11 +10920,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -10949,7 +10947,7 @@ EOF fi echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6 -echo "configure:10953: checking for AF_LOCAL socket support" >&5 +echo "configure:10951: checking for AF_LOCAL socket support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10958,11 +10956,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_WORKING_AF_LOCAL=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_WORKING_AF_LOCAL=yes else @@ -10986,7 +10984,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:10990: checking for broken getgroups" >&5 +echo "configure:10988: checking for broken getgroups" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10995,11 +10993,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -11022,7 +11020,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:11026: checking whether getpass should be replaced" >&5 +echo "configure:11024: checking whether getpass should be replaced" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11030,7 +11028,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/smbwrapper" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -11066,7 +11064,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:11070: checking for broken inet_ntoa" >&5 +echo "configure:11068: checking for broken inet_ntoa" >&5 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11075,7 +11073,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext < @@ -11089,7 +11087,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:11093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -11112,7 +11110,7 @@ EOF fi echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6 -echo "configure:11116: checking for secure mkstemp" >&5 +echo "configure:11114: checking for secure mkstemp" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11121,7 +11119,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SECURE_MKSTEMP=cross else cat > conftest.$ac_ext < #include @@ -11138,7 +11136,7 @@ main() { exit(0); } EOF -if { (eval echo configure:11142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SECURE_MKSTEMP=yes else @@ -11161,7 +11159,7 @@ EOF fi echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6 -echo "configure:11165: checking for sysconf(_SC_NGROUPS_MAX)" >&5 +echo "configure:11163: checking for sysconf(_SC_NGROUPS_MAX)" >&5 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11170,12 +11168,12 @@ if test "$cross_compiling" = yes; then samba_cv_SYSCONF_SC_NGROUPS_MAX=cross else cat > conftest.$ac_ext < main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); } EOF -if { (eval echo configure:11179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SYSCONF_SC_NGROUPS_MAX=yes else @@ -11198,7 +11196,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:11202: checking for root" >&5 +echo "configure:11200: checking for root" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11207,11 +11205,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -11239,7 +11237,7 @@ fi # look for a method of finding the list of network interfaces iface=no; echo $ac_n "checking for iface AIX""... $ac_c" 1>&6 -echo "configure:11243: checking for iface AIX" >&5 +echo "configure:11241: checking for iface AIX" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11248,7 +11246,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_AIX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_AIX=yes else @@ -11280,7 +11278,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6 -echo "configure:11284: checking for iface ifconf" >&5 +echo "configure:11282: checking for iface ifconf" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11289,7 +11287,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFCONF=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFCONF=yes else @@ -11322,7 +11320,7 @@ fi if test $iface = no; then echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6 -echo "configure:11326: checking for iface ifreq" >&5 +echo "configure:11324: checking for iface ifreq" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11331,7 +11329,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IFACE_IFREQ=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IFACE_IFREQ=yes else @@ -11368,7 +11366,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:11372: checking for setresuid" >&5 +echo "configure:11370: checking for setresuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11377,7 +11375,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -11411,7 +11409,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:11415: checking for setreuid" >&5 +echo "configure:11413: checking for setreuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11420,7 +11418,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -11453,7 +11451,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:11457: checking for seteuid" >&5 +echo "configure:11455: checking for seteuid" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11462,7 +11460,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -11495,7 +11493,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:11499: checking for setuidx" >&5 +echo "configure:11497: checking for setuidx" >&5 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11504,7 +11502,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -11537,7 +11535,7 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:11541: checking for working mmap" >&5 +echo "configure:11539: checking for working mmap" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11546,11 +11544,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_MMAP=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_MMAP=yes else @@ -11573,7 +11571,7 @@ EOF fi echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6 -echo "configure:11577: checking for ftruncate needs root" >&5 +echo "configure:11575: checking for ftruncate needs root" >&5 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11582,11 +11580,11 @@ if test "$cross_compiling" = yes; then samba_cv_FTRUNCATE_NEEDS_ROOT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_FTRUNCATE_NEEDS_ROOT=yes else @@ -11609,7 +11607,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:11613: checking for fcntl locking" >&5 +echo "configure:11611: checking for fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11618,11 +11616,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -11645,7 +11643,7 @@ EOF fi echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11649: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 +echo "configure:11647: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11654,11 +11652,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes else @@ -11683,7 +11681,7 @@ else echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:11687: checking for 64 bit fcntl locking" >&5 +echo "configure:11685: checking for 64 bit fcntl locking" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11692,7 +11690,7 @@ else samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -11741,13 +11739,13 @@ EOF fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:11745: checking for st_blocks in struct stat" >&5 +echo "configure:11743: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_STAT_ST_BLOCKS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -11756,7 +11754,7 @@ int main() { struct stat st; st.st_blocks = 0; ; return 0; } EOF -if { (eval echo configure:11760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_STAT_ST_BLOCKS=yes else @@ -11779,13 +11777,13 @@ fi case "$host_os" in *linux*) echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6 -echo "configure:11783: checking for broken RedHat 7.2 system header files" >&5 +echo "configure:11781: checking for broken RedHat 7.2 system header files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no else @@ -11822,13 +11820,13 @@ fi esac echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6 -echo "configure:11826: checking for broken nisplus include files" >&5 +echo "configure:11824: checking for broken nisplus include files" >&5 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if defined(HAVE_RPCSVC_NIS_H) @@ -11838,7 +11836,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:11842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no else @@ -11862,7 +11860,7 @@ fi ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:11866: checking whether to use smbwrapper" >&5 +echo "configure:11864: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -11909,7 +11907,7 @@ fi ################################################# # check for AFS clear-text auth support echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11913: checking whether to use AFS clear-text auth" >&5 +echo "configure:11911: checking whether to use AFS clear-text auth" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -11935,7 +11933,7 @@ fi ################################################# # check for the DFS clear-text auth system echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6 -echo "configure:11939: checking whether to use DFS clear-text auth" >&5 +echo "configure:11937: checking whether to use DFS clear-text auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -11961,7 +11959,7 @@ fi ################################################# # see if this box has the RedHat location for kerberos echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6 -echo "configure:11965: checking for /usr/kerberos" >&5 +echo "configure:11963: checking for /usr/kerberos" >&5 if test -d /usr/kerberos; then LDFLAGS="$LDFLAGS -L/usr/kerberos/lib" CFLAGS="$CFLAGS -I/usr/kerberos/include" @@ -11974,7 +11972,7 @@ fi ################################################# # check for location of Kerberos 5 install echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6 -echo "configure:11978: checking for kerberos 5 install path" >&5 +echo "configure:11976: checking for kerberos 5 install path" >&5 # Check whether --with-krb5 or --without-krb5 was given. if test "${with_krb5+set}" = set; then withval="$with_krb5" @@ -12003,17 +12001,17 @@ for ac_hdr in krb5.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12007: checking for $ac_hdr" >&5 +echo "configure:12005: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12046,17 +12044,17 @@ for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12050: checking for $ac_hdr" >&5 +echo "configure:12048: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12086,7 +12084,7 @@ done ################################################################## # we might need the k5crypto and com_err libraries on some systems echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6 -echo "configure:12090: checking for _et_list in -lcom_err" >&5 +echo "configure:12088: checking for _et_list in -lcom_err" >&5 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12094,7 +12092,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12126,7 +12124,7 @@ else fi echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6 -echo "configure:12130: checking for krb5_encrypt_data in -lk5crypto" >&5 +echo "configure:12128: checking for krb5_encrypt_data in -lk5crypto" >&5 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12134,7 +12132,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lk5crypto $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12170,7 +12168,7 @@ fi # now see if we can find the krb5 libs in standard paths # or as specified above echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6 -echo "configure:12174: checking for krb5_mk_req_extended in -lkrb5" >&5 +echo "configure:12172: checking for krb5_mk_req_extended in -lkrb5" >&5 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12178,7 +12176,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12217,7 +12215,7 @@ fi ######################################################## # now see if we can find the gssapi libs in standard paths echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6 -echo "configure:12221: checking for gss_display_status in -lgssapi_krb5" >&5 +echo "configure:12219: checking for gss_display_status in -lgssapi_krb5" >&5 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12225,7 +12223,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgssapi_krb5 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12265,7 +12263,7 @@ fi # we might need the lber lib on some systems. To avoid link errors # this test must be before the libldap test echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6 -echo "configure:12269: checking for ber_scanf in -llber" >&5 +echo "configure:12267: checking for ber_scanf in -llber" >&5 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12273,7 +12271,7 @@ else ac_save_LIBS="$LIBS" LIBS="-llber $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12309,7 +12307,7 @@ fi # now see if we can find the ldap libs in standard paths if test x$have_ldap != xyes; then echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6 -echo "configure:12313: checking for ldap_domain2hostlist in -lldap" >&5 +echo "configure:12311: checking for ldap_domain2hostlist in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12317,7 +12315,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lldap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12359,12 +12357,12 @@ fi for ac_func in ldap_set_rebind_proc do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12363: checking for $ac_func" >&5 +echo "configure:12361: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12412,13 +12410,13 @@ fi done echo $ac_n "checking whether ldap_set_rebind_proc takes 3 arguments""... $ac_c" 1>&6 -echo "configure:12416: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 +echo "configure:12414: checking whether ldap_set_rebind_proc takes 3 arguments" >&5 if eval "test \"`echo '$''{'pam_ldap_cv_ldap_set_rebind_proc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -12427,7 +12425,7 @@ int main() { ldap_set_rebind_proc(0, 0, 0); ; return 0; } EOF -if { (eval echo configure:12431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* pam_ldap_cv_ldap_set_rebind_proc=3 else @@ -12449,7 +12447,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:12453: checking whether to use AUTOMOUNT" >&5 +echo "configure:12451: checking whether to use AUTOMOUNT" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -12474,7 +12472,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:12478: checking whether to use SMBMOUNT" >&5 +echo "configure:12476: checking whether to use SMBMOUNT" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -12511,7 +12509,7 @@ fi # check for a PAM clear-text auth, accounts, password and session support with_pam_for_crypt=no echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6 -echo "configure:12515: checking whether to use PAM" >&5 +echo "configure:12513: checking whether to use PAM" >&5 # Check whether --with-pam or --without-pam was given. if test "${with_pam+set}" = set; then withval="$with_pam" @@ -12537,7 +12535,7 @@ fi # we can't build a pam module if we don't have pam. echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6 -echo "configure:12541: checking for pam_get_data in -lpam" >&5 +echo "configure:12539: checking for pam_get_data in -lpam" >&5 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12545,7 +12543,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12583,7 +12581,7 @@ fi ################################################# # check for pam_smbpass support echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6 -echo "configure:12587: checking whether to use pam_smbpass" >&5 +echo "configure:12585: checking whether to use pam_smbpass" >&5 # Check whether --with-pam_smbpass or --without-pam_smbpass was given. if test "${with_pam_smbpass+set}" = set; then withval="$with_pam_smbpass" @@ -12621,12 +12619,12 @@ if test $with_pam_for_crypt = no; then for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12625: checking for $ac_func" >&5 +echo "configure:12623: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12675,7 +12673,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:12679: checking for crypt in -lcrypt" >&5 +echo "configure:12677: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12683,7 +12681,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -12709,7 +12707,7 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - SMBDLIBS="$SMBDLIBS -lcrypt"; + LIBS="$LIBS -lcrypt"; cat >> confdefs.h <<\EOF #define HAVE_CRYPT 1 EOF @@ -12729,7 +12727,7 @@ fi ## if test $with_pam_for_crypt = no; then echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6 -echo "configure:12733: checking for a crypt that needs truncated salt" >&5 +echo "configure:12731: checking for a crypt that needs truncated salt" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12738,11 +12736,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_TRUNCATED_SALT=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRUNCATED_SALT=no else @@ -12776,7 +12774,7 @@ fi ################################################# # check for a TDB password database echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6 -echo "configure:12780: checking whether to use TDB SAM database" >&5 +echo "configure:12778: checking whether to use TDB SAM database" >&5 # Check whether --with-tdbsam or --without-tdbsam was given. if test "${with_tdbsam+set}" = set; then withval="$with_tdbsam" @@ -12801,7 +12799,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6 -echo "configure:12805: checking whether to use NISPLUS SAM database" >&5 +echo "configure:12803: checking whether to use NISPLUS SAM database" >&5 # Check whether --with-nisplussam or --without-nisplussam was given. if test "${with_nisplussam+set}" = set; then withval="$with_nisplussam" @@ -12832,7 +12830,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:12836: checking whether to use NISPLUS_HOME" >&5 +echo "configure:12834: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -12857,7 +12855,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:12861: checking whether to use syslog logging" >&5 +echo "configure:12859: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -12882,7 +12880,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:12886: checking whether to use profiling" >&5 +echo "configure:12884: checking whether to use profiling" >&5 # Check whether --with-profiling-data or --without-profiling-data was given. if test "${with_profiling_data+set}" = set; then withval="$with_profiling_data" @@ -12910,7 +12908,7 @@ fi QUOTAOBJS=smbd/noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:12914: checking whether to support disk-quotas" >&5 +echo "configure:12912: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -12921,13 +12919,13 @@ if test "${with_quotas+set}" = set; then *linux*) # Check for kernel 2.4.x quota braindamage... echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6 -echo "configure:12925: checking for linux 2.4.x quota braindamage.." >&5 +echo "configure:12923: checking for linux 2.4.x quota braindamage.." >&5 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -12939,7 +12937,7 @@ int main() { struct mem_dqblk D; ; return 0; } EOF -if { (eval echo configure:12943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_linux_2_4_quota_braindamage=yes else @@ -12988,7 +12986,7 @@ fi # check for experimental utmp accounting echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 -echo "configure:12992: checking whether to support utmp accounting" >&5 +echo "configure:12990: checking whether to support utmp accounting" >&5 # Check whether --with-utmp or --without-utmp was given. if test "${with_utmp+set}" = set; then withval="$with_utmp" @@ -13013,7 +13011,7 @@ fi ################################################# # choose native language(s) of man pages echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6 -echo "configure:13017: checking chosen man pages' language(s)" >&5 +echo "configure:13015: checking chosen man pages' language(s)" >&5 # Check whether --with-manpages-langs or --without-manpages-langs was given. if test "${with_manpages_langs+set}" = set; then withval="$with_manpages_langs" @@ -13044,7 +13042,7 @@ fi LIBSMBCLIENT_SHARED= LIBSMBCLIENT= echo $ac_n "checking whether to build the libsmbclient shared library""... $ac_c" 1>&6 -echo "configure:13048: checking whether to build the libsmbclient shared library" >&5 +echo "configure:13046: checking whether to build the libsmbclient shared library" >&5 # Check whether --with-libsmbclient or --without-libsmbclient was given. if test "${with_libsmbclient+set}" = set; then withval="$with_libsmbclient" @@ -13072,14 +13070,14 @@ fi ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:13076: checking how to get filesystem space usage" >&5 +echo "configure:13074: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:13083: checking statvfs64 function (SVR4)" >&5 +echo "configure:13081: checking statvfs64 function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13087,7 +13085,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -13134,12 +13132,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:13138: checking statvfs function (SVR4)" >&5 +echo "configure:13136: checking statvfs function (SVR4)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -13147,7 +13145,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -13172,7 +13170,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:13176: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:13174: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13180,7 +13178,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -13193,7 +13191,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:13197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -13220,7 +13218,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:13224: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:13222: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13228,7 +13226,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -13274,7 +13272,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:13278: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:13276: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13282,7 +13280,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -13292,7 +13290,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -13319,7 +13317,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:13323: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:13321: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13327,7 +13325,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13343,7 +13341,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:13347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -13370,7 +13368,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:13374: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:13372: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13378,7 +13376,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -13398,7 +13396,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:13402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -13431,9 +13429,9 @@ fi # file support. # echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6 -echo "configure:13435: checking if large file support can be enabled" >&5 +echo "configure:13433: checking if large file support can be enabled" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes else @@ -13511,7 +13509,7 @@ fi # check for ACL support echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6 -echo "configure:13515: checking whether to support ACLs" >&5 +echo "configure:13513: checking whether to support ACLs" >&5 # Check whether --with-acl-support or --without-acl-support was given. if test "${with_acl_support+set}" = set; then withval="$with_acl_support" @@ -13560,11 +13558,11 @@ EOF #define HAVE_TRU64_ACLS 1 EOF - SMBDLIBS="$SMBDLIBS -lpacl" + LIBS="$LIBS -lpacl" ;; *) echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 -echo "configure:13568: checking for acl_get_file in -lacl" >&5 +echo "configure:13566: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13572,7 +13570,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lacl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13598,21 +13596,26 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - SMBDLIBS="$SMBDLIBS -lacl" + ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 fi echo $ac_n "checking for ACL support""... $ac_c" 1>&6 -echo "configure:13608: checking for ACL support" >&5 +echo "configure:13613: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - acl_LIBS=$LIBS - LIBS="$LIBS -lacl" cat > conftest.$ac_ext < #include @@ -13620,7 +13623,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:13624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -13630,7 +13633,6 @@ else samba_cv_HAVE_POSIX_ACLS=no fi rm -f conftest* - LIBS=$acl_LIBS fi echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 @@ -13641,13 +13643,11 @@ echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 EOF echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 -echo "configure:13645: checking for acl_get_perm_np" >&5 +echo "configure:13647: checking for acl_get_perm_np" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - acl_LIBS=$LIBS - LIBS="$LIBS -lacl" cat > conftest.$ac_ext <&6 @@ -13705,7 +13704,7 @@ fi # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS). echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6 -echo "configure:13709: checking whether to build winbind" >&5 +echo "configure:13708: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported @@ -13801,20 +13800,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_comment""... $ac_c" 1>&6 -echo "configure:13805: checking whether struct passwd has pw_comment" >&5 +echo "configure:13804: checking whether struct passwd has pw_comment" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_comment'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_comment; ; return 0; } EOF -if { (eval echo configure:13818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_comment=yes else @@ -13839,20 +13838,20 @@ fi # [#include ]) echo $ac_n "checking whether struct passwd has pw_age""... $ac_c" 1>&6 -echo "configure:13843: checking whether struct passwd has pw_age" >&5 +echo "configure:13842: checking whether struct passwd has pw_age" >&5 if eval "test \"`echo '$''{'samba_cv_passwd_pw_age'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct passwd p; p.pw_age; ; return 0; } EOF -if { (eval echo configure:13856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_passwd_pw_age=yes else @@ -13891,7 +13890,7 @@ fi if test x"$INCLUDED_POPT" != x"yes"; then echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6 -echo "configure:13895: checking for poptGetContext in -lpopt" >&5 +echo "configure:13894: checking for poptGetContext in -lpopt" >&5 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -13899,7 +13898,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpopt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13934,7 +13933,7 @@ fi fi echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6 -echo "configure:13938: checking whether to use included popt" >&5 +echo "configure:13937: checking whether to use included popt" >&5 if test x"$INCLUDED_POPT" = x"yes"; then echo "$ac_t""yes" 1>&6 BUILD_POPT='$(POPT_OBJS)' @@ -13957,16 +13956,16 @@ fi # final configure stuff echo $ac_n "checking configure summary""... $ac_c" 1>&6 -echo "configure:13961: checking configure summary" >&5 +echo "configure:13960: checking configure summary" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:13969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -14137,8 +14136,6 @@ s%@POBAD_CC@%$POBAD_CC%g s%@SHLIBEXT@%$SHLIBEXT%g s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g s%@LIBSMBCLIENT@%$LIBSMBCLIENT%g -s%@SMBDLIBS@%$SMBDLIBS%g -s%@PRINTLIBS@%$PRINTLIBS%g s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g diff --git a/source3/configure.in b/source3/configure.in index f9720fc28b8..db34c266c58 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -147,8 +147,6 @@ AC_SUBST(POBAD_CC) AC_SUBST(SHLIBEXT) AC_SUBST(LIBSMBCLIENT_SHARED) AC_SUBST(LIBSMBCLIENT) -AC_SUBST(SMBDLIBS) -AC_SUBST(PRINTLIBS) # compile with optimization and without debugging by default CFLAGS="-O ${CFLAGS}" @@ -498,7 +496,7 @@ if test x$enable_cups != xno; then AC_DEFINE(HAVE_CUPS) CFLAGS="$CFLAGS `$CUPS_CONFIG --cflags`" LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`" - PRINTLIBS="$PRINTLIBS `$CUPS_CONFIG --libs`" + LIBS="$LIBS `$CUPS_CONFIG --libs`" fi fi @@ -506,7 +504,7 @@ fi # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code AC_CHECK_FUNCS(dlopen) if test x"$ac_cv_func_dlopen" = x"no"; then - AC_CHECK_LIB(dl, dlopen, [SMBDLIBS="$SMBDLIBS -ldl"; + AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"; AC_DEFINE(HAVE_DLOPEN)]) fi # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then @@ -613,7 +611,7 @@ AC_FUNC_MEMCMP # test for where we get crypt() from AC_CHECK_FUNCS(crypt) if test x"$ac_cv_func_crypt" = x"no"; then - AC_CHECK_LIB(crypt, crypt, [SMBDLIBS="$SMBDLIBS -lcrypt"; + AC_CHECK_LIB(crypt, crypt, [LIBS="$LIBS -lcrypt"; AC_DEFINE(HAVE_CRYPT)]) fi @@ -2109,7 +2107,7 @@ AC_ARG_WITH(pam_smbpass, if test $with_pam_for_crypt = no; then AC_CHECK_FUNCS(crypt) if test x"$ac_cv_func_crypt" = x"no"; then - AC_CHECK_LIB(crypt, crypt, [SMBDLIBS="$SMBDLIBS -lcrypt"; + AC_CHECK_LIB(crypt, crypt, [LIBS="$LIBS -lcrypt"; AC_DEFINE(HAVE_CRYPT)]) fi fi @@ -2602,29 +2600,23 @@ AC_ARG_WITH(acl-support, *osf*) AC_MSG_RESULT(Using Tru64 ACLs) AC_DEFINE(HAVE_TRU64_ACLS) - SMBDLIBS="$SMBDLIBS -lpacl" + LIBS="$LIBS -lpacl" ;; *) - AC_CHECK_LIB(acl,acl_get_file, [SMBDLIBS="$SMBDLIBS -lacl"]) + AC_CHECK_LIB(acl,acl_get_file) AC_CACHE_CHECK([for ACL support],samba_cv_HAVE_POSIX_ACLS,[ - acl_LIBS=$LIBS - LIBS="$LIBS -lacl" AC_TRY_LINK([#include #include ], [ acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);], -samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no) - LIBS=$acl_LIBS]) +samba_cv_HAVE_POSIX_ACLS=yes,samba_cv_HAVE_POSIX_ACLS=no)]) if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then AC_MSG_RESULT(Using posix ACLs) AC_DEFINE(HAVE_POSIX_ACLS) AC_CACHE_CHECK([for acl_get_perm_np],samba_cv_HAVE_ACL_GET_PERM_NP,[ - acl_LIBS=$LIBS - LIBS="$LIBS -lacl" AC_TRY_LINK([#include #include ], [ acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);], -samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no) - LIBS=$acl_LIBS]) +samba_cv_HAVE_ACL_GET_PERM_NP=yes,samba_cv_HAVE_ACL_GET_PERM_NP=no)]) if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then AC_DEFINE(HAVE_ACL_GET_PERM_NP) fi From 14d385439d99f0eadca5296aeef800c67038916b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 Aug 2002 20:54:37 +0000 Subject: [PATCH 215/262] printing change notification merge from APPLIANCE_HEAD (This used to be commit 11ddfd9cfa550dcd3186c8aaf0cc038ce7f1791f) --- source3/include/messages.h | 1 + source3/include/rpc_spoolss.h | 14 +- source3/printing/notify.c | 56 ++++-- source3/printing/nt_printing.c | 12 +- source3/rpc_parse/parse_spoolss.c | 19 +- source3/rpc_server/srv_spoolss_nt.c | 280 +++++++++++++++++----------- 6 files changed, 245 insertions(+), 137 deletions(-) diff --git a/source3/include/messages.h b/source3/include/messages.h index 79a08a75462..58e606b40fa 100644 --- a/source3/include/messages.h +++ b/source3/include/messages.h @@ -51,6 +51,7 @@ /* #define MSG_PRINTER_NOTIFY 2001*/ /* Obsolete */ #define MSG_PRINTER_DRVUPGRADE 2002 #define MSG_PRINTER_NOTIFY2 2003 +#define MSG_PRINTERDATA_INIT_RESET 2004 /* smbd messages */ #define MSG_SMB_CONF_UPDATED 3001 diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index 7ec9a509bf3..b7acf44c5de 100755 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -202,6 +202,7 @@ #define NOTIFY_TWO_VALUE 2 /* Notify data is stored in value2 */ #define NOTIFY_POINTER 3 /* Data is a pointer to a buffer */ #define NOTIFY_STRING 4 /* Data is a pointer to a buffer w/length */ +#define NOTIFY_SECDESC 5 /* Data is a security descriptor */ #define PRINTER_NOTIFY_TYPE 0x00 #define JOB_NOTIFY_TYPE 0x01 @@ -801,15 +802,16 @@ typedef struct spool_notify_info_data uint16 field; uint32 reserved; uint32 id; - union - { + union { uint32 value[2]; - struct - { + struct { uint32 length; uint16 *string; - } - data; + } data; + struct { + uint32 size; + SEC_DESC *desc; + } sd; } notify_data; uint32 size; diff --git a/source3/printing/notify.c b/source3/printing/notify.c index 1b2b7805e58..925d49a21d6 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -3,6 +3,7 @@ Version 2.2 printing backend routines Copyright (C) Tim Potter, 2002 + Copyright (C) Gerald Carter, 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -128,7 +129,7 @@ void notify_printer_status_byname(const char *printer_name, uint32 status) void notify_printer_status(int snum, uint32 status) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); if (printer_name) notify_printer_status_byname(printer_name, status); @@ -146,14 +147,14 @@ void notify_job_status_byname(const char *printer_name, uint32 jobid, uint32 sta void notify_job_status(int snum, uint32 jobid, uint32 status) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); notify_job_status_byname(printer_name, jobid, status, 0); } void notify_job_total_bytes(int snum, uint32 jobid, uint32 size) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); /* Job id stored in id field, status in value1 */ @@ -164,7 +165,7 @@ void notify_job_total_bytes(int snum, uint32 jobid, uint32 size) void notify_job_total_pages(int snum, uint32 jobid, uint32 pages) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); /* Job id stored in id field, status in value1 */ @@ -175,7 +176,7 @@ void notify_job_total_pages(int snum, uint32 jobid, uint32 pages) void notify_job_username(int snum, uint32 jobid, char *name) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); send_notify_field_buffer( printer_name, JOB_NOTIFY_TYPE, JOB_NOTIFY_USER_NAME, @@ -184,7 +185,7 @@ void notify_job_username(int snum, uint32 jobid, char *name) void notify_job_name(int snum, uint32 jobid, char *name) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); send_notify_field_buffer( printer_name, JOB_NOTIFY_TYPE, JOB_NOTIFY_DOCUMENT, @@ -193,37 +194,54 @@ void notify_job_name(int snum, uint32 jobid, char *name) void notify_job_submitted(int snum, uint32 jobid, time_t submitted) { - const char *printer_name = PRINTERNAME(snum); + const char *printer_name = SERVICE(snum); send_notify_field_buffer( printer_name, JOB_NOTIFY_TYPE, JOB_NOTIFY_SUBMITTED, jobid, sizeof(submitted), (char *)&submitted); } -void notify_printer_delete(char *printer_name) +void notify_printer_driver(int snum, char *driver_name) { + const char *printer_name = SERVICE(snum); + + send_notify_field_buffer( + printer_name, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DRIVER_NAME, + snum, strlen(driver_name) + 1, driver_name); } -void notify_printer_add(char *printer_name) +void notify_printer_comment(int snum, char *comment) { + const char *printer_name = SERVICE(snum); + + send_notify_field_buffer( + printer_name, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_COMMENT, + snum, strlen(comment) + 1, comment); } -void notify_printer_driver(int num, char *driver_name) +void notify_printer_sharename(int snum, char *share_name) { + const char *printer_name = SERVICE(snum); + + send_notify_field_buffer( + printer_name, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_SHARE_NAME, + snum, strlen(share_name) + 1, share_name); } -void notify_printer_comment(int num, char *comment) +void notify_printer_port(int snum, char *port_name) { + const char *printer_name = SERVICE(snum); + + send_notify_field_buffer( + printer_name, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PORT_NAME, + snum, strlen(port_name) + 1, port_name); } -void notify_printer_sharename(int num, char *share_name) +void notify_printer_location(int snum, char *location) { -} + const char *printer_name = SERVICE(snum); -void notify_printer_port(int num, char *port_name) -{ -} - -void notify_printer_location(int num, char *location) -{ + send_notify_field_buffer( + printer_name, PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_LOCATION, + snum, strlen(location) + 1, location); } diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index f0995db06df..2348bbe3d41 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -319,7 +319,17 @@ BOOL nt_printing_init(void) * register callback to handle updating printers as new * drivers are installed */ - message_register(MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer); + + message_register( MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer ); + + /* + * register callback to handle updating printer data + * when a driver is initialized + */ + + message_register( MSG_PRINTERDATA_INIT_RESET, reset_all_printerdata ); + + return True; } diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index ab8c4e1ab6d..a1fa758791b 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -322,7 +322,7 @@ reads or writes an NOTIFY INFO DATA structure. static BOOL smb_io_notify_info_data(char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs_struct *ps, int depth) { - uint32 useless_ptr=0xADDE0FF0; + uint32 useless_ptr=0x0FF0ADDE; prs_debug(ps, depth, desc, "smb_io_notify_info_data"); depth++; @@ -378,6 +378,14 @@ static BOOL smb_io_notify_info_data(char *desc,SPOOL_NOTIFY_INFO_DATA *data, prs break; + case NOTIFY_SECDESC: + if( !prs_uint32( "sd size", ps, depth, &data->notify_data.sd.size ) ) + return False; + if( !prs_uint32( "pointer", ps, depth, &useless_ptr ) ) + return False; + + break; + default: DEBUG(3, ("invalid enc_type %d for smb_io_notify_info_data\n", data->enc_type)); @@ -451,6 +459,13 @@ BOOL smb_io_notify_info_data_strings(char *desc,SPOOL_NOTIFY_INFO_DATA *data, break; + case NOTIFY_SECDESC: + if( !prs_uint32("secdesc size ", ps, depth, &data->notify_data.sd.size ) ) + return False; + if ( !sec_io_desc( "sec_desc", &data->notify_data.sd.desc, ps, depth ) ) + return False; + break; + default: DEBUG(3, ("invalid enc_type %d for smb_io_notify_info_data_strings\n", data->enc_type)); @@ -6750,7 +6765,7 @@ BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd, q_u->unknown0=0x0; q_u->unknown1=0x0; - q_u->info_ptr=0xaddee11e; + q_u->info_ptr=0x0FF0ADDE; q_u->info.version=2; diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 558a7a47d76..d04aff8b150 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -668,21 +668,21 @@ struct notify2_message_table { }; static struct notify2_message_table printer_notify_table[] = { - /* 0x00 */ { "PRINTER_NOTIFY_SERVER_NAME", NULL }, - /* 0x01 */ { "PRINTER_NOTIFY_PRINTER_NAME", NULL }, - /* 0x02 */ { "PRINTER_NOTIFY_SHARE_NAME", NULL }, - /* 0x03 */ { "PRINTER_NOTIFY_PORT_NAME", NULL }, - /* 0x04 */ { "PRINTER_NOTIFY_DRIVER_NAME", NULL }, - /* 0x05 */ { "PRINTER_NOTIFY_COMMENT", NULL }, - /* 0x06 */ { "PRINTER_NOTIFY_LOCATION", NULL }, + /* 0x00 */ { "PRINTER_NOTIFY_SERVER_NAME", notify_string }, + /* 0x01 */ { "PRINTER_NOTIFY_PRINTER_NAME", notify_string }, + /* 0x02 */ { "PRINTER_NOTIFY_SHARE_NAME", notify_string }, + /* 0x03 */ { "PRINTER_NOTIFY_PORT_NAME", notify_string }, + /* 0x04 */ { "PRINTER_NOTIFY_DRIVER_NAME", notify_string }, + /* 0x05 */ { "PRINTER_NOTIFY_COMMENT", notify_string }, + /* 0x06 */ { "PRINTER_NOTIFY_LOCATION", notify_string }, /* 0x07 */ { "PRINTER_NOTIFY_DEVMODE", NULL }, - /* 0x08 */ { "PRINTER_NOTIFY_SEPFILE", NULL }, - /* 0x09 */ { "PRINTER_NOTIFY_PRINT_PROCESSOR", NULL }, + /* 0x08 */ { "PRINTER_NOTIFY_SEPFILE", notify_string }, + /* 0x09 */ { "PRINTER_NOTIFY_PRINT_PROCESSOR", notify_string }, /* 0x0a */ { "PRINTER_NOTIFY_PARAMETERS", NULL }, - /* 0x0b */ { "PRINTER_NOTIFY_DATATYPE", NULL }, + /* 0x0b */ { "PRINTER_NOTIFY_DATATYPE", notify_string }, /* 0x0c */ { "PRINTER_NOTIFY_SECURITY_DESCRIPTOR", NULL }, - /* 0x0d */ { "PRINTER_NOTIFY_ATTRIBUTES", NULL }, - /* 0x0e */ { "PRINTER_NOTIFY_PRIORITY", NULL }, + /* 0x0d */ { "PRINTER_NOTIFY_ATTRIBUTES", notify_one_value }, + /* 0x0e */ { "PRINTER_NOTIFY_PRIORITY", notify_one_value }, /* 0x0f */ { "PRINTER_NOTIFY_DEFAULT_PRIORITY", NULL }, /* 0x10 */ { "PRINTER_NOTIFY_START_TIME", NULL }, /* 0x11 */ { "PRINTER_NOTIFY_UNTIL_TIME", NULL }, @@ -726,6 +726,8 @@ static void process_notify2_message(struct spoolss_notify_msg *msg, { Printer_entry *p; + DEBUG(8,("process_notify2_message: Enter...[%s]\n", msg->printer)); + for (p = printers_list; p; p = p->next) { SPOOL_NOTIFY_INFO_DATA *data; uint32 data_len = 1; @@ -736,28 +738,52 @@ static void process_notify2_message(struct spoolss_notify_msg *msg, if (!p->notify.client_connected) continue; + DEBUG(10,("Client connected! [%s]\n", p->dev.handlename)); + /* For this printer? Print servers always receive notifications. */ - if (p->printer_type == PRINTER_HANDLE_IS_PRINTER && - !strequal(msg->printer, p->dev.handlename)) + if ( ( p->printer_type == PRINTER_HANDLE_IS_PRINTER ) && + ( !strequal(msg->printer, p->dev.handlename) ) ) continue; + DEBUG(10,("Our printer\n")); + /* Are we monitoring this event? */ if (!is_monitoring_event(p, msg->type, msg->field)) continue; + DEBUG(10,("process_notify2_message: Sending message type [%x] field [%x] for printer [%s]\n", + msg->type, msg->field, p->dev.handlename)); + /* OK - send the event to the client */ data = talloc(mem_ctx, sizeof(SPOOL_NOTIFY_INFO_DATA)); ZERO_STRUCTP(data); - /* Convert unix jobid to smb jobid */ + /* + * if the is a printer notification handle and not a job notification + * type, then set the id to 0. Other wise just use what was specified + * in the message. + * + * When registering change notification on a print server handle + * we always need to send back the id (snum) matching the printer + * for which the change took place. For change notify registered + * on a printer handle, this does not matter and the id should be 0. + * + * --jerry + */ + if ( ( p->printer_type == PRINTER_HANDLE_IS_PRINTER ) && ( msg->type == PRINTER_NOTIFY_TYPE ) ) + id = 0; + else id = msg->id; + + /* Convert unix jobid to smb jobid */ + if (msg->flags & SPOOLSS_NOTIFY_MSG_UNIX_JOBID) { id = sysjob_to_jobid(msg->id); @@ -772,51 +798,31 @@ static void process_notify2_message(struct spoolss_notify_msg *msg, switch(msg->type) { case PRINTER_NOTIFY_TYPE: - if (printer_notify_table[msg->field].fn) - printer_notify_table[msg->field].fn( - msg, data, mem_ctx); - else + if ( !printer_notify_table[msg->field].fn ) goto done; + + printer_notify_table[msg->field].fn(msg, data, mem_ctx); + break; + case JOB_NOTIFY_TYPE: - if (job_notify_table[msg->field].fn) - job_notify_table[msg->field].fn( - msg, data, mem_ctx); - else + if ( !job_notify_table[msg->field].fn ) goto done; - break; - default: - DEBUG(5, ("Unknown notification type %d\n", - msg->type)); - goto done; - } - if (!p->notify.flags) - cli_spoolss_rrpcn( - ¬ify_cli, mem_ctx, &p->notify.client_hnd, - data_len, data, p->notify.change, 0); - else { - NT_PRINTER_INFO_LEVEL *printer = NULL; + job_notify_table[msg->field].fn(msg, data, mem_ctx); - get_a_printer(&printer, 2, msg->printer); + break; - if (!printer) { - DEBUG(5, ("unable to load info2 for %s\n", - msg->printer)); + default: + DEBUG(5, ("Unknown notification type %d\n", msg->type)); goto done; } - /* XXX: This needs to be updated for - PRINTER_CHANGE_SET_PRINTER_DRIVER. */ - - cli_spoolss_routerreplyprinter( - ¬ify_cli, mem_ctx, &p->notify.client_hnd, - 0, printer->info_2->changeid); - - free_a_printer(&printer, 2); - } + cli_spoolss_rrpcn( ¬ify_cli, mem_ctx, &p->notify.client_hnd, + data_len, data, p->notify.change, 0 ); } done: + DEBUG(8,("process_notify2_message: Exit...\n")); return; } @@ -867,30 +873,6 @@ static void receive_notify2_message(int msg_type, pid_t src, void *buf, talloc_destroy(mem_ctx); } -/*************************************************************************** - Server wrapper for cli_spoolss_routerreplyprinter() since the client - function can only send a single change notification at a time. - - FIXME!!! only handles one change currently (PRINTER_CHANGE_SET_PRINTER_DRIVER) - --jerry - **************************************************************************/ - -static WERROR srv_spoolss_routerreplyprinter (struct cli_state *reply_cli, TALLOC_CTX *mem_ctx, - POLICY_HND *pol, PRINTER_MESSAGE_INFO *info, - NT_PRINTER_INFO_LEVEL *printer) -{ - WERROR result; - uint32 condition = 0x0; - - if (info->flags & PRINTER_MESSAGE_DRIVER) - condition = PRINTER_CHANGE_SET_PRINTER_DRIVER; - - result = cli_spoolss_routerreplyprinter(reply_cli, mem_ctx, pol, condition, - printer->info_2->changeid); - - return result; -} - /******************************************************************** Send a message to ourself about new driver being installed so we can upgrade the information for each printer bound to this @@ -961,6 +943,80 @@ void do_drv_upgrade_printer(int msg_type, pid_t src, void *buf, size_t len) /* all done */ } +/******************************************************************** + Send a message to ourself about new driver being installed + so we can upgrade the information for each printer bound to this + driver + ********************************************************************/ + +static BOOL srv_spoolss_reset_printerdata(char* drivername) +{ + int len = strlen(drivername); + + if (!len) + return False; + + DEBUG(10,("srv_spoolss_reset_printerdata: Sending message about resetting printerdata [%s]\n", + drivername)); + + message_send_pid(sys_getpid(), MSG_PRINTERDATA_INIT_RESET, drivername, len+1, False); + + return True; +} + +/********************************************************************** + callback to receive a MSG_PRINTERDATA_INIT_RESET message and interate + over all printers, resetting printer data as neessary + **********************************************************************/ + +void reset_all_printerdata(int msg_type, pid_t src, void *buf, size_t len) +{ + fstring drivername; + int snum; + int n_services = lp_numservices(); + + len = MIN( len, sizeof(drivername)-1 ); + strncpy( drivername, buf, len ); + + DEBUG(10,("reset_all_printerdata: Got message for new driver [%s]\n", drivername )); + + /* Iterate the printer list */ + + for ( snum=0; snuminfo_2 && !strcmp(drivername, printer->info_2->drivername) ) + { + DEBUG(6,("reset_all_printerdata: Updating printer [%s]\n", printer->info_2->printername)); + + if ( !set_driver_init(printer, 2) ) { + DEBUG(5,("reset_all_printerdata: Error resetting printer data for printer [%s], driver [%s]!\n", + printer->info_2->printername, printer->info_2->drivername)); + } + } + + free_a_printer( &printer, 2 ); + } + } + + /* all done */ + + return; +} + /******************************************************************** Copy routines used by convert_to_openprinterex() *******************************************************************/ @@ -1094,8 +1150,6 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, { UNISTR2 *printername = NULL; PRINTER_DEFAULT *printer_default = &q_u->printer_default; -/* uint32 user_switch = q_u->user_switch; - notused */ -/* SPOOL_USER_CTR user_ctr = q_u->user_ctr; - notused */ POLICY_HND *handle = &r_u->handle; fstring name; @@ -2753,7 +2807,7 @@ struct s_notify_info_data_table notify_info_data_table[] = { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PRINT_PROCESSOR, "PRINTER_NOTIFY_PRINT_PROCESSOR", NOTIFY_STRING, spoolss_notify_print_processor }, { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PARAMETERS, "PRINTER_NOTIFY_PARAMETERS", NOTIFY_STRING, spoolss_notify_parameters }, { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DATATYPE, "PRINTER_NOTIFY_DATATYPE", NOTIFY_STRING, spoolss_notify_datatype }, -{ PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_SECURITY_DESCRIPTOR, "PRINTER_NOTIFY_SECURITY_DESCRIPTOR", NOTIFY_POINTER, spoolss_notify_security_desc }, +{ PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_SECURITY_DESCRIPTOR, "PRINTER_NOTIFY_SECURITY_DESCRIPTOR", NOTIFY_SECDESC, spoolss_notify_security_desc }, { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_ATTRIBUTES, "PRINTER_NOTIFY_ATTRIBUTES", NOTIFY_ONE_VALUE, spoolss_notify_attributes }, { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_PRIORITY, "PRINTER_NOTIFY_PRIORITY", NOTIFY_ONE_VALUE, spoolss_notify_priority }, { PRINTER_NOTIFY_TYPE, PRINTER_NOTIFY_DEFAULT_PRIORITY, "PRINTER_NOTIFY_DEFAULT_PRIORITY", NOTIFY_ONE_VALUE, spoolss_notify_default_priority }, @@ -2800,10 +2854,13 @@ static uint32 size_of_notify_info_data(uint16 type, uint16 field) { int i=0; - for (i = 0; i < sizeof(notify_info_data_table); i++) { - if (notify_info_data_table[i].type == type && - notify_info_data_table[i].field == field) { - switch(notify_info_data_table[i].size) { + for (i = 0; i < sizeof(notify_info_data_table); i++) + { + if ( (notify_info_data_table[i].type == type) + && (notify_info_data_table[i].field == field) ) + { + switch(notify_info_data_table[i].size) + { case NOTIFY_ONE_VALUE: case NOTIFY_TWO_VALUE: return 1; @@ -2816,6 +2873,9 @@ static uint32 size_of_notify_info_data(uint16 type, uint16 field) case NOTIFY_POINTER: return 4; + + case NOTIFY_SECDESC: + return 5; } } } @@ -2870,13 +2930,11 @@ void construct_info_data(SPOOL_NOTIFY_INFO_DATA *info_data, uint16 type, uint16 info_data->field = field; info_data->reserved = 0; - if (type == JOB_NOTIFY_TYPE) - info_data->id = id; - else - info_data->id = 0; - info_data->size = size_of_notify_info_data(type, field); info_data->enc_type = type_of_notify_info_data(type, field); + + info_data->id = id; + } @@ -2908,20 +2966,24 @@ static BOOL construct_notify_printer_info(SPOOL_NOTIFY_INFO *info, int if (!W_ERROR_IS_OK(get_a_printer(&printer, 2, lp_servicename(snum)))) return False; - for(field_num=0; field_numcount; field_num++) { + for(field_num=0; field_numcount; field_num++) + { field = option_type->fields[field_num]; + DEBUG(4,("construct_notify_printer_info: notify [%d]: type [%x], field [%x]\n", field_num, type, field)); if (!search_notify(type, field, &j) ) continue; - if((tid=(SPOOL_NOTIFY_INFO_DATA *)Realloc(info->data, (info->count+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) { + if((tid=(SPOOL_NOTIFY_INFO_DATA *)Realloc(info->data, (info->count+1)*sizeof(SPOOL_NOTIFY_INFO_DATA))) == NULL) + { DEBUG(2,("construct_notify_printer_info: failed to enlarge buffer info->data!\n")); return False; } - else info->data = tid; + else + info->data = tid; - current_data=&info->data[info->count]; + current_data = &info->data[info->count]; construct_info_data(current_data, type, field, id); @@ -3048,16 +3110,17 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, continue; for (snum=0; snumversion:[%d], info->flags:[%d], info->count:[%d]\n", info->version, info->flags, info->count)); DEBUGADD(1,("num\ttype\tfield\tres\tid\tsize\tenc_type\n")); @@ -3067,7 +3130,7 @@ static WERROR printserver_notify_info(pipes_struct *p, POLICY_HND *hnd, i, info->data[i].type, info->data[i].field, info->data[i].reserved, info->data[i].id, info->data[i].size, info->data[i].enc_type)); } - */ +#endif return WERR_OK; } @@ -3165,7 +3228,6 @@ static WERROR printer_notify_info(pipes_struct *p, POLICY_HND *hnd, SPOOL_NOTIFY WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u) { POLICY_HND *handle = &q_u->handle; -/* SPOOL_NOTIFY_OPTION *option = q_u->option; - notused. */ SPOOL_NOTIFY_INFO *info = &r_u->info; Printer_entry *Printer=find_printer_index_by_hnd(p, handle); @@ -3192,8 +3254,10 @@ WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCN /* We need to keep track of the change value to send back in RRPCN replies otherwise our updates are ignored. */ - if (Printer->notify.client_connected) + if (Printer->notify.client_connected) { + DEBUG(10,("_spoolss_rfnpcnex: Saving change value in request [%x]\n", q_u->change)); Printer->notify.change = q_u->change; + } /* just ignore the SPOOL_NOTIFY_OPTION */ @@ -4732,7 +4796,6 @@ WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_ UNISTR2 *uni_arch = &q_u->architecture; uint32 level = q_u->level; uint32 clientmajorversion = q_u->clientmajorversion; -/* uint32 clientminorversion = q_u->clientminorversion; - notused. */ NEW_BUFFER *buffer = NULL; uint32 offered = q_u->offered; uint32 *needed = &r_u->needed; @@ -4824,9 +4887,9 @@ WERROR _spoolss_endpageprinter(pipes_struct *p, SPOOL_Q_ENDPAGEPRINTER *q_u, SPO WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u) { POLICY_HND *handle = &q_u->handle; -/* uint32 level = q_u->doc_info_container.level; - notused. */ DOC_INFO *docinfo = &q_u->doc_info_container.docinfo; uint32 *jobid = &r_u->jobid; + DOC_INFO_1 *info_1 = &docinfo->doc_info_1; int snum; pstring jobname; @@ -5526,6 +5589,12 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, result = WERR_ACCESS_DENIED; goto done; } + + /* we need to reset all driver init data for all printers + bound to this driver */ + + srv_spoolss_reset_printerdata( printer->info_2->drivername ); + } else { /* * When a *new* driver is bound to a printer, the drivername is used to @@ -5537,6 +5606,9 @@ static WERROR update_printer(pipes_struct *p, POLICY_HND *handle, uint32 level, DEBUG(5,("update_printer: Error restoring driver initialization data for driver [%s]!\n", printer->info_2->drivername)); } + + DEBUG(10,("update_printer: changing driver [%s]! Sending event!\n", + printer->info_2->drivername)); notify_printer_driver(snum, printer->info_2->drivername); } } @@ -5847,8 +5919,6 @@ static WERROR enumjobs_level2(print_queue_struct *queue, int snum, WERROR _spoolss_enumjobs( pipes_struct *p, SPOOL_Q_ENUMJOBS *q_u, SPOOL_R_ENUMJOBS *r_u) { POLICY_HND *handle = &q_u->handle; -/* uint32 firstjob = q_u->firstjob; - notused. */ -/* uint32 numofjobs = q_u->numofjobs; - notused. */ uint32 level = q_u->level; NEW_BUFFER *buffer = NULL; uint32 offered = q_u->offered; @@ -6195,7 +6265,6 @@ static WERROR enumprinterdrivers_level3(fstring servername, fstring architecture WERROR _spoolss_enumprinterdrivers( pipes_struct *p, SPOOL_Q_ENUMPRINTERDRIVERS *q_u, SPOOL_R_ENUMPRINTERDRIVERS *r_u) { -/* UNISTR2 *name = &q_u->name; - notused. */ UNISTR2 *environment = &q_u->environment; uint32 level = q_u->level; NEW_BUFFER *buffer = NULL; @@ -6252,7 +6321,6 @@ static void fill_form_1(FORM_1 *form, nt_forms_struct *list) WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMFORMS *r_u) { -/* POLICY_HND *handle = &q_u->handle; - notused. */ uint32 level = q_u->level; NEW_BUFFER *buffer = NULL; uint32 offered = q_u->offered; @@ -6353,7 +6421,6 @@ WERROR _spoolss_enumforms(pipes_struct *p, SPOOL_Q_ENUMFORMS *q_u, SPOOL_R_ENUMF WERROR _spoolss_getform(pipes_struct *p, SPOOL_Q_GETFORM *q_u, SPOOL_R_GETFORM *r_u) { -/* POLICY_HND *handle = &q_u->handle; - notused. */ uint32 level = q_u->level; UNISTR2 *uni_formname = &q_u->formname; NEW_BUFFER *buffer = NULL; @@ -6649,7 +6716,6 @@ static WERROR enumports_level_2(NEW_BUFFER *buffer, uint32 offered, uint32 *need WERROR _spoolss_enumports( pipes_struct *p, SPOOL_Q_ENUMPORTS *q_u, SPOOL_R_ENUMPORTS *r_u) { -/* UNISTR2 *name = &q_u->name; - notused. */ uint32 level = q_u->level; NEW_BUFFER *buffer = NULL; uint32 offered = q_u->offered; @@ -6890,9 +6956,7 @@ WERROR _spoolss_addprinterdriver(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVER *q_u, version = driver.info_6->version; else version = -1; - - switch (version) - { + switch (version) { /* * 9x printer driver - never delete init data */ @@ -6962,15 +7026,13 @@ WERROR _spoolss_addprinterdriverex(pipes_struct *p, SPOOL_Q_ADDPRINTERDRIVEREX * if ( q_u->copy_flags != APD_COPY_NEW_FILES ) return WERR_ACCESS_DENIED; - /* just pass the information off to _spoolss_addprinterdriver() */ - ZERO_STRUCT(q_u_local); ZERO_STRUCT(r_u_local); + /* just pass the information off to _spoolss_addprinterdriver() */ q_u_local.server_name_ptr = q_u->server_name_ptr; copy_unistr2(&q_u_local.server_name, &q_u->server_name); q_u_local.level = q_u->level; - memcpy( &q_u_local.info, &q_u->info, sizeof(SPOOL_PRINTER_DRIVER_INFO_LEVEL) ); return _spoolss_addprinterdriver( p, &q_u_local, &r_u_local ); From 1492a040ee5444f3a021de367f3dde112eb227b7 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 Aug 2002 22:14:42 +0000 Subject: [PATCH 216/262] delete printer driver fix from APP_HEAD (This used to be commit 9c6b930068d1e762fad78c9e36792764c280b85c) --- source3/printing/nt_printing.c | 51 ++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 2348bbe3d41..f208cabb606 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -3764,7 +3764,7 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, { pstring key; fstring arch; - TDB_DATA kbuf; + TDB_DATA kbuf, dbuf; NT_PRINTER_DRIVER_INFO_LEVEL ctr; /* delete the tdb data first */ @@ -3782,8 +3782,20 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, kbuf.dptr=key; kbuf.dsize=strlen(key)+1; + /* check if the driver actually exists for this environment */ + + dbuf = tdb_fetch( tdb_drivers, kbuf ); + if ( !dbuf.dptr ) { + DEBUG(8,("delete_printer_driver_internal: Driver unknown [%s]\n", key)); + return WERR_UNKNOWN_PRINTER_DRIVER; + } + + SAFE_FREE( dbuf.dptr ); + + /* ok... the driver exists so the delete should return success */ + if (tdb_delete(tdb_drivers, kbuf) == -1) { - DEBUG (0,("delete_printer_driver: fail to delete %s!\n", key)); + DEBUG (0,("delete_printer_driver_internal: fail to delete %s!\n", key)); return WERR_ACCESS_DENIED; } @@ -3796,8 +3808,8 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, if ( delete_files ) delete_driver_files( i, user ); - DEBUG(5,("delete_printer_driver: [%s] driver delete successful.\n", - i->name)); + + DEBUG(5,("delete_printer_driver_internal: driver delete successful [%s]\n", key)); return WERR_OK; } @@ -3810,22 +3822,33 @@ static WERROR delete_printer_driver_internal( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, struct current_user *user, uint32 version, BOOL delete_files ) { - int ver; WERROR err; - /* see if we should delete all versions of this driver */ + /* + * see if we should delete all versions of this driver + * (DRIVER_ANY_VERSION uis only set for "Windows NT x86") + */ - if ( version == DRIVER_ANY_VERSION ) { - for ( ver=0; ver Date: Thu, 8 Aug 2002 22:17:42 +0000 Subject: [PATCH 217/262] one line merge from APP_HEAD (This used to be commit b6b64d06a630f741c7ffbec99b71d34496159fa7) --- source3/printing/nt_printing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index f208cabb606..e9ebb89d605 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1012,7 +1012,7 @@ static int file_version_is_newer(connection_struct *conn, fstring new_file, } close_file(fsp, True); - if (use_version) { + if (use_version && (new_major != old_major || new_minor != old_minor)) { /* Compare versions and choose the larger version number */ if (new_major > old_major || (new_major == old_major && new_minor > old_minor)) { From 3fce46ac7d790fbe9fcdd2426277857612bb252a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 10 Aug 2002 20:14:32 +0000 Subject: [PATCH 218/262] Adding pdb_xml and pdb_mysql passdb modules. Added some consts to pdb_test to follow pdb_methods struct more strictly (This used to be commit bb1c4501992650a5e26b4bc743aeae551852becc) --- examples/pdb/README | 4 + examples/pdb/mysql/ChangeLog | 41 ++ examples/pdb/mysql/Makefile.in | 33 ++ examples/pdb/mysql/README | 92 +++ examples/pdb/mysql/pdb_mysql.c | 983 +++++++++++++++++++++++++++++++++ examples/pdb/pdb_test.c | 8 +- examples/pdb/xml/ChangeLog | 13 + examples/pdb/xml/Makefile.in | 33 ++ examples/pdb/xml/README | 14 + examples/pdb/xml/TODO | 6 + examples/pdb/xml/pdb_xml.c | 561 +++++++++++++++++++ 11 files changed, 1784 insertions(+), 4 deletions(-) create mode 100644 examples/pdb/mysql/ChangeLog create mode 100644 examples/pdb/mysql/Makefile.in create mode 100644 examples/pdb/mysql/README create mode 100644 examples/pdb/mysql/pdb_mysql.c create mode 100644 examples/pdb/xml/ChangeLog create mode 100644 examples/pdb/xml/Makefile.in create mode 100644 examples/pdb/xml/README create mode 100644 examples/pdb/xml/TODO create mode 100644 examples/pdb/xml/pdb_xml.c diff --git a/examples/pdb/README b/examples/pdb/README index a2126047925..561473129b0 100644 --- a/examples/pdb/README +++ b/examples/pdb/README @@ -1,5 +1,9 @@ README for Samba Password Database (PDB) examples ==================================================== +8-8-2002 Jelmer Vernooij + +Added mysql and xml modules. See README in xml/ and mysql/ for details. + 21-6-2002 Stefan (metze) Metzmacher I have added an interface versioning. diff --git a/examples/pdb/mysql/ChangeLog b/examples/pdb/mysql/ChangeLog new file mode 100644 index 00000000000..5aeeb66268b --- /dev/null +++ b/examples/pdb/mysql/ChangeLog @@ -0,0 +1,41 @@ +** This file is now deprecated, use CVS' log featues ** + +2002-06-13 Jelmer Vernooij + * Converted to using SID's like samba HEAD does now + * Fixed some FIXME's + +2002-05-28 Jelmer Vernooij + * Updated docs, after some testing by Vance Lankhaar + +2002-05-25 Jelmer Vernooij + * Added support for dynamic debug classes + * Fixed nt/lanman password support + * Released 1.2 + +2002-05-06 Jelmer Vernooij + * Added support for multiple instances of pdb_mysql + * Added identifiers + * Updated documentation + * Released 1.1 + +2002-04-27 Jelmer Vernooij + * Updated documentation + * Released 1.0! + +2002-04-27 Jelmer Vernooij + * Added update/add sam account support + * Released 0.4 + +2002-04-13 Jelmer Vernooij + * Support for multiple instances of pdb_mysql + * Released 0.3 + +2002-04-12 Jelmer Vernooij + * Now using lp_parm_string to retrieve configuration values (instead of + our configuration files) + * Updated documentation + * Released 0.2 + +2002-04-10 Jelmer Vernooij + * Released 0.1 + * Initial release. Not supporting adding and updating data of users diff --git a/examples/pdb/mysql/Makefile.in b/examples/pdb/mysql/Makefile.in new file mode 100644 index 00000000000..1da6ea789ef --- /dev/null +++ b/examples/pdb/mysql/Makefile.in @@ -0,0 +1,33 @@ +PDB_OBJS = pdb_mysql.so +PDB_LDFLAGS = -lmysqlclient +MAKEFILE = Makefile.pdb + +include $(MAKEFILE) + +CC = @CC@ +LIBTOOL = libtool +CFLAGS = @CFLAGS@ $(PDB_CFLAGS) +CPPFLAGS = @CPPFLAGS@ $(PDB_CPPFLAGS) +LDFLAGS = @LDFLAGS@ $(PDB_LDFLAGS) +LDSHFLAGS = -shared +srcdir = @builddir@ +FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) + +# Default target + +default: $(PDB_OBJS) + +# Pattern rules + +%.so: %.lo + $(LIBTOOL) $(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $< + +%.lo: %.c + $(LIBTOOL) $(CC) $(FLAGS) -c $< + +# Misc targets + +clean: + rm -rf .libs + rm -f core *~ *% *.bak \ + $(PDB_OBJS) $(PDB_OBJS:.so=.o) $(PDB_OBJS:.so=.lo) diff --git a/examples/pdb/mysql/README b/examples/pdb/mysql/README new file mode 100644 index 00000000000..e3cbcab8cfd --- /dev/null +++ b/examples/pdb/mysql/README @@ -0,0 +1,92 @@ +PDB MySQL plugin for samba v1.1 +-- + +Building +========= +Before you can build the plugin, set the variable SAMBA_SRC in Makefile to the +path containing the samba sources. This is usually the 'source' directory in +the samba tarball or CVS. + +Next, type make, and then copy pdb_mysql.so to any location you want. I +strongly recommend installing it in $PREFIX/lib or /usr/lib/samba/ + +Configuring +============ +This plugin lacks some good documentation, but here is some short info: + +Add a the following to the 'passdb backend' variable in your smb.conf: + +passdb backend = [other-plugins] plugin:/location/to/pdb_mysql.so:identifier [other-plugins] + +The identifier can be any string you like, as long as it doesn't collide with +the identifiers of other plugins or other instances of pdb_mysql. If you +specify multiple pdb_mysql.so entries in 'passdb backend', you also need to +use different identifiers! + +Additional options can be given thru the smb.conf file in the [global] section. + +identifier:mysql host - host name, defaults to 'localhost' +identifier:mysql password +identifier:mysql user - defaults to 'samba' +identifier:mysql database - defaults to 'samba' +identifier:mysql port - defaults to 3306 +identifier:table - Name of the table containing users + +Names of the columns in this table(I've added column types those columns + should have first): +identifier:logon time column - int(9) +identifier:logoff time column - int(9) +identifier:kickoff time column - int(9) +identifier:pass last set time column - int(9) +identifier:pass can change time column - int(9) +identifier:pass must change time column - int(9) +identifier:username column - varchar(255) - unix username +identifier:domain column - varchar(255) - NT domain user is part of +identifier:nt username column - varchar(255) - NT username +identifier:fullname column - varchar(255) - Full name of user +identifier:home dir column - varchar(255) - Unix homedir path +identifier:dir drive column - varchar(2) - Directory drive path (eg: 'H:') +identifier:logon script column - varchar(255) - Batch file to run on client side when logging on +identifier:profile path column - varchar(255) - Path of profile +identifier:acct desc column - varchar(255) - Some ASCII NT user data +identifier:workstations column - varchar(255) - Workstations user can logon to (or NULL for all) +identifier:unknown string column - varchar(255) - unknown string +identifier:munged dial column - varchar(255) - ? +identifier:uid column - int(9) - Unix user ID (uid) +identifier:gid column - int(9) - Unix user group (gid) +identifier:user sid column - varchar(255) - NT user SID +identifier:group sid column - varchar(255) - NT group ID +identifier:lanman pass column - varchar(255) - encrypted lanman password +identifier:nt pass column - varchar(255) - encrypted nt passwd +identifier:plaintext pass column - varchar(255) - plaintext password +identifier:acct control column - int(9) - nt user data +identifier:unknown 3 column - int(9) - unknown +identifier:logon divs column - int(9) - ? +identifier:hours len column - int(9) - ? +identifier:unknown 5 column - int(9) - unknown +identifier:unknown 6 column - int(9) - unknown + +Eventually, you can put a colon (:) after the name of each column, which +should specify the column to update when updating the table. You can also +specify nothing behind the colon - then the data from the field will not be +updated. + +Using plaintext passwords or encrypted password +=============================================== +I strongly discourage the use of plaintext passwords, however, you can use them: + +If you would like to use plaintext passwords, set 'identifier:lanman pass column' and 'identifier:nt pass column' to 'NULL' (without the quotes) and 'identifier:plaintext pass column' to the name of the column containing the plaintext passwords. + +If you use encrypted passwords, set the 'identifier:plaintext pass column' to 'NULL' (without the quotes). This is the default. + +Getting non-column data from the table +====================================== +It is possible to have not all data in the database and making some 'constant'. + +For example, you can set 'identifier:fullname column' to : + CONCAT(First_name,' ',Sur_name) + +Or, set 'identifier:workstations column' to : + NULL + +See the MySQL documentation for more language constructs. diff --git a/examples/pdb/mysql/pdb_mysql.c b/examples/pdb/mysql/pdb_mysql.c new file mode 100644 index 00000000000..c7e9e781c32 --- /dev/null +++ b/examples/pdb/mysql/pdb_mysql.c @@ -0,0 +1,983 @@ + +/* + * MySQL password backend for samba + * Copyright (C) Jelmer Vernooij 2002 + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 675 + * Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "includes.h" +#include + +#define CONFIG_TABLE_DEFAULT "user" +#define CONFIG_LOGON_TIME_DEFAULT "logon_time" +#define CONFIG_LOGOFF_TIME_DEFAULT "logoff_time" +#define CONFIG_KICKOFF_TIME_DEFAULT "kickoff_time" +#define CONFIG_PASS_LAST_SET_TIME_DEFAULT "pass_last_set_time" +#define CONFIG_PASS_CAN_CHANGE_TIME_DEFAULT "pass_can_change_time" +#define CONFIG_PASS_MUST_CHANGE_TIME_DEFAULT "pass_must_change_time" +#define CONFIG_USERNAME_DEFAULT "username" +#define CONFIG_DOMAIN_DEFAULT "domain" +#define CONFIG_NT_USERNAME_DEFAULT "nt_username" +#define CONFIG_FULLNAME_DEFAULT "nt_fullname" +#define CONFIG_HOME_DIR_DEFAULT "home_dir" +#define CONFIG_DIR_DRIVE_DEFAULT "dir_drive" +#define CONFIG_LOGON_SCRIPT_DEFAULT "logon_script" +#define CONFIG_PROFILE_PATH_DEFAULT "profile_path" +#define CONFIG_ACCT_DESC_DEFAULT "acct_desc" +#define CONFIG_WORKSTATIONS_DEFAULT "workstations" +#define CONFIG_UNKNOWN_STR_DEFAULT "unknown_str" +#define CONFIG_MUNGED_DIAL_DEFAULT "munged_dial" +#define CONFIG_UID_DEFAULT "uid" +#define CONFIG_GID_DEFAULT "gid" +#define CONFIG_USER_SID_DEFAULT "user_sid" +#define CONFIG_GROUP_SID_DEFAULT "group_sid" +#define CONFIG_LM_PW_DEFAULT "lm_pw" +#define CONFIG_NT_PW_DEFAULT "nt_pw" +#define CONFIG_PLAIN_PW_DEFAULT "NULL" +#define CONFIG_ACCT_CTRL_DEFAULT "acct_ctrl" +#define CONFIG_UNKNOWN_3_DEFAULT "unknown_3" +#define CONFIG_LOGON_DIVS_DEFAULT "logon_divs" +#define CONFIG_HOURS_LEN_DEFAULT "hours_len" +#define CONFIG_UNKNOWN_5_DEFAULT "unknown_5" +#define CONFIG_UNKNOWN_6_DEFAULT "unknown_6" +#define CONFIG_HOST_DEFAULT "localhost" +#define CONFIG_USER_DEFAULT "samba" +#define CONFIG_PASS_DEFAULT "" +#define CONFIG_PORT_DEFAULT "3306" +#define CONFIG_DB_DEFAULT "samba" + +static int mysqlsam_debug_level = DBGC_ALL; + +#undef DBGC_CLASS +#define DBGC_CLASS mysqlsam_debug_level + +PDB_MODULE_VERSIONING_MAGIC + +typedef struct pdb_mysql_data { + MYSQL *handle; + MYSQL_RES *pwent; + char *location; +} pdb_mysql_data; + +/* Used to construct insert and update queries */ + +typedef struct pdb_mysql_query { + char update; + TALLOC_CTX *mem_ctx; + char *part1; + char *part2; +} pdb_mysql_query; + +#define SET_DATA(data,methods) { \ + if(!methods){ \ + DEBUG(0, ("invalid methods!\n")); \ + return False; \ + } \ + data = (struct pdb_mysql_data *)methods->private_data; \ + if(!data || !(data->handle)){ \ + DEBUG(0, ("invalid handle!\n")); \ + return False; \ + } \ +} +void +pdb_mysql_int_field(struct pdb_methods *m, + struct pdb_mysql_query *q, char *name, int value) +{ + if (!name || strchr(name, '\'')) + return; /* This field shouldn't be set by us */ + + if (q->update) { + q->part1 = + talloc_asprintf_append(q->mem_ctx, q->part1, + "%s = %d,", name, value); + } else { + q->part1 = + talloc_asprintf_append(q->mem_ctx, q->part1, "%s,", name); + q->part2 = + talloc_asprintf_append(q->mem_ctx, q->part2, "%d,", value); + } +} + +static BOOL +pdb_mysql_string_field(struct pdb_methods *methods, + struct pdb_mysql_query *q, + char *name, const char *value) +{ + char *esc_value; + struct pdb_mysql_data *data; + + SET_DATA(data, methods); + + if (!name || !value || !strcmp(value, "") || strchr(name, '\'')) + return False; /* This field shouldn't be set by module */ + + esc_value = malloc(strlen(value) * 2 + 1); + mysql_real_escape_string(data->handle, esc_value, (char *) value, + strlen(value)); + + if (q->update) { + q->part1 = + talloc_asprintf_append(q->mem_ctx, q->part1, + "%s = '%s',", name, esc_value); + } else { + q->part1 = + talloc_asprintf_append(q->mem_ctx, q->part1, "%s,", name); + q->part2 = + talloc_asprintf_append(q->mem_ctx, q->part2, "'%s',", + esc_value); + } + + SAFE_FREE(esc_value); + + return True; +} + +static char * +config_value(pdb_mysql_data * data, char *name, char *default_value) +{ + if (lp_parm_string(NULL, data->location, name)) + return lp_parm_string(NULL, data->location, name); + + return default_value; +} + +static char * +config_value_write(pdb_mysql_data * data, char *name, char *default_value) +{ + char *v = config_value(data, name, NULL); + char *write; + + if (!v) + return default_value; + + write = strchr(v, ':'); + + /* Default to the same field as read field */ + if (!write) + return v; + + write++; + + /* If the field is 0 chars long, we shouldn't write to it */ + if (!strlen(write) || !strcmp(write, "NULL")) + return NULL; + + /* Otherwise, use the additionally specified */ + return write; +} + +static const char * +config_value_read(pdb_mysql_data * data, char *name, char *default_value) +{ + char *v = config_value(data, name, NULL); + char *write; + + if (!v) + return default_value; + + write = strchr(v, ':'); + + /* If no write is specified, there are no problems */ + if (!write) { + if (strlen(v) == 0) + return "NULL"; + return v; + } + + /* Otherwise, we have to cut the ':write_part' */ + *write = '\0'; + if (strlen(v) == 0) + return "NULL"; + + return v; +} + +/* Wrapper for atol that returns 0 if 'a' points to NULL */ +static long +xatol(char *a) +{ + long ret = 0; + + if (a != NULL) + ret = atol(a); + + return ret; +} + +static BOOL +row_to_sam_account(MYSQL_RES * r, SAM_ACCOUNT * u) +{ + MYSQL_ROW row; + pstring temp; + unsigned int num_fields; + unsigned long *lengths; + DOM_SID sid; + + num_fields = mysql_num_fields(r); + row = mysql_fetch_row(r); + if (!row) + return False; + + pdb_set_logon_time(u, xatol(row[0]), FALSE); + pdb_set_logoff_time(u, xatol(row[1]), FALSE); + pdb_set_kickoff_time(u, xatol(row[2]), FALSE); + pdb_set_pass_last_set_time(u, xatol(row[3])); + pdb_set_pass_can_change_time(u, xatol(row[4]), FALSE); + pdb_set_pass_must_change_time(u, xatol(row[5]), FALSE); + pdb_set_username(u, row[6]); + pdb_set_domain(u, row[7]); + pdb_set_nt_username(u, row[8]); + pdb_set_fullname(u, row[9]); + pdb_set_homedir(u, row[10], True); + pdb_set_dir_drive(u, row[11], True); + pdb_set_logon_script(u, row[12], True); + pdb_set_profile_path(u, row[13], True); + pdb_set_acct_desc(u, row[14]); + pdb_set_workstations(u, row[15]); + pdb_set_unknown_str(u, row[16]); + pdb_set_munged_dial(u, row[17]); + + if (row[18]) + pdb_set_uid(u, xatol(row[18])); + if (row[19]) + pdb_set_gid(u, xatol(row[19])); + + string_to_sid(&sid, row[20]); + pdb_set_user_sid(u, &sid); + string_to_sid(&sid, row[21]); + pdb_set_group_sid(u, &sid); + + if (pdb_gethexpwd(row[22], temp)) + pdb_set_lanman_passwd(u, temp); + if (pdb_gethexpwd(row[23], temp)) + pdb_set_nt_passwd(u, temp); + + /* Only use plaintext password storage when lanman and nt are + * NOT used */ + if (!row[22] || !row[23]) + pdb_set_plaintext_passwd(u, row[24]); + + pdb_set_acct_ctrl(u, xatol(row[25])); + pdb_set_unknown_3(u, xatol(row[26])); + pdb_set_logon_divs(u, xatol(row[27])); + pdb_set_hours_len(u, xatol(row[28])); + pdb_set_unknown_5(u, xatol(row[29])); + pdb_set_unknown_6(u, xatol(row[30])); + + return True; +} + +static BOOL +mysqlsam_setsampwent(struct pdb_methods *methods, BOOL update) +{ + struct pdb_mysql_data *data = + (struct pdb_mysql_data *) methods->private_data; + char *query; + int ret; + + if (!data || !(data->handle)) { + DEBUG(0, ("invalid handle!\n")); + return False; + } + + asprintf(&query, + "SELECT %s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s FROM %s", + config_value_read(data, "logon time column", + CONFIG_LOGON_TIME_DEFAULT), + config_value_read(data, "logoff time column", + CONFIG_LOGOFF_TIME_DEFAULT), + config_value_read(data, "kickoff time column", + CONFIG_KICKOFF_TIME_DEFAULT), + config_value_read(data, "pass last set time column", + CONFIG_PASS_LAST_SET_TIME_DEFAULT), + config_value_read(data, "pass can change time column", + CONFIG_PASS_CAN_CHANGE_TIME_DEFAULT), + config_value_read(data, "pass must change time column", + CONFIG_PASS_MUST_CHANGE_TIME_DEFAULT), + config_value_read(data, "username column", + CONFIG_USERNAME_DEFAULT), + config_value_read(data, "domain column", + CONFIG_DOMAIN_DEFAULT), + config_value_read(data, "nt username column", + CONFIG_NT_USERNAME_DEFAULT), + config_value_read(data, "fullname column", + CONFIG_FULLNAME_DEFAULT), + config_value_read(data, "home dir column", + CONFIG_HOME_DIR_DEFAULT), + config_value_read(data, "dir drive column", + CONFIG_DIR_DRIVE_DEFAULT), + config_value_read(data, "logon script column", + CONFIG_LOGON_SCRIPT_DEFAULT), + config_value_read(data, "profile path column", + CONFIG_PROFILE_PATH_DEFAULT), + config_value_read(data, "acct desc column", + CONFIG_ACCT_DESC_DEFAULT), + config_value_read(data, "workstations column", + CONFIG_WORKSTATIONS_DEFAULT), + config_value_read(data, "unknown string column", + CONFIG_UNKNOWN_STR_DEFAULT), + config_value_read(data, "munged dial column", + CONFIG_MUNGED_DIAL_DEFAULT), + config_value_read(data, "uid column", CONFIG_UID_DEFAULT), + config_value_read(data, "gid column", CONFIG_GID_DEFAULT), + config_value_read(data, "user sid column", + CONFIG_USER_SID_DEFAULT), + config_value_read(data, "group sid column", + CONFIG_GROUP_SID_DEFAULT), + config_value_read(data, "lanman pass column", + CONFIG_LM_PW_DEFAULT), + config_value_read(data, "nt pass column", + CONFIG_NT_PW_DEFAULT), + config_value_read(data, "plain pass column", + CONFIG_PLAIN_PW_DEFAULT), + config_value_read(data, "acct ctrl column", + CONFIG_ACCT_CTRL_DEFAULT), + config_value_read(data, "unknown 3 column", + CONFIG_UNKNOWN_3_DEFAULT), + config_value_read(data, "logon divs column", + CONFIG_LOGON_DIVS_DEFAULT), + config_value_read(data, "hours len column", + CONFIG_HOURS_LEN_DEFAULT), + config_value_read(data, "unknown 5 column", + CONFIG_UNKNOWN_5_DEFAULT), + config_value_read(data, "unknown 6 column", + CONFIG_UNKNOWN_6_DEFAULT), + config_value(data, "table", CONFIG_TABLE_DEFAULT) + ); + + ret = mysql_query(data->handle, query); + SAFE_FREE(query); + + if (ret) { + DEBUG(0, + ("Error executing query: %s\n", mysql_error(data->handle))); + return False; + } + + data->pwent = mysql_store_result(data->handle); + + if (data->pwent == NULL) { + DEBUG(0, + ("Error storing results: %s\n", mysql_error(data->handle))); + return False; + } + + DEBUG(5, + ("mysqlsam_setsampwent succeeded(%d results)!\n", + mysql_num_fields(data->pwent))); + + return True; +} + +/*************************************************************** + End enumeration of the passwd list. + ****************************************************************/ + +static void +mysqlsam_endsampwent(struct pdb_methods *methods) +{ + struct pdb_mysql_data *data = + (struct pdb_mysql_data *) methods->private_data; + + if (data == NULL) { + DEBUG(0, ("invalid handle!\n")); + return; + } + + if (data->pwent != NULL) + mysql_free_result(data->pwent); + + data->pwent = NULL; + + DEBUG(5, ("mysql_endsampwent called\n")); +} + +/***************************************************************** + Get one SAM_ACCOUNT from the list (next in line) + *****************************************************************/ + +static BOOL +mysqlsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT * user) +{ + struct pdb_mysql_data *data; + + SET_DATA(data, methods); + + if (data->pwent == NULL) { + DEBUG(0, ("invalid pwent\n")); + return False; + } + + return row_to_sam_account(data->pwent, user); +} + +BOOL +mysqlsam_select_by_field(struct pdb_methods * methods, SAM_ACCOUNT * user, + const char *field, const char *sname) +{ + char *esc_sname; + char *query; + int ret; + MYSQL_RES *res; + struct pdb_mysql_data *data; + + SET_DATA(data, methods); + + esc_sname = malloc(strlen(sname) * 2 + 1); + if (!esc_sname) { + DEBUG(0, ("Not enough memory available!\n")); + return False; + } + + DEBUG(5, + ("mysqlsam_select_by_field: getting data where %s = %s(nonescaped)\n", + field, sname)); + + /* Escape sname */ + mysql_real_escape_string(data->handle, esc_sname, (char *) sname, + strlen(sname)); + + if (user == NULL) { + DEBUG(0, ("pdb_getsampwnam: SAM_ACCOUNT is NULL.\n")); + SAFE_FREE(esc_sname); + return False; + } + + asprintf(&query, + "SELECT %s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s FROM %s WHERE %s = '%s'", + config_value_read(data, "logon time column", + CONFIG_LOGON_TIME_DEFAULT), + config_value_read(data, "logoff time column", + CONFIG_LOGOFF_TIME_DEFAULT), + config_value_read(data, "kickoff time column", + CONFIG_KICKOFF_TIME_DEFAULT), + config_value_read(data, "pass last set time column", + CONFIG_PASS_LAST_SET_TIME_DEFAULT), + config_value_read(data, "pass can change time column", + CONFIG_PASS_CAN_CHANGE_TIME_DEFAULT), + config_value_read(data, "pass must change time column", + CONFIG_PASS_MUST_CHANGE_TIME_DEFAULT), + config_value_read(data, "username column", + CONFIG_USERNAME_DEFAULT), + config_value_read(data, "domain column", + CONFIG_DOMAIN_DEFAULT), + config_value_read(data, "nt username column", + CONFIG_NT_USERNAME_DEFAULT), + config_value_read(data, "fullname column", + CONFIG_FULLNAME_DEFAULT), + config_value_read(data, "home dir column", + CONFIG_HOME_DIR_DEFAULT), + config_value_read(data, "dir drive column", + CONFIG_DIR_DRIVE_DEFAULT), + config_value_read(data, "logon script column", + CONFIG_LOGON_SCRIPT_DEFAULT), + config_value_read(data, "profile path column", + CONFIG_PROFILE_PATH_DEFAULT), + config_value_read(data, "acct desc column", + CONFIG_ACCT_DESC_DEFAULT), + config_value_read(data, "workstations column", + CONFIG_WORKSTATIONS_DEFAULT), + config_value_read(data, "unknown string column", + CONFIG_UNKNOWN_STR_DEFAULT), + config_value_read(data, "munged dial column", + CONFIG_MUNGED_DIAL_DEFAULT), + config_value_read(data, "uid column", CONFIG_UID_DEFAULT), + config_value_read(data, "gid column", CONFIG_GID_DEFAULT), + config_value_read(data, "user sid column", + CONFIG_USER_SID_DEFAULT), + config_value_read(data, "group sid column", + CONFIG_GROUP_SID_DEFAULT), + config_value_read(data, "lanman pass column", + CONFIG_LM_PW_DEFAULT), + config_value_read(data, "nt pass column", + CONFIG_NT_PW_DEFAULT), + config_value_read(data, "plain pass column", + CONFIG_PLAIN_PW_DEFAULT), + config_value_read(data, "acct ctrl column", + CONFIG_ACCT_CTRL_DEFAULT), + config_value_read(data, "unknown 3 column", + CONFIG_UNKNOWN_3_DEFAULT), + config_value_read(data, "logon divs column", + CONFIG_LOGON_DIVS_DEFAULT), + config_value_read(data, "hours len column", + CONFIG_HOURS_LEN_DEFAULT), + config_value_read(data, "unknown 5 column", + CONFIG_UNKNOWN_5_DEFAULT), + config_value_read(data, "unknown 6 column", + CONFIG_UNKNOWN_6_DEFAULT), + config_value(data, "table", CONFIG_TABLE_DEFAULT), field, + esc_sname); + + SAFE_FREE(esc_sname); + + ret = mysql_query(data->handle, query); + + SAFE_FREE(query); + + if (ret) { + DEBUG(0, + ("Error while executing MySQL query: %s\n", + mysql_error(data->handle))); + return False; + } + + res = mysql_store_result(data->handle); + if (res == NULL) { + DEBUG(0, + ("Error storing results: %s\n", mysql_error(data->handle))); + return False; + } + + ret = row_to_sam_account(res, user); + mysql_free_result(res); + + return ret; +} + +/****************************************************************** + Lookup a name in the SAM database + ******************************************************************/ + +static BOOL +mysqlsam_getsampwnam(struct pdb_methods *methods, SAM_ACCOUNT * user, + const char *sname) +{ + struct pdb_mysql_data *data; + + SET_DATA(data, methods); + + if (!sname) { + DEBUG(0, ("invalid name specified")); + return False; + } + return mysqlsam_select_by_field(methods, user, + config_value_read(data, "username column", + CONFIG_USERNAME_DEFAULT), sname); +} + + +/*************************************************************************** + Search by sid + **************************************************************************/ + +static BOOL +mysqlsam_getsampwsid(struct pdb_methods *methods, SAM_ACCOUNT * user, + const DOM_SID * sid) +{ + BOOL ret = False; + struct pdb_mysql_data *data; + fstring sid_str; + + SET_DATA(data, methods); + + sid_to_string(sid_str, sid); + + ret = + mysqlsam_select_by_field(methods, user, + config_value_read(data, "user sid column", + CONFIG_USER_SID_DEFAULT), sid_str); + + return ret; +} + +/*************************************************************************** + Delete a SAM_ACCOUNT + ****************************************************************************/ + +static BOOL +mysqlsam_delete_sam_account(struct pdb_methods *methods, + SAM_ACCOUNT * sam_pass) +{ + const char *sname = pdb_get_username(sam_pass); + char *esc; + char *query; + int ret; + struct pdb_mysql_data *data; + + SET_DATA(data, methods); + + if (!methods) { + DEBUG(0, ("invalid methods!\n")); + return False; + } + + data = (struct pdb_mysql_data *) methods->private_data; + if (!data || !(data->handle)) { + DEBUG(0, ("invalid handle!\n")); + return False; + } + + if (!sname) { + DEBUG(0, ("invalid name specified\n")); + return False; + } + + /* Escape sname */ + esc = malloc(strlen(sname) * 2 + 1); + if (!esc) { + DEBUG(0, ("Can't allocate memory to store escaped name\n")); + return False; + } + mysql_real_escape_string(data->handle, esc, (char *) sname, + strlen(sname)); + + asprintf(&query, "DELETE FROM %s WHERE %s = '%s'", + config_value(data, "table", CONFIG_TABLE_DEFAULT), + config_value_read(data, "username column", + CONFIG_USERNAME_DEFAULT), esc); + + SAFE_FREE(esc); + + ret = mysql_query(data->handle, query); + + SAFE_FREE(query); + + if (ret) { + DEBUG(0, + ("Error while executing query: %s\n", + mysql_error(data->handle))); + return False; + } + + DEBUG(5, ("User '%s' deleted\n", sname)); + return True; +} + +static BOOL +mysqlsam_replace_sam_account(struct pdb_methods *methods, + const SAM_ACCOUNT * newpwd, char isupdate) +{ + pstring temp; + uint32 store = pdb_get_init_flag(newpwd); + struct pdb_mysql_data *data; + pdb_mysql_query query; + fstring sid_str; + + if (!methods) { + DEBUG(0, ("invalid methods!\n")); + return False; + } + + data = (struct pdb_mysql_data *) methods->private_data; + if (data == NULL || data->handle == NULL) { + DEBUG(0, ("invalid handle!\n")); + return False; + } + query.update = isupdate; + + /* I know this is somewhat overkill but only the talloc + * functions have asprint_append and the 'normal' asprintf + * is a GNU extension */ + query.mem_ctx = talloc_init(); + query.part2 = talloc_asprintf(query.mem_ctx, "%s", ""); + if (query.update) { + query.part1 = + talloc_asprintf(query.mem_ctx, "UPDATE %s SET ", + config_value(data, "table", + CONFIG_TABLE_DEFAULT)); + } else { + query.part1 = + talloc_asprintf(query.mem_ctx, "INSERT INTO %s (", + config_value(data, "table", + CONFIG_TABLE_DEFAULT)); + } + + pdb_mysql_int_field(methods, &query, + config_value_write(data, "acct ctrl column", + CONFIG_ACCT_CTRL_DEFAULT), + pdb_get_acct_ctrl(newpwd)); + + if (store & FLAG_SAM_LOGONTIME) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "logon time column", + CONFIG_LOGON_TIME_DEFAULT), + pdb_get_logon_time(newpwd)); + } + + if (store & FLAG_SAM_LOGOFFTIME) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "logoff time column", + CONFIG_LOGOFF_TIME_DEFAULT), + pdb_get_logoff_time(newpwd)); + } + + if (store & FLAG_SAM_KICKOFFTIME) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "kickoff time column", + CONFIG_KICKOFF_TIME_DEFAULT), + pdb_get_kickoff_time(newpwd)); + } + + if (store & FLAG_SAM_CANCHANGETIME) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "pass can change time column", + CONFIG_PASS_CAN_CHANGE_TIME_DEFAULT), + pdb_get_pass_can_change_time(newpwd)); + } + + if (store & FLAG_SAM_MUSTCHANGETIME) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "pass must change time column", + CONFIG_PASS_MUST_CHANGE_TIME_DEFAULT), + pdb_get_pass_must_change_time(newpwd)); + } + + if (pdb_get_pass_last_set_time(newpwd)) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "pass must change time column", + CONFIG_PASS_LAST_SET_TIME_DEFAULT), + pdb_get_pass_last_set_time(newpwd)); + } + + if (pdb_get_hours_len(newpwd)) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "hours len column", + CONFIG_HOURS_LEN_DEFAULT), + pdb_get_hours_len(newpwd)); + } + + if (pdb_get_logon_divs(newpwd)) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, + "logon divs column", + CONFIG_LOGON_DIVS_DEFAULT), + pdb_get_logon_divs(newpwd)); + } + + if (store & FLAG_SAM_UID) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, "uid column", + CONFIG_UID_DEFAULT), + pdb_get_uid(newpwd)); + } + + if (store & FLAG_SAM_GID) { + pdb_mysql_int_field(methods, &query, + config_value_write(data, "gid column", + CONFIG_GID_DEFAULT), + pdb_get_gid(newpwd)); + } + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "user sid column", + CONFIG_USER_SID_DEFAULT), + sid_to_string(sid_str, (DOM_SID *) + pdb_get_user_sid(newpwd))); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "group sid column", + CONFIG_GROUP_SID_DEFAULT), + sid_to_string(sid_str, (DOM_SID *) + pdb_get_group_sid(newpwd))); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "username column", + CONFIG_USERNAME_DEFAULT), + pdb_get_username(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "domain column", + CONFIG_DOMAIN_DEFAULT), + pdb_get_domain(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, + "nt username column", + CONFIG_NT_USERNAME_DEFAULT), + pdb_get_nt_username(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "fullname column", + CONFIG_FULLNAME_DEFAULT), + pdb_get_fullname(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, + "logon script column", + CONFIG_LOGON_SCRIPT_DEFAULT), + pdb_get_logon_script(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, + "profile path column", + CONFIG_PROFILE_PATH_DEFAULT), + pdb_get_profile_path(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "dir drive column", + CONFIG_DIR_DRIVE_DEFAULT), + pdb_get_dir_drive(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, "home dir column", + CONFIG_HOME_DIR_DEFAULT), + pdb_get_homedir(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, + "workstations column", + CONFIG_WORKSTATIONS_DEFAULT), + pdb_get_workstations(newpwd)); + + pdb_mysql_string_field(methods, &query, + config_value_write(data, + "unknown string column", + CONFIG_UNKNOWN_STR_DEFAULT), + pdb_get_workstations(newpwd)); + + pdb_sethexpwd(temp, pdb_get_lanman_passwd(newpwd), + pdb_get_acct_ctrl(newpwd)); + pdb_mysql_string_field(methods, &query, + config_value_write(data, + "lanman pass column", + CONFIG_LM_PW_DEFAULT), temp); + + pdb_sethexpwd(temp, pdb_get_nt_passwd(newpwd), + pdb_get_acct_ctrl(newpwd)); + pdb_mysql_string_field(methods, &query, + config_value_write(data, "nt pass column", + CONFIG_NT_PW_DEFAULT), temp); + + if (query.update) { + query.part1[strlen(query.part1) - 1] = '\0'; + query.part1 = + talloc_asprintf_append(query.mem_ctx, query.part1, + " WHERE %s = '%s'", + config_value_read(data, + "user sid column", + CONFIG_USER_SID_DEFAULT), + sid_to_string(sid_str, (DOM_SID *) + pdb_get_user_sid + (newpwd))); + } else { + query.part2[strlen(query.part2) - 1] = ')'; + query.part1[strlen(query.part1) - 1] = ')'; + query.part1 = + talloc_asprintf_append(query.mem_ctx, query.part1, + " VALUES (%s", query.part2); + } + + DEBUG(0, ("%s\n", query.part1)); + /* Execute the query */ + if (mysql_query(data->handle, query.part1)) { + DEBUG(0, + ("Error executing %s, %s\n", query.part1, + mysql_error(data->handle))); + return False; + } + talloc_destroy(query.mem_ctx); + return True; +} + +static BOOL +mysqlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT * newpwd) +{ + return mysqlsam_replace_sam_account(methods, newpwd, 0); +} + +static BOOL +mysqlsam_update_sam_account(struct pdb_methods *methods, + SAM_ACCOUNT * newpwd) +{ + return mysqlsam_replace_sam_account(methods, newpwd, 1); +} + +NTSTATUS +pdb_init(PDB_CONTEXT * pdb_context, PDB_METHODS ** pdb_method, + char *location) +{ + NTSTATUS nt_status; + struct pdb_mysql_data *data; + + mysqlsam_debug_level = debug_add_class("mysqlsam"); + if (mysqlsam_debug_level == -1) { + mysqlsam_debug_level = DBGC_ALL; + DEBUG(0, + ("mysqlsam: Couldn't register custom debugging class!\n")); + } + + if (!pdb_context) { + DEBUG(0, ("invalid pdb_methods specified\n")); + return NT_STATUS_UNSUCCESSFUL; + } + + if (!NT_STATUS_IS_OK + (nt_status = make_pdb_methods(pdb_context->mem_ctx, pdb_method))) { + return nt_status; + } + + (*pdb_method)->name = "mysqlsam"; + + (*pdb_method)->setsampwent = mysqlsam_setsampwent; + (*pdb_method)->endsampwent = mysqlsam_endsampwent; + (*pdb_method)->getsampwent = mysqlsam_getsampwent; + (*pdb_method)->getsampwnam = mysqlsam_getsampwnam; + (*pdb_method)->getsampwsid = mysqlsam_getsampwsid; + (*pdb_method)->add_sam_account = mysqlsam_add_sam_account; + (*pdb_method)->update_sam_account = mysqlsam_update_sam_account; + (*pdb_method)->delete_sam_account = mysqlsam_delete_sam_account; + + data = talloc(pdb_context->mem_ctx, sizeof(struct pdb_mysql_data)); + (*pdb_method)->private_data = data; + data->handle = NULL; + data->pwent = NULL; + + if (!location) { + DEBUG(0, ("No identifier specified. See README for details\n")); + return NT_STATUS_INVALID_PARAMETER; + } + + data->location = smb_xstrdup(location); + + DEBUG(1, + ("Connecting to database server, host: %s, user: %s, password: %s, database: %s, port: %d\n", + config_value(data, "mysql host", CONFIG_HOST_DEFAULT), + config_value(data, "mysql user", CONFIG_USER_DEFAULT), + config_value(data, "mysql password", CONFIG_PASS_DEFAULT), + config_value(data, "mysql database", CONFIG_DB_DEFAULT), + xatol(config_value(data, "mysql port", CONFIG_PORT_DEFAULT)))); + + /* Do the mysql initialization */ + data->handle = mysql_init(NULL); + if (!data->handle) { + DEBUG(0, ("Failed to connect to server\n")); + return NT_STATUS_UNSUCCESSFUL; + } + /* Process correct entry in $HOME/.my.conf */ + if (!mysql_real_connect(data->handle, + config_value(data, "mysql host", CONFIG_HOST_DEFAULT), + config_value(data, "mysql user", CONFIG_USER_DEFAULT), + config_value(data, "mysql password", CONFIG_PASS_DEFAULT), + config_value(data, "mysql database", CONFIG_DB_DEFAULT), + xatol(config_value (data, "mysql port", CONFIG_PORT_DEFAULT)), + NULL, 0)) { + DEBUG(0, + ("Failed to connect to mysql database: error: %s\n", + mysql_error(data->handle))); + return NT_STATUS_UNSUCCESSFUL; + } + + DEBUG(5, ("Connected to mysql db\n")); + + return NT_STATUS_OK; +} diff --git a/examples/pdb/pdb_test.c b/examples/pdb/pdb_test.c index d2722d2e036..b46fe24bd6a 100644 --- a/examples/pdb/pdb_test.c +++ b/examples/pdb/pdb_test.c @@ -71,7 +71,7 @@ static BOOL testsam_getsampwnam (struct pdb_methods *methods, SAM_ACCOUNT *user, Search by sid **************************************************************************/ -static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, DOM_SID sid) +static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, const DOM_SID *sid) { DEBUG(10, ("testsam_getsampwsid called\n")); return False; @@ -81,7 +81,7 @@ static BOOL testsam_getsampwsid (struct pdb_methods *methods, SAM_ACCOUNT *user, Delete a SAM_ACCOUNT ****************************************************************************/ -static BOOL testsam_delete_sam_account(struct pdb_methods *methods, const SAM_ACCOUNT *sam_pass) +static BOOL testsam_delete_sam_account(struct pdb_methods *methods, SAM_ACCOUNT *sam_pass) { DEBUG(10, ("testsam_delete_sam_account called\n")); return False; @@ -91,7 +91,7 @@ static BOOL testsam_delete_sam_account(struct pdb_methods *methods, const SAM_AC Modifies an existing SAM_ACCOUNT ****************************************************************************/ -static BOOL testsam_update_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd) +static BOOL testsam_update_sam_account (struct pdb_methods *methods, SAM_ACCOUNT *newpwd) { DEBUG(10, ("testsam_update_sam_account called\n")); return False; @@ -101,7 +101,7 @@ static BOOL testsam_update_sam_account (struct pdb_methods *methods, const SAM_A Adds an existing SAM_ACCOUNT ****************************************************************************/ -static BOOL testsam_add_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd) +static BOOL testsam_add_sam_account (struct pdb_methods *methods, SAM_ACCOUNT *newpwd) { DEBUG(10, ("testsam_add_sam_account called\n")); return False; diff --git a/examples/pdb/xml/ChangeLog b/examples/pdb/xml/ChangeLog new file mode 100644 index 00000000000..e44fa3bd30f --- /dev/null +++ b/examples/pdb/xml/ChangeLog @@ -0,0 +1,13 @@ +** This file is now deprecated - use CVS' log features ** + +2002-06-13 Jelmer Vernooij + * Use SID's instead of RID's (just like samba-HEAD CVS) + * Released 1.1 + +2002-05-26 Jelmer Vernooij + * Update read support (didn't support all elements yet) + * Released 1.0 + +2002-05-26 Jelmer Vernooij + * Initial release + * Released 0.5 diff --git a/examples/pdb/xml/Makefile.in b/examples/pdb/xml/Makefile.in new file mode 100644 index 00000000000..87d4546972c --- /dev/null +++ b/examples/pdb/xml/Makefile.in @@ -0,0 +1,33 @@ +PDB_OBJS = pdb_xml.so +PDB_CFLAGS = `xml2-config --cflags` +PDB_LDFLAGS = `xml2-config --libs` + +include $(MAKEFILE) + +CC = @CC@ +LIBTOOL = libtool +CFLAGS = @CFLAGS@ $(PDB_CFLAGS) +CPPFLAGS = @CPPFLAGS@ $(PDB_CPPFLAGS) +LDFLAGS = @LDFLAGS@ $(PDB_LDFLAGS) +LDSHFLAGS = -shared +srcdir = @builddir@ +FLAGS = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper -I. $(CPPFLAGS) -I$(srcdir) + +# Default target + +default: $(PDB_OBJS) + +# Pattern rules + +%.so: %.lo + $(LIBTOOL) $(CC) $(LDSHFLAGS) $(LDFLAGS) -o $@ $< + +%.lo: %.c + $(LIBTOOL) $(CC) $(FLAGS) -c $< + +# Misc targets + +clean: + rm -rf .libs + rm -f core *~ *% *.bak \ + $(PDB_OBJS) $(PDB_OBJS:.so=.o) $(PDB_OBJS:.so=.lo) diff --git a/examples/pdb/xml/README b/examples/pdb/xml/README new file mode 100644 index 00000000000..afb08fdb4fa --- /dev/null +++ b/examples/pdb/xml/README @@ -0,0 +1,14 @@ +Readme for samba pdb xml 0.5 +-- +This module requires libxml2 to be installed. + +The usage of pdb_xml is pretty straightforward. To export data, use: + +pdbedit -e plugin:/usr/lib/samba/pdb_xml.so:filename + +(where filename is the name of the file to put the data in) +To import data, use: + +pdbedit -i plugin:/usr/lib/samba/pdb_xml.so:filename -e + +Where filename is the name to read the data from and to put it in. diff --git a/examples/pdb/xml/TODO b/examples/pdb/xml/TODO new file mode 100644 index 00000000000..3947bb68be1 --- /dev/null +++ b/examples/pdb/xml/TODO @@ -0,0 +1,6 @@ +- Be faster. Don't rewrite the whole file when adding a user, but store + it in the memory and save it when exiting. Requires changes to samba source. + Gives the ability to read/write to standard input/output +- Do locking! +- Better names! +- Support stdin ? diff --git a/examples/pdb/xml/pdb_xml.c b/examples/pdb/xml/pdb_xml.c new file mode 100644 index 00000000000..f237a7da9d6 --- /dev/null +++ b/examples/pdb/xml/pdb_xml.c @@ -0,0 +1,561 @@ + +/* + * XML password backend for samba + * Copyright (C) Jelmer Vernooij 2002 + * Some parts based on the libxml gjobread example by Daniel Veillard + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 675 + * Mass Ave, Cambridge, MA 02139, USA. + */ + +/* FIXME: Support stdin input by using '-' */ + +#define XML_URL "http://www.samba.org/ns" + +#include "includes.h" + +#include +#include + +static int xmlsam_debug_level = DBGC_ALL; + +#undef DBGC_CLASS +#define DBGC_CLASS xmlsam_debug_level + +PDB_MODULE_VERSIONING_MAGIC + +static char * iota(int a) { + static char tmp[10]; + + snprintf(tmp, 9, "%d", a); + return tmp; +} + +BOOL +parsePass(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SAM_ACCOUNT * u) +{ + pstring temp; + + cur = cur->xmlChildrenNode; + while (cur != NULL) { + if (strcmp(cur->name, "crypt")) + DEBUG(0, ("Unknown element %s\n", cur->name)); + else { + if (!strcmp(xmlGetProp(cur, "type"), "nt") + && + pdb_gethexpwd(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1), temp)) + pdb_set_nt_passwd(u, temp); + else if (!strcmp(xmlGetProp(cur, "type"), "lanman") + && + pdb_gethexpwd(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1), temp)) + pdb_set_lanman_passwd(u, temp); + else + DEBUG(0, + ("Unknown crypt type: %s\n", + xmlGetProp(cur, "type"))); + } + cur = cur->next; + } + return True; +} + +BOOL +parseUser(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur, SAM_ACCOUNT * u) +{ + char *tmp; + DOM_SID sid; + + tmp = xmlGetProp(cur, "sid"); + if (tmp){ + string_to_sid(&sid, tmp); + pdb_set_user_sid(u, &sid); + } + tmp = xmlGetProp(cur, "uid"); + if (tmp) + pdb_set_uid(u, atol(tmp)); + pdb_set_username(u, xmlGetProp(cur, "name")); + /* We don't care what the top level element name is */ + cur = cur->xmlChildrenNode; + while (cur != NULL) { + if ((!strcmp(cur->name, "group")) && (cur->ns == ns)) { + tmp = xmlGetProp(cur, "gid"); + if (tmp) + pdb_set_gid(u, atol(tmp)); + tmp = xmlGetProp(cur, "sid"); + if (tmp){ + string_to_sid(&sid, tmp); + pdb_set_group_sid(u, &sid); + } + } + + else if ((!strcmp(cur->name, "domain")) && (cur->ns == ns)) + pdb_set_domain(u, + xmlNodeListGetString(doc, cur->xmlChildrenNode, + 1)); + + else if (!strcmp(cur->name, "fullname") && cur->ns == ns) + pdb_set_fullname(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1)); + + else if (!strcmp(cur->name, "nt_username") && cur->ns == ns) + pdb_set_nt_username(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1)); + + else if (!strcmp(cur->name, "logon_script") && cur->ns == ns) + pdb_set_logon_script(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1), True); + + else if (!strcmp(cur->name, "profile_path") && cur->ns == ns) + pdb_set_profile_path(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1), True); + + else if (!strcmp(cur->name, "logon_time") && cur->ns == ns) + pdb_set_logon_time(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1)), True); + + else if (!strcmp(cur->name, "logoff_time") && cur->ns == ns) + pdb_set_logoff_time(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1)), + True); + + else if (!strcmp(cur->name, "kickoff_time") && cur->ns == ns) + pdb_set_kickoff_time(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1)), + True); + + else if (!strcmp(cur->name, "logon_divs") && cur->ns == ns) + pdb_set_logon_divs(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1))); + + else if (!strcmp(cur->name, "hours_len") && cur->ns == ns) + pdb_set_hours_len(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1))); + + else if (!strcmp(cur->name, "unknown_3") && cur->ns == ns) + pdb_set_unknown_3(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1))); + + else if (!strcmp(cur->name, "unknown_5") && cur->ns == ns) + pdb_set_unknown_5(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1))); + + else if (!strcmp(cur->name, "unknown_6") && cur->ns == ns) + pdb_set_unknown_6(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1))); + + else if (!strcmp(cur->name, "homedir") && cur->ns == ns) + pdb_set_homedir(u, + xmlNodeListGetString(doc, cur->xmlChildrenNode, + 1), True); + + else if (!strcmp(cur->name, "unknown_str") && cur->ns == ns) + pdb_set_unknown_str(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1)); + + else if (!strcmp(cur->name, "dir_drive") && cur->ns == ns) + pdb_set_dir_drive(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1), True); + + else if (!strcmp(cur->name, "munged_dial") && cur->ns == ns) + pdb_set_munged_dial(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1)); + + else if (!strcmp(cur->name, "acct_desc") && cur->ns == ns) + pdb_set_acct_desc(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1)); + + else if (!strcmp(cur->name, "acct_ctrl") && cur->ns == ns) + pdb_set_acct_ctrl(u, + atol(xmlNodeListGetString + (doc, cur->xmlChildrenNode, 1))); + + else if (!strcmp(cur->name, "workstations") && cur->ns == ns) + pdb_set_workstations(u, + xmlNodeListGetString(doc, + cur->xmlChildrenNode, + 1)); + + else if ((!strcmp(cur->name, "password")) && (cur->ns == ns)) { + tmp = xmlGetProp(cur, "last_set"); + if (tmp) + pdb_set_pass_last_set_time(u, atol(tmp)); + tmp = xmlGetProp(cur, "must_change"); + if (tmp) + pdb_set_pass_must_change_time(u, atol(tmp), True); + tmp = xmlGetProp(cur, "can_change"); + if (tmp) + pdb_set_pass_can_change_time(u, atol(tmp), True); + parsePass(doc, ns, cur, u); + } + + else + DEBUG(0, ("Unknown element %s\n", cur->name)); + cur = cur->next; + } + + return True; +} + +typedef struct pdb_xml { + char *location; + char written; + xmlDocPtr doc; + xmlNodePtr users; + xmlNodePtr pwent; + xmlNsPtr ns; +} pdb_xml; + +xmlNodePtr +parseSambaXMLFile(struct pdb_xml *data) +{ + xmlNodePtr cur; + + data->doc = xmlParseFile(data->location); + if (data->doc == NULL) + return NULL; + + cur = xmlDocGetRootElement(data->doc); + if (!cur) { + DEBUG(0, ("empty document\n")); + xmlFreeDoc(data->doc); + return NULL; + } + data->ns = xmlSearchNsByHref(data->doc, cur, XML_URL); + if (!data->ns) { + DEBUG(0, + ("document of the wrong type, samba user namespace not found\n")); + xmlFreeDoc(data->doc); + return NULL; + } + if (strcmp(cur->name, "samba")) { + DEBUG(0, ("document of the wrong type, root node != samba")); + xmlFreeDoc(data->doc); + return NULL; + } + + cur = cur->xmlChildrenNode; + while (cur && xmlIsBlankNode(cur)) { + cur = cur->next; + } + if (!cur) + return NULL; + if ((strcmp(cur->name, "users")) || (cur->ns != data->ns)) { + DEBUG(0, ("document of the wrong type, was '%s', users expected", + cur->name)); + DEBUG(0, ("xmlDocDump follows\n")); + xmlDocDump(stderr, data->doc); + DEBUG(0, ("xmlDocDump finished\n")); + xmlFreeDoc(data->doc); + return NULL; + } + data->users = cur; + cur = cur->xmlChildrenNode; + return cur; +} + +static BOOL +xmlsam_setsampwent(struct pdb_methods *methods, BOOL update) +{ + pdb_xml *data; + + if (!methods) { + DEBUG(0, ("Invalid methods\n")); + return False; + } + data = (pdb_xml *) methods->private_data; + if (!data) { + DEBUG(0, ("Invalid pdb_xml_data\n")); + return False; + } + data->pwent = parseSambaXMLFile(data); + if (!data->pwent) + return False; + return True; +} + +/*************************************************************** + End enumeration of the passwd list. + ****************************************************************/ + +static void +xmlsam_endsampwent(struct pdb_methods *methods) +{ + pdb_xml *data; + + if (!methods) { + DEBUG(0, ("Invalid methods\n")); + return; + } + + data = (pdb_xml *) methods->private_data; + + if (!data) { + DEBUG(0, ("Invalid pdb_xml_data\n")); + return; + } + + xmlFreeDoc(data->doc); + data->doc = NULL; + data->pwent = NULL; +} + +/***************************************************************** + Get one SAM_ACCOUNT from the list (next in line) + *****************************************************************/ + +static BOOL +xmlsam_getsampwent(struct pdb_methods *methods, SAM_ACCOUNT * user) +{ + pdb_xml *data; + + if (!methods) { + DEBUG(0, ("Invalid methods\n")); + return False; + } + data = (pdb_xml *) methods->private_data; + + if (!data) { + DEBUG(0, ("Invalid pdb_xml_data\n")); + return False; + } + + while (data->pwent) { + if ((!strcmp(data->pwent->name, "user")) && + (data->pwent->ns == data->ns)) { + + parseUser(data->doc, data->ns, data->pwent, user); + data->pwent = data->pwent->next; + return True; + } + data->pwent = data->pwent->next; + } + return False; +} + +/*************************************************************************** + Adds an existing SAM_ACCOUNT + ****************************************************************************/ + +static BOOL +xmlsam_add_sam_account(struct pdb_methods *methods, SAM_ACCOUNT * u) +{ + pstring temp; + fstring sid_str; + xmlNodePtr cur, user, pass, root; + pdb_xml *data; + uint32 store = pdb_get_init_flag(u); + + DEBUG(10, ("xmlsam_add_sam_account called!\n")); + + if (!methods) { + DEBUG(0, ("Invalid methods\n")); + return False; + } + + data = (pdb_xml *) methods->private_data; + if (!data) { + DEBUG(0, ("Invalid pdb_xml_data\n")); + return False; + } + + /* Create a new document if we can't open the current one */ + if (!parseSambaXMLFile(data)) { + DEBUG(0, ("Can't load current XML file, creating a new one\n")); + data->doc = xmlNewDoc(XML_DEFAULT_VERSION); + root = xmlNewDocNode(data->doc, NULL, "samba", NULL); + cur = xmlDocSetRootElement(data->doc, root); + data->ns = xmlNewNs(root, XML_URL, "samba"); + data->users = xmlNewChild(root, data->ns, "users", NULL); + } + + user = xmlNewChild(data->users, data->ns, "user", NULL); + xmlNewProp(user, "sid", + sid_to_string(sid_str, pdb_get_user_sid(u))); + if (store & FLAG_SAM_UID) + xmlNewProp(user, "uid", iota(pdb_get_uid(u))); + + if (pdb_get_username(u) && strcmp(pdb_get_username(u), "")) + xmlNewProp(user, "name", pdb_get_username(u)); + + cur = xmlNewChild(user, data->ns, "group", NULL); + + xmlNewProp(cur, "sid", + sid_to_string(sid_str, pdb_get_group_sid(u))); + if (store & FLAG_SAM_GID) + xmlNewProp(cur, "gid", iota(pdb_get_gid(u))); + + if (store & FLAG_SAM_LOGONTIME) + xmlNewChild(user, data->ns, "login_time", + iota(pdb_get_logon_time(u))); + + if (store & FLAG_SAM_LOGOFFTIME) + xmlNewChild(user, data->ns, "logoff_time", + iota(pdb_get_logoff_time(u))); + + if (store & FLAG_SAM_KICKOFFTIME) + xmlNewChild(user, data->ns, "kickoff_time", + iota(pdb_get_kickoff_time(u))); + + if (pdb_get_domain(u) && strcmp(pdb_get_domain(u), "")) + xmlNewChild(user, data->ns, "domain", pdb_get_domain(u)); + + if (pdb_get_nt_username(u) && strcmp(pdb_get_nt_username(u), "")) + xmlNewChild(user, data->ns, "nt_username", pdb_get_nt_username(u)); + + if (pdb_get_fullname(u) && strcmp(pdb_get_fullname(u), "")) + xmlNewChild(user, data->ns, "fullname", pdb_get_fullname(u)); + + if (pdb_get_homedir(u) && strcmp(pdb_get_homedir(u), "")) + xmlNewChild(user, data->ns, "homedir", pdb_get_homedir(u)); + + if (pdb_get_dir_drive(u) && strcmp(pdb_get_dir_drive(u), "")) + xmlNewChild(user, data->ns, "dir_drive", pdb_get_dir_drive(u)); + + if (pdb_get_logon_script(u) && strcmp(pdb_get_logon_script(u), "")) + xmlNewChild(user, data->ns, "logon_script", + pdb_get_logon_script(u)); + + if (pdb_get_profile_path(u) && strcmp(pdb_get_profile_path(u), "")) + xmlNewChild(user, data->ns, "profile_path", + pdb_get_profile_path(u)); + + if (pdb_get_acct_desc(u) && strcmp(pdb_get_acct_desc(u), "")) + xmlNewChild(user, data->ns, "acct_desc", pdb_get_acct_desc(u)); + + if (pdb_get_workstations(u) && strcmp(pdb_get_workstations(u), "")) + xmlNewChild(user, data->ns, "workstations", + pdb_get_workstations(u)); + + if (pdb_get_unknown_str(u) && strcmp(pdb_get_unknown_str(u), "")) + xmlNewChild(user, data->ns, "unknown_str", pdb_get_unknown_str(u)); + + if (pdb_get_munged_dial(u) && strcmp(pdb_get_munged_dial(u), "")) + xmlNewChild(user, data->ns, "munged_dial", pdb_get_munged_dial(u)); + + + /* Password stuff */ + pass = xmlNewChild(user, data->ns, "password", NULL); + if (pdb_get_pass_last_set_time(u)) + xmlNewProp(pass, "last_set", iota(pdb_get_pass_last_set_time(u))); + if (store & FLAG_SAM_CANCHANGETIME) + xmlNewProp(pass, "can_change", + iota(pdb_get_pass_can_change_time(u))); + + if (store & FLAG_SAM_MUSTCHANGETIME) + xmlNewProp(pass, "must_change", + iota(pdb_get_pass_must_change_time(u))); + + + if (pdb_get_lanman_passwd(u)) { + pdb_sethexpwd(temp, pdb_get_lanman_passwd(u), + pdb_get_acct_ctrl(u)); + cur = xmlNewChild(pass, data->ns, "crypt", temp); + xmlNewProp(cur, "type", "lanman"); + } + + if (pdb_get_nt_passwd(u)) { + pdb_sethexpwd(temp, pdb_get_nt_passwd(u), pdb_get_acct_ctrl(u)); + cur = xmlNewChild(pass, data->ns, "crypt", temp); + xmlNewProp(cur, "type", "nt"); + } + + xmlNewChild(user, data->ns, "acct_ctrl", iota(pdb_get_acct_ctrl(u))); + xmlNewChild(user, data->ns, "unknown_3", iota(pdb_get_unknown3(u))); + + if (pdb_get_logon_divs(u)) + xmlNewChild(user, data->ns, "logon_divs", + iota(pdb_get_logon_divs(u))); + + if (pdb_get_hours_len(u)) + xmlNewChild(user, data->ns, "hours_len", + iota(pdb_get_hours_len(u))); + + xmlNewChild(user, data->ns, "unknown_5", iota(pdb_get_unknown5(u))); + xmlNewChild(user, data->ns, "unknown_6", iota(pdb_get_unknown6(u))); + xmlSaveFile(data->location, data->doc); + + return True; +} + +NTSTATUS +pdb_init(PDB_CONTEXT * pdb_context, PDB_METHODS ** pdb_method, + const char *location) +{ + NTSTATUS nt_status; + pdb_xml *data; + + xmlsam_debug_level = debug_add_class("xmlsam"); + if (xmlsam_debug_level == -1) { + xmlsam_debug_level = DBGC_ALL; + DEBUG(0, ("xmlsam: Couldn't register custom debugging class!\n")); + } + + if (!pdb_context) { + DEBUG(0, ("invalid pdb_methods specified\n")); + return NT_STATUS_UNSUCCESSFUL; + } + + if (!NT_STATUS_IS_OK + (nt_status = make_pdb_methods(pdb_context->mem_ctx, pdb_method))) { + return nt_status; + } + + (*pdb_method)->name = "xmlsam"; + + (*pdb_method)->setsampwent = xmlsam_setsampwent; + (*pdb_method)->endsampwent = xmlsam_endsampwent; + (*pdb_method)->getsampwent = xmlsam_getsampwent; + (*pdb_method)->add_sam_account = xmlsam_add_sam_account; + (*pdb_method)->getsampwnam = NULL; + (*pdb_method)->getsampwsid = NULL; + (*pdb_method)->update_sam_account = NULL; + (*pdb_method)->delete_sam_account = NULL; + + data = talloc(pdb_context->mem_ctx, sizeof(pdb_xml)); + data->location = + (location ? talloc_strdup(pdb_context->mem_ctx, location) : "-"); + data->pwent = NULL; + data->written = 0; + (*pdb_method)->private_data = data; + + LIBXML_TEST_VERSION xmlKeepBlanksDefault(0); + + return NT_STATUS_OK; +} From 6ddba1e99b48afc53cf5bc7a2900279490c7a8f6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 10 Aug 2002 23:20:04 +0000 Subject: [PATCH 219/262] Fix the %m security bug again - and try to make it harder to reintroduce in future. This moves us from fstrcpy() and global variables to 'get' and 'set' functions. In particular, the 'set' function sainity-checks the input, in the same way as we always have. Andrew Bartlett (This used to be commit e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36) --- source3/client/smbmount.c | 3 +-- source3/lib/substitute.c | 49 ++++++++++++++++++++++++++++++++------- source3/smbd/reply.c | 22 +++++++----------- source3/smbd/server.c | 6 ++--- source3/smbd/sesssetup.c | 5 ++-- source3/utils/testparm.c | 9 +++---- 6 files changed, 60 insertions(+), 34 deletions(-) diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c index ad050063ec4..0db990e8bd6 100644 --- a/source3/client/smbmount.c +++ b/source3/client/smbmount.c @@ -29,7 +29,6 @@ extern BOOL in_client; extern pstring user_socket_options; extern BOOL append_log; -extern fstring remote_machine; static pstring credentials; static pstring my_netbios_name; @@ -377,7 +376,7 @@ static void send_fs_socket(char *the_service, char *mount_point, struct cli_stat } /* here we are no longer interactive */ - pstrcpy(remote_machine, "smbmount"); /* sneaky ... */ + set_remote_machine_name("smbmount"); /* sneaky ... */ setup_logging("mount.smbfs", False); append_log = True; reopen_logs(); diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index 6d96a1820f1..c47b5914f1d 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -28,6 +28,36 @@ fstring remote_proto="UNKNOWN"; fstring remote_machine=""; extern pstring global_myname; +void set_local_machine_name(const char* local_name) +{ + fstring tmp_local_machine; + + fstrcpy(tmp_local_machine,local_name); + trim_string(tmp_local_machine," "," "); + strlower(tmp_local_machine); + alpha_strcpy(local_machine,tmp_local_machine,SAFE_NETBIOS_CHARS,sizeof(local_machine)-1); +} + +void set_remote_machine_name(const char* remote_name) +{ + fstring tmp_remote_machine; + + fstrcpy(tmp_remote_machine,remote_name); + trim_string(tmp_remote_machine," "," "); + strlower(tmp_remote_machine); + alpha_strcpy(remote_machine,tmp_remote_machine,SAFE_NETBIOS_CHARS,sizeof(remote_machine)-1); +} + +const char* get_remote_machine_name(void) +{ + return remote_machine; +} + +const char* get_local_machine_name(void) +{ + return local_machine; +} + /******************************************************************* Given a pointer to a %$(NAME) expand it as an environment variable. Return the number of characters by which the pointer should be advanced. @@ -188,14 +218,15 @@ static char *automount_path(const char *user_name) moved out to a separate function. *******************************************************************/ -static char *automount_server(const char *user_name) +static const char *automount_server(const char *user_name) { static pstring server_name; + const char *local_machine_name = get_local_machine_name(); /* use the local machine name as the default */ /* this will be the default if WITH_AUTOMOUNT is not used or fails */ - if (*local_machine) - pstrcpy(server_name, local_machine); + if (local_machine_name && *local_machine_name) + pstrcpy(server_name, local_machine_name); else pstrcpy(server_name, global_myname); @@ -229,6 +260,7 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len) char *p, *s; fstring pidstr; struct passwd *pass; + const char *local_machine_name = get_local_machine_name(); for (s=str; (p=strchr_m(s, '%'));s=p) { fstring tmp_str; @@ -261,8 +293,8 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len) string_sub(p,"%I", client_addr(),l); break; case 'L' : - if (*local_machine) - string_sub(p,"%L", local_machine,l); + if (local_machine_name && *local_machine_name) + string_sub(p,"%L", local_machine_name,l); else string_sub(p,"%L", global_myname,l); break; @@ -286,7 +318,7 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len) string_sub(p,"%h", myhostname(),l); break; case 'm' : - string_sub(p,"%m", remote_machine,l); + string_sub(p,"%m", get_remote_machine_name(),l); break; case 'v' : string_sub(p,"%v", VERSION,l); @@ -381,6 +413,7 @@ char *alloc_sub_basic(const char *smb_name, const char *str) char *b, *p, *s, *t, *r, *a_string; fstring pidstr; struct passwd *pass; + const char *local_machine_name = get_local_machine_name(); a_string = strdup(str); if (a_string == NULL) { @@ -415,8 +448,8 @@ char *alloc_sub_basic(const char *smb_name, const char *str) t = realloc_string_sub(t, "%I", client_addr()); break; case 'L' : - if (*local_machine) - t = realloc_string_sub(t, "%L", local_machine); + if (local_machine_name && *local_machine_name) + t = realloc_string_sub(t, "%L", local_machine_name); else t = realloc_string_sub(t, "%L", global_myname); break; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index ba0e15bd4ec..a4ed770f314 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -53,7 +53,6 @@ int reply_special(char *inbuf,char *outbuf) int msg_flags = CVAL(inbuf,1); pstring name1,name2; - extern fstring local_machine; int len; char name_type = 0; @@ -84,24 +83,19 @@ int reply_special(char *inbuf,char *outbuf) DEBUG(2,("netbios connect: name1=%s name2=%s\n", name1,name2)); - fstrcpy(remote_machine,name2); - remote_machine[15] = 0; - trim_string(remote_machine," "," "); - strlower(remote_machine); - alpha_strcpy(remote_machine,remote_machine,SAFE_NETBIOS_CHARS,sizeof(remote_machine)-1); + name1[15] = 0; - fstrcpy(local_machine,name1); - len = strlen(local_machine); + len = strlen(name2); if (len == 16) { - name_type = local_machine[15]; - local_machine[15] = 0; + name_type = name2[15]; + name2[15] = 0; } - trim_string(local_machine," "," "); - strlower(local_machine); - alpha_strcpy(local_machine,local_machine,SAFE_NETBIOS_CHARS,sizeof(local_machine)-1); + + set_local_machine_name(name1); + set_remote_machine_name(name2); DEBUG(2,("netbios connect: local=%s remote=%s\n", - local_machine, remote_machine )); + get_local_machine_name(), get_remote_machine_name() )); if (name_type == 'R') { /* We are being asked for a pathworks session --- diff --git a/source3/smbd/server.c b/source3/smbd/server.c index d173fec00e4..45295896e85 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -38,8 +38,6 @@ extern pstring user_socket_options; extern int dcelogin_atmost_once; #endif /* WITH_DFS */ -extern fstring remote_machine; - /* really we should have a top level context structure that has the client file descriptor as an element. That would require a major rewrite :( @@ -366,7 +364,7 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports) /* this is needed so that we get decent entries in smbstatus for port 445 connects */ - fstrcpy(remote_machine, get_socket_addr(smbd_server_fd())); + set_remote_machine_name(get_socket_addr(smbd_server_fd())); /* Reset global variables in util.c so that client substitutions will be @@ -742,7 +740,7 @@ static void usage(char *pname) lp_set_logfile(logfile); } - fstrcpy(remote_machine, "smbd"); + set_remote_machine_name("smbd"); setup_logging(argv[0],interactive); diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 2e9e54b8d93..f6d536f3019 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -385,7 +385,6 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, uint32 auth_flags = AUTH_FLAG_NONE; auth_usersupplied_info *user_info = NULL; auth_serversupplied_info *server_info = NULL; - extern fstring remote_machine; /* we must have setup the auth context by now */ if (!ntlmssp_auth_context) { @@ -422,7 +421,9 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, /* the client has given us its machine name (which we otherwise would not get on port 445). we need to possibly reload smb.conf if smb.conf includes depend on the machine name */ - fstrcpy(remote_machine, machine); + + set_remote_machine_name(machine); + reload_services(True); #if 0 diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 1d48249a758..3086019467d 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -175,7 +175,6 @@ int main(int argc, char *argv[]) { extern char *optarg; extern int optind; - extern fstring local_machine; const char *config_file = dyn_CONFIGFILE; int s; static BOOL silent_mode = False; @@ -183,7 +182,7 @@ int main(int argc, char *argv[]) int opt; poptContext pc; static char *term_code = ""; - static char *new_local_machine = local_machine; + static char *new_local_machine = NULL; const char *cname; const char *caddr; @@ -207,8 +206,10 @@ int main(int argc, char *argv[]) cname = poptGetArg(pc); caddr = poptGetArg(pc); - - fstrcpy(local_machine,new_local_machine); + + if (new_local_machine) { + set_local_machine_name(new_local_machine); + } dbf = x_stdout; DEBUGLEVEL = 2; From dd5615c04241ec09e6b877a0670a957fa7702902 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 11 Aug 2002 02:30:35 +0000 Subject: [PATCH 220/262] Make 'remote_machine' private to lib/substitute.c, and fix all the user to use the new accessor functions. Andrew Bartlett (This used to be commit f393de2310e997d05674eb7f1268655373e03647) --- source3/auth/auth_util.c | 5 ++--- source3/lib/substitute.c | 4 +++- source3/nmbd/nmbd.c | 3 +-- source3/smbd/connection.c | 3 +-- source3/smbd/filename.c | 1 - source3/smbd/negprot.c | 1 - source3/smbd/password.c | 2 +- source3/smbd/reply.c | 3 +-- source3/smbd/service.c | 10 ++++------ source3/smbd/session.c | 4 +--- source3/smbd/sesssetup.c | 3 +-- source3/wrepld/server.c | 3 +-- 12 files changed, 16 insertions(+), 26 deletions(-) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 3ade220c0f0..f914d918715 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -25,7 +25,6 @@ #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH -extern fstring remote_machine; extern pstring global_myname; /**************************************************************************** @@ -394,7 +393,7 @@ BOOL make_user_info_for_reply(auth_usersupplied_info **user_info, ret = make_user_info_map(user_info, smb_name, client_domain, - remote_machine, + get_remote_machine_name(), local_lm_blob, local_nt_blob, plaintext_password, @@ -429,7 +428,7 @@ BOOL make_user_info_for_reply_enc(auth_usersupplied_info **user_info, return make_user_info_map(user_info, smb_name, client_domain, - remote_machine, + get_remote_machine_name(), lm_resp, nt_resp, no_plaintext_blob, diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index c47b5914f1d..026df0f67f1 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -25,9 +25,11 @@ fstring local_machine=""; fstring remote_arch="UNKNOWN"; userdom_struct current_user_info; fstring remote_proto="UNKNOWN"; -fstring remote_machine=""; extern pstring global_myname; +static fstring remote_machine=""; + + void set_local_machine_name(const char* local_name) { fstring tmp_local_machine; diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 3a0dabe8d71..05ea4997d5f 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -269,9 +269,8 @@ static BOOL reload_interfaces(time_t t) static BOOL reload_nmbd_services(BOOL test) { BOOL ret; - extern fstring remote_machine; - fstrcpy( remote_machine, "nmbd" ); + set_remote_machine_name("nmbd"); if ( lp_loaded() ) { pstring fname; diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index b53ef9fb3fc..5609c2963d8 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -20,7 +20,6 @@ #include "includes.h" -extern fstring remote_machine; static TDB_CONTEXT *tdb; /**************************************************************************** @@ -178,7 +177,7 @@ BOOL claim_connection(connection_struct *conn,char *name,int max_connections,BOO } crec.start = time(NULL); - StrnCpy(crec.machine,remote_machine,sizeof(crec.machine)-1); + StrnCpy(crec.machine,get_remote_machine_name(),sizeof(crec.machine)-1); StrnCpy(crec.addr,conn?conn->client_address:client_addr(),sizeof(crec.addr)-1); dbuf.dptr = (char *)&crec; diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index e5f9b7a0ae8..ce98af4ace5 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -29,7 +29,6 @@ extern BOOL case_sensitive; extern BOOL case_preserve; extern BOOL short_case_preserve; -extern fstring remote_machine; extern BOOL use_mangled_map; static BOOL scan_directory(char *path, char *name,connection_struct *conn,BOOL docache); diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 1d79cbd5d00..2be04fd6860 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -23,7 +23,6 @@ extern int Protocol; extern int max_recv; extern fstring global_myworkgroup; -extern fstring remote_machine; BOOL global_encrypted_passwords_negotiated = False; BOOL global_spnego_negotiated = False; struct auth_context *negprot_global_auth_context = NULL; diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 2558ffe1633..6d922139e70 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -303,7 +303,7 @@ int register_vuid(auth_serversupplied_info *server_info, char *smb_name) /**************************************************************************** add a name to the session users list ****************************************************************************/ -void add_session_user(char *user) +void add_session_user(const char *user) { fstring suser; StrnCpy(suser,user,sizeof(suser)-1); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index a4ed770f314..dc49fe3e2e7 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -38,7 +38,6 @@ extern pstring global_myname; extern int global_oplock_break; unsigned int smb_echo_count = 0; -extern fstring remote_machine; extern BOOL global_encrypted_passwords_negotiated; @@ -108,7 +107,7 @@ int reply_special(char *inbuf,char *outbuf) of possibly valid usernames if we are operating in share mode security */ if (lp_security() == SEC_SHARE) { - add_session_user(remote_machine); + add_session_user(get_remote_machine_name()); } reload_services(True); diff --git a/source3/smbd/service.c b/source3/smbd/service.c index aac90f2fdcf..26e00aa49f3 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -27,9 +27,7 @@ extern BOOL short_case_preserve; extern BOOL case_mangle; extern BOOL case_sensitive; extern BOOL use_mangled_map; -extern fstring remote_machine; extern userdom_struct current_user_info; -extern fstring remote_machine; /**************************************************************************** @@ -636,7 +634,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, I have disabled this chdir check (tridge) */ if (vfs_ChDir(conn,conn->connectpath) != 0) { DEBUG(0,("%s (%s) Can't change directory to %s (%s)\n", - remote_machine, conn->client_address, + get_remote_machine_name(), conn->client_address, conn->connectpath,strerror(errno))); change_to_root_user(); yield_connection(conn, lp_servicename(SNUM(conn))); @@ -676,7 +674,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, */ if( DEBUGLVL( IS_IPC(conn) ? 3 : 1 ) ) { - dbgtext( "%s (%s) ", remote_machine, conn->client_address ); + dbgtext( "%s (%s) ", get_remote_machine_name(), conn->client_address ); dbgtext( "connect to service %s ", lp_servicename(SNUM(conn)) ); dbgtext( "initially as user %s ", user ); dbgtext( "(uid=%d, gid=%d) ", (int)geteuid(), (int)getegid() ); @@ -825,7 +823,7 @@ connection_struct *make_connection(const char *service_in, DATA_BLOB password, } DEBUG(0,("%s (%s) couldn't find service %s\n", - remote_machine, client_addr(), service)); + get_remote_machine_name(), client_addr(), service)); *status = NT_STATUS_BAD_NETWORK_NAME; return NULL; } @@ -847,7 +845,7 @@ void close_cnum(connection_struct *conn, uint16 vuid) change_to_root_user(); DEBUG(IS_IPC(conn)?3:1, ("%s (%s) closed connection to service %s\n", - remote_machine,conn->client_address, + get_remote_machine_name(),conn->client_address, lp_servicename(SNUM(conn)))); if (conn->vfs_ops.disconnect != NULL) { diff --git a/source3/smbd/session.c b/source3/smbd/session.c index f7ade5570c3..54b7a24b070 100644 --- a/source3/smbd/session.c +++ b/source3/smbd/session.c @@ -27,8 +27,6 @@ #include "includes.h" -extern fstring remote_machine; - static TDB_CONTEXT *tdb; /* called when a session is created */ BOOL session_claim(user_struct *vuser) @@ -116,7 +114,7 @@ BOOL session_claim(user_struct *vuser) sessionid.pid = pid; sessionid.uid = vuser->uid; sessionid.gid = vuser->gid; - fstrcpy(sessionid.remote_machine, remote_machine); + fstrcpy(sessionid.remote_machine, get_remote_machine_name()); fstrcpy(sessionid.ip_addr, client_addr()); if (!smb_pam_claim_session(sessionid.username, sessionid.id_str, sessionid.hostname)) { diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index f6d536f3019..d45b04202e9 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -607,7 +607,6 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, extern BOOL global_encrypted_passwords_negotiated; extern BOOL global_spnego_negotiated; extern int Protocol; - extern fstring remote_machine; extern userdom_struct current_user_info; extern int max_send; @@ -736,7 +735,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, return ERROR_NT(NT_STATUS_LOGON_FAILURE); } - DEBUG(3,("sesssetupX:name=[%s]\\[%s]@[%s]\n", domain, user, remote_machine)); + DEBUG(3,("sesssetupX:name=[%s]\\[%s]@[%s]\n", domain, user, get_remote_machine_name())); if (*user) { if (global_spnego_negotiated) { diff --git a/source3/wrepld/server.c b/source3/wrepld/server.c index 740003035cf..14d3e730f47 100644 --- a/source3/wrepld/server.c +++ b/source3/wrepld/server.c @@ -26,7 +26,6 @@ extern pstring global_myname; extern pstring user_socket_options; -extern fstring remote_machine; extern WINS_OWNER *global_wins_table; extern int partner_count; @@ -637,7 +636,7 @@ static void process(void) lp_set_logfile(logfile); } - pstrcpy(remote_machine, "wrepld"); + set_remote_machine_name("wrepld"); setup_logging(argv[0],interactive); From e598f1332ef59d0ddbb4e7d114b5b24a7b90a879 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 11 Aug 2002 08:06:14 +0000 Subject: [PATCH 221/262] Update CodingSuggestions to include 'indent' arguments for the samba coding style (This used to be commit 5f2c2a114b9d3739381e4ad683413a7db0187999) --- source3/CodingSuggestions | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source3/CodingSuggestions b/source3/CodingSuggestions index eda2bee6d00..84166e179f3 100644 --- a/source3/CodingSuggestions +++ b/source3/CodingSuggestions @@ -25,7 +25,11 @@ documents are: http://www.fsf.org/prep/standards_toc.html but note that coding style in Samba varies due to the many different -programmers who have contributed. +programmers who have contributed. + +The indent utility can be used to format C files in the general +samba coding style. The arguments you should give to indent are: +-bad -bap -br -ce -cdw -nbc -brs -bbb -nbc Following are some considerations you should use when adding new code to Samba. First and foremost remember that: @@ -137,12 +141,20 @@ Here are some other suggestions: to and maintain your code. If it would be hard for someone else to maintain then do it another way. +26) Always keep the declaration of a function on one line. The autoprototyper + doesn't catch declarations spread over multiple lines. + Use: +static char foo(int bar) + and not: +static char +foo(int bar) + The suggestions above are simply that, suggestions, but the information may help in reducing the routine rework done on new code. The preceeding list is expected to change routinely as new support routines and macros are added. Written by Steve French, with contributions from Simo Sorce, Andrew -Bartlett, Tim Potter and Martin Pool. +Bartlett, Tim Potter, Martin Pool and Jelmer Vernooij. **/ From 36d7d262754f5630a2383882541af1e8df70a089 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 11 Aug 2002 08:15:49 +0000 Subject: [PATCH 222/262] Add indent argument to put function name and type on same line - for satisfying the autoprototyper and abartlet (This used to be commit c03d8bc24dd45ac615481a82b7ad9ad7fb8b5ed1) --- source3/CodingSuggestions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/CodingSuggestions b/source3/CodingSuggestions index 84166e179f3..e5f366ec710 100644 --- a/source3/CodingSuggestions +++ b/source3/CodingSuggestions @@ -29,7 +29,7 @@ programmers who have contributed. The indent utility can be used to format C files in the general samba coding style. The arguments you should give to indent are: --bad -bap -br -ce -cdw -nbc -brs -bbb -nbc +-bad -bap -br -ce -cdw -nbc -brs -bbb -nbc -npsl Following are some considerations you should use when adding new code to Samba. First and foremost remember that: From d8d0a4e909cbbddcfba35ff04b9c25382f961939 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 11 Aug 2002 18:19:03 +0000 Subject: [PATCH 223/262] Merge of case fixes from APPLIANCE_HEAD. (This used to be commit f8072d964f527dcb9b520ec06c3522524d47644f) --- source3/registry/reg_db.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/registry/reg_db.c b/source3/registry/reg_db.c index b4c8f60ccf5..b0917c8f603 100644 --- a/source3/registry/reg_db.c +++ b/source3/registry/reg_db.c @@ -60,7 +60,7 @@ static BOOL init_registry_data( void ) pstrcpy( keyname, KEY_HKLM ); pstrcat( keyname, "/SYSTEM/CurrentControlSet" ); regsubkey_ctr_addkey( &subkeys, "Control" ); - regsubkey_ctr_addkey( &subkeys, "services" ); + regsubkey_ctr_addkey( &subkeys, "Services" ); if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; regsubkey_ctr_destroy( &subkeys ); @@ -81,7 +81,7 @@ static BOOL init_registry_data( void ) regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); - pstrcat( keyname, "/SYSTEM/CurrentControlSet/services" ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Services" ); regsubkey_ctr_addkey( &subkeys, "Netlogon" ); if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; @@ -89,14 +89,14 @@ static BOOL init_registry_data( void ) regsubkey_ctr_init( &subkeys ); pstrcpy( keyname, KEY_HKLM ); - pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon" ); - regsubkey_ctr_addkey( &subkeys, "parameters" ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Services/Netlogon" ); + regsubkey_ctr_addkey( &subkeys, "Parameters" ); if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; regsubkey_ctr_destroy( &subkeys ); pstrcpy( keyname, KEY_HKLM ); - pstrcat( keyname, "/SYSTEM/CurrentControlSet/services/Netlogon/parameters" ); + pstrcat( keyname, "/SYSTEM/CurrentControlSet/Services/Netlogon/Parameters" ); if ( !regdb_store_reg_keys( keyname, &subkeys )) return False; From 60444c3383ab5502e51ad89fe6c272d6b2c4e78a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 11 Aug 2002 19:23:09 +0000 Subject: [PATCH 224/262] Merge some usage info from APPLIANCE_HEAD. (This used to be commit aa93db5abed75b5c9a032a080c07473fafa53a43) --- source3/utils/smbcontrol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 300e5479e5a..2d78b21dcc8 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -369,6 +369,9 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params) fprintf(stderr, "Must specify subcommand:\n"); fprintf(stderr, "\tqueuepause \n"); fprintf(stderr, "\tqueueresume \n"); + fprintf(stderr, "\tjobpause \n"); + fprintf(stderr, "\tjobresume \n"); + fprintf(stderr, "\tjobdelete \n"); return False; } From 3773419cdf8553f68bdb43149c2d93cad6d78f50 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 11 Aug 2002 19:52:47 +0000 Subject: [PATCH 225/262] Updated smbcontrol manpage for new printnotify commands. Jerry, what's the latest on rebuilding doco from source? I've no idea whether this actually compiles or not. (This used to be commit 6a4202a105d36f7d368e6a1d524314ea348be2a9) --- docs/docbook/manpages/smbcontrol.1.sgml | 54 ++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/docs/docbook/manpages/smbcontrol.1.sgml b/docs/docbook/manpages/smbcontrol.1.sgml index 517e2ca41f4..9a6f31b336a 100644 --- a/docs/docbook/manpages/smbcontrol.1.sgml +++ b/docs/docbook/manpages/smbcontrol.1.sgml @@ -76,7 +76,7 @@ force-election, ping , profile, debuglevel, profilelevel, - or printer-notify. + or printnotify. The close-share message-type sends a message to smbd which will then close the client connections to @@ -119,11 +119,55 @@ setting is returned by a "profilelevel" message. This can be sent to any smbd or nmbd destinations. - The printer-notify message-type sends a + The printnotify message-type sends a message to smbd which in turn sends a printer notify message to - any Windows NT clients connected to a printer. This message-type - takes an argument of the printer name to send notify messages to. - This message can only be sent to smbd. + any Windows NT clients connected to a printer. This message-type + takes the following arguments: + + + + + queuepause printername + Send a queue pause change notify + message to the printer specified. + + + + queueresume printername + Send a queue resume change notify + message for the printer specified. + + + + jobpause printername unixjobid + Send a job pause change notify + message for the printer and unix jobid + specified. + + + + jobresume printername unixjobid + Send a job resume change notify + message for the printer and unix jobid + specified. + + + + jobdelete printername unixjobid + Send a job delete change notify + message for the printer and unix jobid + specified. + + + + + Note that this message only sends notification that an + event has occured. It doesn't actually cause the + event to happen. + + This message can only be sent to smbd. + + From 4a822be1d3bb547b87ff3a0f24dca862fa1fa809 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 08:25:02 +0000 Subject: [PATCH 226/262] Add client side support for samr connect4 (0x3e). Seems to have one additional parm compared to samr connect, but I've only seen 0x00000002 in that field... (This used to be commit ed2370b91f7f6a36efdf6b65340a5b29a26e7e7a) --- source3/rpc_client/cli_samr.c | 47 ++++++++++++++++++++++++++++++++++ source3/rpc_parse/parse_samr.c | 22 ++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 6581bdbeaf3..7863d32419b 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -72,6 +72,53 @@ NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/* Connect to SAMR database */ + +NTSTATUS cli_samr_connect4(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol) +{ + prs_struct qbuf, rbuf; + SAMR_Q_CONNECT4 q; + SAMR_R_CONNECT4 r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_connect4(&q, cli->desthost, access_mask); + + if (!samr_io_q_connect4("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_CONNECT4, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if (!samr_io_r_connect4("", &r, &rbuf, 0)) + goto done; + + /* Return output parameters */ + + if (NT_STATUS_IS_OK(result = r.status)) { + *connect_pol = r.connect_pol; +#ifdef __INSURE__ + connect_pol->marker = malloc(1); +#endif + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + /* Close SAMR handle */ NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index 5131f3b4f23..a6e1351aa17 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -6718,6 +6718,28 @@ BOOL samr_io_r_connect(char *desc, SAMR_R_CONNECT * r_u, return True; } +/******************************************************************* +inits a SAMR_Q_CONNECT4 structure. +********************************************************************/ + +void init_samr_q_connect4(SAMR_Q_CONNECT4 * q_u, + char *srv_name, uint32 access_mask) +{ + int len_srv_name = strlen(srv_name); + + DEBUG(5, ("init_samr_q_connect\n")); + + /* make PDC server name \\server */ + q_u->ptr_srv_name = len_srv_name > 0 ? 1 : 0; + init_unistr2(&q_u->uni_srv_name, srv_name, len_srv_name + 1); + + /* Only value we've seen, possibly an address type ? */ + q_u->unk_0 = 2; + + /* example values: 0x0000 0002 */ + q_u->access_mask = access_mask; +} + /******************************************************************* reads or writes a structure. ********************************************************************/ From b3d49538fddc7d9f7c973efb9c6fbe774e1faaf2 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 08:26:28 +0000 Subject: [PATCH 227/262] Use samr connect4, then fall back to samr connect if it fails. This is what 2k does. (This used to be commit 99437db17aa7c2e3448f28f627e993e8ab762d31) --- source3/rpcclient/cmd_samr.c | 75 ++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index eae24683d2a..d9251f90bd1 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -243,6 +243,22 @@ static void display_sam_info_5(SAM_ENTRY5 *e5, SAM_STR5 *s5) } +/**************************************************************************** + Try samr_connect4 first, then samr_conenct if it fails + ****************************************************************************/ +static NTSTATUS try_samr_connects(struct cli_state *cli, TALLOC_CTX *mem_ctx, + uint32 access_mask, POLICY_HND *connect_pol) +{ + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + result = cli_samr_connect4(cli, mem_ctx, access_mask, connect_pol); + if (!NT_STATUS_IS_OK(result)) { + result = cli_samr_connect(cli, mem_ctx, access_mask, + connect_pol); + } + return result; +} + /********************************************************************** * Query user information */ @@ -275,8 +291,8 @@ static NTSTATUS cmd_samr_query_user(struct cli_state *cli, slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -383,8 +399,8 @@ static NTSTATUS cmd_samr_query_group(struct cli_state *cli, slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -447,8 +463,8 @@ static NTSTATUS cmd_samr_query_usergroups(struct cli_state *cli, slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -513,8 +529,8 @@ static NTSTATUS cmd_samr_query_useraliases(struct cli_state *cli, slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -576,8 +592,8 @@ static NTSTATUS cmd_samr_query_groupmem(struct cli_state *cli, slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -635,8 +651,8 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct cli_state *cli, /* Get sam policy handle */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -711,8 +727,8 @@ static NTSTATUS cmd_samr_enum_als_groups(struct cli_state *cli, /* Get sam policy handle */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -794,8 +810,8 @@ static NTSTATUS cmd_samr_query_aliasmem(struct cli_state *cli, /* Open SAMR handle */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -878,7 +894,8 @@ static NTSTATUS cmd_samr_query_dispinfo(struct cli_state *cli, /* Get sam policy handle */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -983,8 +1000,8 @@ static NTSTATUS cmd_samr_query_dominfo(struct cli_state *cli, /* Get sam policy handle */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -1053,8 +1070,8 @@ static NTSTATUS cmd_samr_create_dom_user(struct cli_state *cli, /* Get sam policy handle */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -1109,8 +1126,8 @@ static NTSTATUS cmd_samr_lookup_names(struct cli_state *cli, /* Get sam policy and domain handles */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -1174,8 +1191,8 @@ static NTSTATUS cmd_samr_lookup_rids(struct cli_state *cli, /* Get sam policy and domain handles */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -1231,8 +1248,8 @@ static NTSTATUS cmd_samr_delete_dom_user(struct cli_state *cli, /* Get sam policy and domain handles */ - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; @@ -1312,8 +1329,8 @@ static NTSTATUS cmd_samr_query_sec_obj(struct cli_state *cli, slprintf (server, sizeof(fstring)-1, "\\\\%s", cli->desthost); strupper (server); - result = cli_samr_connect(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, - &connect_pol); + result = try_samr_connects(cli, mem_ctx, MAXIMUM_ALLOWED_ACCESS, + &connect_pol); if (!NT_STATUS_IS_OK(result)) goto done; From 341e3009a094f7248e3cb894586f2a600a27ff34 Mon Sep 17 00:00:00 2001 From: Shirish Kalele Date: Mon, 12 Aug 2002 13:35:17 +0000 Subject: [PATCH 228/262] Add RESOLVE_DFSPATH to mkdir operations in HEAD. (This used to be commit cbb6e2fbdb42964107cf033c787a32cedd46e5d8) --- source3/smbd/reply.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index dc49fe3e2e7..c6a082d7d89 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2751,6 +2751,8 @@ int reply_mkdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, srvstr_pull_buf(inbuf, directory, smb_buf(inbuf) + 1, sizeof(directory), STR_TERMINATE); + RESOLVE_DFSPATH(directory, conn, inbuf, outbuf); + status = mkdir_internal(conn, directory); if (!NT_STATUS_IS_OK(status)) return ERROR_NT(status); From ae6cb0fb31c51c2e0beeda016e75d711a518b140 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 13:40:59 +0000 Subject: [PATCH 229/262] Add lsa 0x2e (queryinfo2) client side (This used to be commit c3b05b21a0340d8ff02a79401399e3d43d9e759a) --- source3/rpc_client/cli_lsarpc.c | 86 +++++++++++++++++++++++++++++++++ source3/rpc_parse/parse_lsa.c | 13 +++++ 2 files changed, 99 insertions(+) diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 14227a349a4..5555f4bd529 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -525,6 +525,92 @@ NTSTATUS cli_lsa_query_info_policy(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/** Query info policy2 + * + * @param domain_name - returned remote server's domain name + * @param dns_name - returned remote server's dns domain name + * @param forest_name - returned remote server's forest name + * @param domain_guid - returned remote server's domain guid + * @param domain_sid - returned remote server's domain sid */ + +NTSTATUS cli_lsa_query_info_policy2(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 info_class, + fstring domain_name, fstring dns_name, + fstring forest_name, GUID *domain_guid, + DOM_SID *domain_sid) +{ + prs_struct qbuf, rbuf; + LSA_Q_QUERY_INFO2 q; + LSA_R_QUERY_INFO2 r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + if (info_class != 12) + goto done; + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_q_query2(&q, pol, info_class); + + if (!lsa_io_q_query_info2("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, LSA_QUERYINFO2, &qbuf, &rbuf)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + /* Unmarshall response */ + + if (!lsa_io_r_query_info2("", &r, &rbuf, 0)) { + result = NT_STATUS_UNSUCCESSFUL; + goto done; + } + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + /* Return output parameters */ + + ZERO_STRUCTP(domain_sid); + ZERO_STRUCTP(domain_guid); + domain_name[0] = '\0'; + + if (r.info.dns_dom_info.hdr_nb_dom_name.buffer) { + unistr2_to_ascii(domain_name, + &r.info.dns_dom_info.uni_nb_dom_name, + sizeof(fstring) - 1); + } + if (r.info.dns_dom_info.hdr_dns_dom_name.buffer) { + unistr2_to_ascii(dns_name, + &r.info.dns_dom_info.uni_dns_dom_name, + sizeof(fstring) - 1); + } + if (r.info.dns_dom_info.hdr_forest_name.buffer) { + unistr2_to_ascii(forest_name, + &r.info.dns_dom_info.uni_forest_name, + sizeof(fstring) - 1); + } + + memcpy(domain_guid, &r.info.dns_dom_info.dom_guid, sizeof(GUID)); + + if (r.info.dns_dom_info.ptr_dom_sid != 0) { + *domain_sid = r.info.dns_dom_info.dom_sid.sid; + } + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + /** * Enumerate list of trusted domains * diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index d0536dab013..375bbd31d74 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -2165,6 +2165,19 @@ BOOL lsa_io_dns_dom_info(char *desc, LSA_DNS_DOM_INFO *info, } +/******************************************************************* + Inits an LSA_Q_QUERY_INFO2 structure. +********************************************************************/ + +void init_q_query2(LSA_Q_QUERY_INFO2 *q_q, POLICY_HND *hnd, uint16 info_class) +{ + DEBUG(5, ("init_q_query2\n")); + + memcpy(&q_q->pol, hnd, sizeof(q_q->pol)); + + q_q->info_class = info_class; +} + /******************************************************************* Reads or writes an LSA_Q_QUERY_DNSDOMINFO structure. ********************************************************************/ From 28bf5e5f2d935671ff1d06c6efe2d8ff3bfafdae Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 13:41:52 +0000 Subject: [PATCH 230/262] Add lsaqueryinfo2, but keep under "lsaquery" command. It will autoselect which lsaqueryinfo to do based in infoclass. Currently 12 is the only one that causes a queryinfo2. (This used to be commit f4ec2d52a7b093da701d68906cce6de197f182be) --- source3/rpcclient/cmd_lsarpc.c | 49 +++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 51b260cceb8..194e4981224 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -32,7 +32,8 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, POLICY_HND pol; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; DOM_SID dom_sid; - fstring sid_str, domain_name; + GUID dom_guid; + fstring sid_str, domain_name="", dns_name="", forest_name=""; uint32 info_class = 3; if (argc > 2) { @@ -43,17 +44,31 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, if (argc == 2) info_class = atoi(argv[1]); - result = cli_lsa_open_policy(cli, mem_ctx, True, + /* Lookup info policy */ + switch (info_class) { + case 12: + result = cli_lsa_open_policy2(cli, mem_ctx, True, + SEC_RIGHTS_MAXIMUM_ALLOWED, + &pol); + + if (!NT_STATUS_IS_OK(result)) + goto done; + result = cli_lsa_query_info_policy2(cli, mem_ctx, &pol, + info_class, domain_name, + dns_name, forest_name, + &dom_guid, &dom_sid); + break; + default: + result = cli_lsa_open_policy(cli, mem_ctx, True, SEC_RIGHTS_MAXIMUM_ALLOWED, &pol); - if (!NT_STATUS_IS_OK(result)) - goto done; - - /* Lookup info policy */ - - result = cli_lsa_query_info_policy(cli, mem_ctx, &pol, info_class, - domain_name, &dom_sid); + if (!NT_STATUS_IS_OK(result)) + goto done; + result = cli_lsa_query_info_policy(cli, mem_ctx, &pol, + info_class, domain_name, + &dom_sid); + } if (!NT_STATUS_IS_OK(result)) goto done; @@ -65,6 +80,22 @@ static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, else printf("could not query info for level %d\n", info_class); + if (dns_name[0]) + printf("domain dns name is %s\n", dns_name); + if (forest_name[0]) + printf("forest name is %s\n", forest_name); + + if (info_class == 12) { + int i; + uint32 *data1 = (uint32 *) dom_guid.info; + uint16 *data2 = (uint16 *) &dom_guid.info[4]; + uint16 *data3 = (uint16 *) &dom_guid.info[6]; + printf("domain GUID is %08x-%04x-%04x", *data1,*data2,*data3); + printf("-%02x%02x-", dom_guid.info[8], dom_guid.info[9]); + for (i=10;i Date: Mon, 12 Aug 2002 13:48:19 +0000 Subject: [PATCH 231/262] Code to generate uuids for ADS setups. Uses our random generator but conforms to standard OSF/DCE uuid format. (This used to be commit 3b50c3b8cd86ff9a12a6e22ca3b3e904671be547) --- source3/lib/util_uuid.c | 108 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 source3/lib/util_uuid.c diff --git a/source3/lib/util_uuid.c b/source3/lib/util_uuid.c new file mode 100644 index 00000000000..b70db8de5b0 --- /dev/null +++ b/source3/lib/util_uuid.c @@ -0,0 +1,108 @@ +/* + * Unix SMB/CIFS implementation. + * UUID server routines + * Copyright (C) Theodore Ts'o 1996, 1997, + * Copyright (C) Jim McDonough 2002. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "includes.h" + +/* + * Offset between 15-Oct-1582 and 1-Jan-70 + */ +#define TIME_OFFSET_HIGH 0x01B21DD2 +#define TIME_OFFSET_LOW 0x13814000 + +struct uuid { + uint32 time_low; + uint16 time_mid; + uint16 time_hi_and_version; + uint16 clock_seq; + uint8 node[6]; +}; + + +static void uuid_pack(const struct uuid *uu, GUID *ptr) +{ + uint32 tmp; + uint8 *out = ptr->info; + + tmp = uu->time_low; + out[3] = (uint8) tmp; + tmp >>= 8; + out[2] = (uint8) tmp; + tmp >>= 8; + out[1] = (uint8) tmp; + tmp >>= 8; + out[0] = (uint8) tmp; + + tmp = uu->time_mid; + out[5] = (uint8) tmp; + tmp >>= 8; + out[4] = (uint8) tmp; + + tmp = uu->time_hi_and_version; + out[7] = (uint8) tmp; + tmp >>= 8; + out[6] = (uint8) tmp; + + tmp = uu->clock_seq; + out[9] = (uint8) tmp; + tmp >>= 8; + out[8] = (uint8) tmp; + + memcpy(out+10, uu->node, 6); +} + +static void uuid_unpack(const GUID in, struct uuid *uu) +{ + const uint8 *ptr = in.info; + uint32 tmp; + + tmp = *ptr++; + tmp = (tmp << 8) | *ptr++; + tmp = (tmp << 8) | *ptr++; + tmp = (tmp << 8) | *ptr++; + uu->time_low = tmp; + + tmp = *ptr++; + tmp = (tmp << 8) | *ptr++; + uu->time_mid = tmp; + + tmp = *ptr++; + tmp = (tmp << 8) | *ptr++; + uu->time_hi_and_version = tmp; + + tmp = *ptr++; + tmp = (tmp << 8) | *ptr++; + uu->clock_seq = tmp; + + memcpy(uu->node, ptr, 6); +} + +void uuid_generate_random(GUID *out) +{ + GUID tmp; + struct uuid uu; + + generate_random_buffer(tmp.info, sizeof(tmp.info), True); + uuid_unpack(tmp, &uu); + + uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000; + uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000; + uuid_pack(&uu, out); +} From a9aa9bd7fe84c06d35e666af4cfd2c52c6930c8b Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 13:54:18 +0000 Subject: [PATCH 232/262] Add lib/util_uuid.c to build. (This used to be commit ab0e863fcc4d8fc18291f04bedfd0dd52730d833) --- source3/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index 22e641eb063..b72fec60276 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -129,7 +129,7 @@ LIB_OBJ = lib/charcnv.o lib/debug.o lib/fault.o \ lib/util_getent.o lib/util_pw.o lib/access.o lib/smbrun.o \ lib/bitmap.o lib/crc32.o lib/snprintf.o lib/dprintf.o \ lib/xfile.o lib/wins_srv.o \ - lib/util_str.o lib/util_sid.o \ + lib/util_str.o lib/util_sid.o lib/util_uuid.o \ lib/util_unistr.o lib/util_file.o lib/data_blob.o \ lib/util.o lib/util_sock.o lib/util_sec.o \ lib/talloc.o lib/hash.o lib/substitute.o lib/fsusage.o \ From a40116204d0adc45ed5295cc3a1c5761466e1aa7 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 13:54:42 +0000 Subject: [PATCH 233/262] Allow ADS PDC to exist (This used to be commit e6ceb3482340e06d8a0a0963c6df6cf54090e5c3) --- source3/param/loadparm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0142d6c32d8..0967134b9b0 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3507,8 +3507,8 @@ static void set_server_role(void) case SEC_DOMAIN: case SEC_ADS: if (lp_domain_logons()) { - server_role = ROLE_DOMAIN_BDC; - DEBUG(10,("set_server_role:ROLE_DOMAIN_BDC\n")); + server_role = ROLE_DOMAIN_PDC; + DEBUG(10,("set_server_role:ROLE_DOMAIN_PDC\n")); break; } server_role = ROLE_DOMAIN_MEMBER; From 3e5939ccd5bb3347af8166c452e7540504691c92 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 13:55:31 +0000 Subject: [PATCH 234/262] Update secrets_fetch_domain_guid to generate and store it if it doesn't exist. Only does it for PDCs. (This used to be commit 3543f92c39a80c8b6eb7ca3188b87f0f15896f33) --- source3/passdb/secrets.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 943fa4713b2..ec67b743900 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -142,13 +142,22 @@ BOOL secrets_fetch_domain_guid(char *domain, GUID *guid) GUID *dyn_guid; fstring key; size_t size; + GUID new_guid; slprintf(key, sizeof(key)-1, "%s/%s", SECRETS_DOMAIN_GUID, domain); strupper(key); dyn_guid = (GUID *)secrets_fetch(key, &size); - if (dyn_guid == NULL) - return False; + DEBUG(6,("key is %s, guid is at %x, size is %d\n", key, dyn_guid, size)); + + if ((NULL == dyn_guid) && (ROLE_DOMAIN_PDC == lp_server_role())) { + uuid_generate_random(&new_guid); + if (!secrets_store_domain_guid(domain, &new_guid)) + return False; + dyn_guid = (GUID *)secrets_fetch(key, &size); + if (dyn_guid == NULL) + return False; + } if (size != sizeof(GUID)) { From cebad9a48dfb0da13ab71bd861199ce26c31c947 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Aug 2002 16:20:54 +0000 Subject: [PATCH 235/262] Bugfix for problem pointed out by Sean Trace . We can't check for POSIX errors in the blocking lock code as we may have never made a POSIX call (could have denied lock before POSIX checked). Jeremy. (This used to be commit 8403253f277299f566f2931fdec53b6e4ece376e) --- source3/smbd/blocking.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index d4a53d9a6d9..6623c6df646 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -282,9 +282,10 @@ static BOOL process_lockread(blocking_lock_record *blr) status = do_lock_spin( fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)numtoread, (SMB_BIG_UINT)startpos, READ_LOCK); if (NT_STATUS_V(status)) { - if ((errno != EACCES) && (errno != EAGAIN)) { + if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) && + !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) { /* - * We have other than a "can't get lock" POSIX + * We have other than a "can't get lock" * error. Send an error. * Return True so we get dequeued. */ @@ -348,9 +349,10 @@ static BOOL process_lock(blocking_lock_record *blr) status = do_lock_spin(fsp, conn, SVAL(inbuf,smb_pid), (SMB_BIG_UINT)count, (SMB_BIG_UINT)offset, WRITE_LOCK); if (NT_STATUS_IS_ERR(status)) { - if((errno != EACCES) && (errno != EAGAIN)) { + if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) && + !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) { /* - * We have other than a "can't get lock" POSIX + * We have other than a "can't get lock" * error. Send an error. * Return True so we get dequeued. */ @@ -432,12 +434,13 @@ static BOOL process_lockingX(blocking_lock_record *blr) reply_lockingX_success(blr); return True; - } else if ((errno != EACCES) && (errno != EAGAIN)) { - /* - * We have other than a "can't get lock" POSIX - * error. Free any locks we had and return an error. - * Return True so we get dequeued. - */ + } else if (!NT_STATUS_EQUAL(status,NT_STATUS_LOCK_NOT_GRANTED) && + !NT_STATUS_EQUAL(status,NT_STATUS_FILE_LOCK_CONFLICT)) { + /* + * We have other than a "can't get lock" + * error. Free any locks we had and return an error. + * Return True so we get dequeued. + */ blocking_lock_reply_error(blr, status); return True; From f3a15363d82b5b6204948ef623ad87c855dd5f57 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 12 Aug 2002 16:39:10 +0000 Subject: [PATCH 236/262] Use byteorder.h macros (This used to be commit eb9004efc3580799063009a8298c35cbc420626f) --- source3/lib/util_uuid.c | 54 +++++++---------------------------------- 1 file changed, 9 insertions(+), 45 deletions(-) diff --git a/source3/lib/util_uuid.c b/source3/lib/util_uuid.c index b70db8de5b0..63e25049820 100644 --- a/source3/lib/util_uuid.c +++ b/source3/lib/util_uuid.c @@ -38,60 +38,24 @@ struct uuid { static void uuid_pack(const struct uuid *uu, GUID *ptr) { - uint32 tmp; uint8 *out = ptr->info; - tmp = uu->time_low; - out[3] = (uint8) tmp; - tmp >>= 8; - out[2] = (uint8) tmp; - tmp >>= 8; - out[1] = (uint8) tmp; - tmp >>= 8; - out[0] = (uint8) tmp; - - tmp = uu->time_mid; - out[5] = (uint8) tmp; - tmp >>= 8; - out[4] = (uint8) tmp; - - tmp = uu->time_hi_and_version; - out[7] = (uint8) tmp; - tmp >>= 8; - out[6] = (uint8) tmp; - - tmp = uu->clock_seq; - out[9] = (uint8) tmp; - tmp >>= 8; - out[8] = (uint8) tmp; - + SIVAL(out, 0, uu->time_low); + SSVAL(out, 4, uu->time_mid); + SSVAL(out, 6, uu->time_hi_and_version); + SSVAL(out, 8, uu->clock_seq); memcpy(out+10, uu->node, 6); } static void uuid_unpack(const GUID in, struct uuid *uu) { const uint8 *ptr = in.info; - uint32 tmp; - tmp = *ptr++; - tmp = (tmp << 8) | *ptr++; - tmp = (tmp << 8) | *ptr++; - tmp = (tmp << 8) | *ptr++; - uu->time_low = tmp; - - tmp = *ptr++; - tmp = (tmp << 8) | *ptr++; - uu->time_mid = tmp; - - tmp = *ptr++; - tmp = (tmp << 8) | *ptr++; - uu->time_hi_and_version = tmp; - - tmp = *ptr++; - tmp = (tmp << 8) | *ptr++; - uu->clock_seq = tmp; - - memcpy(uu->node, ptr, 6); + uu->time_low = IVAL(ptr, 0); + uu->time_mid = SVAL(ptr, 4); + uu->time_hi_and_version = SVAL(ptr, 6); + uu->clock_seq = SVAL(ptr, 8); + memcpy(uu->node, ptr+10, 6); } void uuid_generate_random(GUID *out) From 093428852d660bd6c68e0700d219ce785d42e40c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 14 Aug 2002 10:20:51 +0000 Subject: [PATCH 237/262] unresolved symbols fix for pam_smbpass from Steve L. (This used to be commit 27618a5ca271aef4d5f2f9180729c7d09a46d587) --- source3/Makefile.in | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/source3/Makefile.in b/source3/Makefile.in index b72fec60276..b96ce8b1439 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -455,16 +455,9 @@ LIBSMBCLIENT_PICOBJS = $(LIBSMBCLIENT_OBJ:.o=.po) PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \ - lib/debug.o lib/util_sid.o lib/messages.o lib/util_str.o \ - lib/wins_srv.o lib/substitute.o lib/select.o lib/util.o \ - nsswitch/wb_client.o nsswitch/wb_common.o \ - lib/system.o lib/util_file.o \ - lib/genrand.o lib/username.o lib/util_getent.o lib/charcnv.o lib/time.o \ - lib/md4.o lib/util_unistr.o lib/signal.o lib/talloc.o \ - lib/ms_fnmatch.o lib/util_sock.o lib/smbrun.o \ - lib/util_sec.o lib/snprintf.o \ - ubiqx/ubi_sLinkList.o libsmb/smbencrypt.o libsmb/smbdes.o \ - $(PARAM_OBJ) $(TDB_OBJ) $(PASSDB_OBJ) + libsmb/smbencrypt.o libsmb/smbdes.o libsmb/nterr.o \ + $(PARAM_OBJ) $(LIB_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ + $(SECRETS_OBJ) $(UBIQX_OBJ) PAM_SMBPASS_PICOOBJ = $(PAM_SMBPASS_OBJ_0:.o=.po) From b28b28ee34fa4e1f2b8c212c488d9611b3192502 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 14 Aug 2002 10:21:53 +0000 Subject: [PATCH 238/262] added comment about a new specversion seen from client. Device mode size is still the same though. jerry (This used to be commit fb822e97cb832361062fbb2aa239d949cc83efed) --- source3/rpc_parse/parse_spoolss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index a1fa758791b..79760ff37ef 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -690,9 +690,11 @@ BOOL spoolss_io_devmode(char *desc, prs_struct *ps, int depth, DEVICEMODE *devmo Let the size determine that */ switch (devmode->specversion) { + /* list of observed spec version's */ case 0x0320: case 0x0400: case 0x0401: + case 0x040d: break; default: From 702687a3a4f236e8731f9c95805ccbdd38d13baa Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 15 Aug 2002 02:26:37 +0000 Subject: [PATCH 239/262] The unknown_0 field in a CREATE_USER2 reply is the access granted. (This used to be commit 8bca3085836255536794444248e7ff3a2460c045) --- source3/rpc_parse/parse_samr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index a6e1351aa17..d3634407270 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5069,7 +5069,7 @@ BOOL samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER * r_u, if(!smb_io_pol_hnd("user_pol", &r_u->user_pol, ps, depth)) return False; - if(!prs_uint32("unknown_0", ps, depth, &r_u->unknown_0)) + if(!prs_uint32("access_granted", ps, depth, &r_u->unknown_0)) return False; if(!prs_uint32("user_rid ", ps, depth, &r_u->user_rid)) return False; From ec7927a1445cebcfb58a0f613dd9d601390c8c76 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Thu, 15 Aug 2002 12:18:25 +0000 Subject: [PATCH 240/262] Fix NTLMSSP challenge command and auth response. We can now service joins from win2k AND still use SPNEGO (provided you don't build with kerberos...I still have to fix that, as we are not properly falling back). (This used to be commit 1f9b3d46c7c99e84b2983220f79613b7420c5ced) --- source3/libsmb/clispnego.c | 61 ++++++++++++++++++++++++++++++++++ source3/smbd/sesssetup.c | 68 +++++++++++++++++++++----------------- 2 files changed, 98 insertions(+), 31 deletions(-) diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 469b946088c..16702c375b2 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -2,6 +2,7 @@ Unix SMB/CIFS implementation. simple kerberos5/SPNEGO routines Copyright (C) Andrew Tridgell 2001 + Copyright (C) Jim McDonough 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -439,6 +440,28 @@ BOOL spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth) return True; } +/* + generate a minimal SPNEGO NTLMSSP response packet. Doesn't contain much. +*/ +DATA_BLOB spnego_gen_auth_response(void) +{ + ASN1_DATA data; + DATA_BLOB ret; + + memset(&data, 0, sizeof(data)); + + asn1_push_tag(&data, ASN1_CONTEXT(1)); + asn1_push_tag(&data, ASN1_SEQUENCE(0)); + asn1_push_tag(&data, ASN1_CONTEXT(0)); + asn1_write_enumerated(&data, 0); + asn1_pop_tag(&data); + asn1_pop_tag(&data); + asn1_pop_tag(&data); + + ret = data_blob(data.data, data.length); + asn1_free(&data); + return ret; +} /* this is a tiny msrpc packet generator. I am only using this to @@ -449,6 +472,7 @@ BOOL spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth) format specifiers are: U = unicode string (input is unix string) + a = address (1 byte type, 1 byte length, unicode string, all inline) B = data blob (pointer + length) b = data blob in header (pointer + length) d = word (4 bytes) @@ -473,6 +497,11 @@ BOOL msrpc_gen(DATA_BLOB *blob, head_size += 8; data_size += str_charnum(s) * 2; break; + case 'a': + n = va_arg(ap, int); + s = va_arg(ap, char *); + data_size += (str_charnum(s) * 2) + 4; + break; case 'B': b = va_arg(ap, uint8 *); head_size += 8; @@ -512,6 +541,19 @@ BOOL msrpc_gen(DATA_BLOB *blob, push_string(NULL, blob->data+data_ofs, s, n*2, STR_UNICODE|STR_NOALIGN); data_ofs += n*2; break; + case 'a': + n = va_arg(ap, int); + SSVAL(blob->data, data_ofs, n); data_ofs += 2; + s = va_arg(ap, char *); + n = str_charnum(s); + SSVAL(blob->data, data_ofs, n*2); data_ofs += 2; + if (0 < n) { + push_string(NULL, blob->data+data_ofs, s, n*2, + STR_UNICODE|STR_NOALIGN); + } + data_ofs += n*2; + break; + case 'B': b = va_arg(ap, uint8 *); n = va_arg(ap, int); @@ -550,6 +592,7 @@ BOOL msrpc_gen(DATA_BLOB *blob, format specifiers are: U = unicode string (output is unix string) + A = ascii string B = data blob b = data blob in header d = word (4 bytes) @@ -584,6 +627,24 @@ BOOL msrpc_parse(DATA_BLOB *blob, STR_UNICODE|STR_NOALIGN); (*ps) = strdup(p); break; + case 'A': + len1 = SVAL(blob->data, head_ofs); head_ofs += 2; + len2 = SVAL(blob->data, head_ofs); head_ofs += 2; + ptr = IVAL(blob->data, head_ofs); head_ofs += 4; + + /* make sure its in the right format - be strict */ + if (len1 != len2 || ptr + len1 > blob->length) { + return False; + } + ps = va_arg(ap, char **); + if (0 < len1) { + pull_string(NULL, p, blob->data + ptr, -1, + len1, STR_ASCII|STR_NOALIGN); + (*ps) = strdup(p); + } else { + (*ps) = NULL; + } + break; case 'B': len1 = SVAL(blob->data, head_ofs); head_ofs += 2; len2 = SVAL(blob->data, head_ofs); head_ofs += 2; diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index d45b04202e9..bb78129667c 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -3,6 +3,7 @@ handle SMBsessionsetup Copyright (C) Andrew Tridgell 1998-2001 Copyright (C) Andrew Bartlett 2001 + Copyright (C) Jim McDonough 2002 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -206,7 +207,7 @@ static int reply_spnego_kerberos(connection_struct *conn, send a security blob via a session setup reply ****************************************************************************/ static BOOL reply_sesssetup_blob(connection_struct *conn, char *outbuf, - DATA_BLOB blob) + DATA_BLOB blob, uint32 errcode) { char *p; @@ -215,7 +216,7 @@ static BOOL reply_sesssetup_blob(connection_struct *conn, char *outbuf, /* we set NT_STATUS_MORE_PROCESSING_REQUIRED to tell the other end that we aren't finished yet */ - SIVAL(outbuf, smb_rcls, NT_STATUS_V(NT_STATUS_MORE_PROCESSING_REQUIRED)); + SIVAL(outbuf, smb_rcls, errcode); SSVAL(outbuf, smb_vwv0, 0xFF); /* no chaining possible */ SSVAL(outbuf, smb_vwv3, blob.length); p = smb_buf(outbuf); @@ -242,11 +243,12 @@ static int reply_spnego_negotiate(connection_struct *conn, DATA_BLOB secblob; int i; uint32 ntlmssp_command, neg_flags, chal_flags; - DATA_BLOB chal, spnego_chal, extra_data; + DATA_BLOB chal, spnego_chal; const uint8 *cryptkey; BOOL got_kerberos = False; NTSTATUS nt_status; extern pstring global_myname; + char *cliname=NULL, *domname=NULL; /* parse out the OIDs and the first sec blob */ if (!parse_negTokenTarg(blob1, OIDs, &secblob)) { @@ -277,19 +279,16 @@ static int reply_spnego_negotiate(connection_struct *conn, file_save("secblob.dat", secblob.data, secblob.length); #endif - if (!msrpc_parse(&secblob, "CddB", + if (!msrpc_parse(&secblob, "CddAA", "NTLMSSP", &ntlmssp_command, &neg_flags, - &extra_data)) { + &cliname, + &domname)) { return ERROR_NT(NT_STATUS_LOGON_FAILURE); } - DEBUG(5, ("Extra data: \n")); - dump_data(5, extra_data.data, extra_data.length); - data_blob_free(&secblob); - data_blob_free(&extra_data); if (ntlmssp_command != NTLMSSP_NEGOTIATE) { return ERROR_NT(NT_STATUS_LOGON_FAILURE); @@ -318,36 +317,39 @@ static int reply_spnego_negotiate(connection_struct *conn, NTLMSSP_CHAL_TARGET_INFO; { - DATA_BLOB domain_blob, netbios_blob, realm_blob; + DATA_BLOB domain_blob, struct_blob; + fstring dnsname, dnsdomname; msrpc_gen(&domain_blob, "U", lp_workgroup()); - msrpc_gen(&netbios_blob, - "U", - global_myname); - - msrpc_gen(&realm_blob, - "U", - lp_realm()); - + fstrcpy(dnsdomname, lp_realm()); + strlower(dnsdomname); - msrpc_gen(&chal, "CddddbBBBB", + fstrcpy(dnsname, global_myname); + fstrcat(dnsname, "."); + fstrcat(dnsname, lp_realm()); + strlower(dnsname); + + msrpc_gen(&struct_blob, "aaaaa", + 2, lp_workgroup(), + 1, global_myname, + 4, dnsdomname, + 3, dnsname, + 0, NULL); + + msrpc_gen(&chal, "CdUdbddB", "NTLMSSP", NTLMSSP_CHALLENGE, - 0, - 0x30, /* ?? */ + lp_workgroup(), chal_flags, cryptkey, 8, - domain_blob.data, domain_blob.length, - domain_blob.data, domain_blob.length, - netbios_blob.data, netbios_blob.length, - realm_blob.data, realm_blob.length); + 0, 0, + struct_blob.data, struct_blob.length); data_blob_free(&domain_blob); - data_blob_free(&netbios_blob); - data_blob_free(&realm_blob); + data_blob_free(&struct_blob); } if (!spnego_gen_challenge(&spnego_chal, &chal, &chal)) { @@ -357,7 +359,7 @@ static int reply_spnego_negotiate(connection_struct *conn, } /* now tell the client to send the auth packet */ - reply_sesssetup_blob(conn, outbuf, spnego_chal); + reply_sesssetup_blob(conn, outbuf, spnego_chal, NT_STATUS_V(NT_STATUS_MORE_PROCESSING_REQUIRED)); data_blob_free(&chal); data_blob_free(&spnego_chal); @@ -374,7 +376,7 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, DATA_BLOB blob1) { - DATA_BLOB auth; + DATA_BLOB auth, response; char *workgroup = NULL, *user = NULL, *machine = NULL; DATA_BLOB lmhash, nthash, sess_key; DATA_BLOB plaintext_password = data_blob(NULL, 0); @@ -494,8 +496,12 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf, SSVAL(outbuf,smb_uid,sess_vuid); SSVAL(inbuf,smb_uid,sess_vuid); - - return chain_reply(inbuf,outbuf,length,bufsize); + + response = spnego_gen_auth_response(); + reply_sesssetup_blob(conn, outbuf, response, 0); + + /* and tell smbd that we have already replied to this packet */ + return -1; } From 10712f9a22c539c0f84bca96d73e2cf4d304566e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 15 Aug 2002 13:25:25 +0000 Subject: [PATCH 241/262] *** empty log message *** (This used to be commit cb72eead70509eddaa051571f3eed3c46304b5f8) --- source3/lib/account_pol.c | 2 +- source3/utils/pdbedit.c | 262 +++++++++++++++++++++++++------------- 2 files changed, 176 insertions(+), 88 deletions(-) diff --git a/source3/lib/account_pol.c b/source3/lib/account_pol.c index f603f0f191f..07b5e2ecfc6 100644 --- a/source3/lib/account_pol.c +++ b/source3/lib/account_pol.c @@ -100,7 +100,7 @@ static const char *decode_account_policy_name(int field) Get the account policy name as a string from its #define'ed number ****************************************************************************/ -int account_policy_name_to_feildnum(const char *name) +int account_policy_name_to_fieldnum(const char *name) { int i; for (i=0; account_policy_names[i].string; i++) { diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c index 96001c450f8..51dbbb98c06 100644 --- a/source3/utils/pdbedit.c +++ b/source3/utils/pdbedit.c @@ -23,6 +23,35 @@ #include "includes.h" +#define BIT_CONFIGFILE 0x00000001 +#define BIT_DEBUGLEVEL 0x00000002 +#define BIT_BACKEND 0x00000004 +#define BIT_VERBOSE 0x00000008 +#define BIT_SPSTYLE 0x00000010 +#define BIT_RESERV_1 0x00000020 +#define BIT_RESERV_2 0x00000040 +#define BIT_RESERV_3 0x00000080 +#define BIT_FULLNAME 0x00000100 +#define BIT_HOMEDIR 0x00000200 +#define BIT_HDIRDRIVE 0x00000400 +#define BIT_LOGSCRIPT 0x00000800 +#define BIT_PROFILE 0x00001000 +#define BIT_MACHINE 0x00002000 +#define BIT_RESERV_4 0x00004000 +#define BIT_USER 0x00008000 +#define BIT_LIST 0x00010000 +#define BIT_MODIFY 0x00020000 +#define BIT_CREATE 0x00040000 +#define BIT_DELETE 0x00080000 +#define BIT_ACCPOLICY 0x00100000 +#define BIT_ACCPOLVAL 0x00200000 +#define BIT_RESERV_6 0x00400000 +#define BIT_RESERV_7 0x00800000 +#define BIT_IMPORT 0x01000000 +#define BIT_EXPORT 0x02000000 + +#define MASK_ALWAYS_GOOD 0x0000001F +#define MASK_USER_GOOD 0x00001F00 extern pstring global_myname; extern BOOL AllowDebugChange; @@ -30,27 +59,21 @@ extern BOOL AllowDebugChange; Add all currently available users to another db ********************************************************/ -static int export_database (struct pdb_context *in, char *db){ - struct pdb_context *context; +static int export_database (struct pdb_context *in, struct pdb_context *out) { SAM_ACCOUNT *user = NULL; - if (!NT_STATUS_IS_OK(make_pdb_context_string(&context, db))){ - fprintf(stderr, "Can't initialize %s.\n", db); - return 1; - } - - if (!in->pdb_setsampwent(in, 0)){ + if (!in->pdb_setsampwent(in, 0)) { fprintf(stderr, "Can't sampwent!\n"); return 1; } - if (!NT_STATUS_IS_OK(pdb_init_sam(&user))){ + if (!NT_STATUS_IS_OK(pdb_init_sam(&user))) { fprintf(stderr, "Can't initialize new SAM_ACCOUNT!\n"); return 1; } - while (in->pdb_getsampwent(in,user)){ - context->pdb_add_sam_account(context,user); + while (in->pdb_getsampwent(in, user)) { + out->pdb_add_sam_account(out, user); if (!NT_STATUS_IS_OK(pdb_reset_sam(user))){ fprintf(stderr, "Can't reset SAM_ACCOUNT!\n"); return 1; @@ -396,7 +419,7 @@ static int delete_machine_entry (struct pdb_context *in, char *machinename) } if (!in->pdb_getsampwnam(in, samaccount, name)) { - fprintf (stderr, "user %s does not exist in the passdb\n", name); + fprintf (stderr, "machine %s does not exist in the passdb\n", name); return -1; } @@ -412,16 +435,17 @@ int main (int argc, char **argv) static BOOL list_users = False; static BOOL verbose = False; static BOOL spstyle = False; - static BOOL setparms = False; static BOOL machine = False; static BOOL add_user = False; static BOOL delete_user = False; - static BOOL import = False; + static BOOL modify_user = False; + uint32 setparms, checkparms; int opt; static char *full_name = NULL; static char *user_name = NULL; static char *home_dir = NULL; static char *home_drive = NULL; + static char *backend = NULL; static char *backend_in = NULL; static char *backend_out = NULL; static char *logon_script = NULL; @@ -432,28 +456,32 @@ int main (int argc, char **argv) static long int account_policy_value = 0; BOOL account_policy_value_set = False; - struct pdb_context *in; + struct pdb_context *bin; + struct pdb_context *bout; + struct pdb_context *bdef; poptContext pc; struct poptOption long_options[] = { POPT_AUTOHELP - {"list", 'l',POPT_ARG_VAL, &list_users, 1, "list all users", NULL}, - {"verbose", 'v',POPT_ARG_VAL, &verbose, 1, "be verbose", NULL }, - {"smbpasswd-style", 'w',POPT_ARG_VAL, &spstyle, 1, "give output in smbpasswd style", NULL}, - {"user", 'u',POPT_ARG_STRING,&user_name, 0, "use username", "USER" }, - {"fullname", 'f',POPT_ARG_STRING,&full_name, 0, "set full name", NULL}, - {"homedir", 'h',POPT_ARG_STRING,&home_dir, 0, "set home directory", NULL}, - {"drive", 'd',POPT_ARG_STRING,&home_drive, 0, "set home drive", NULL}, - {"script", 's',POPT_ARG_STRING,&logon_script, 0, "set logon script", NULL}, - {"profile", 'p',POPT_ARG_STRING,&profile_path, 0, "set profile path", NULL}, - {"create", 'a',POPT_ARG_VAL,&add_user, 1, "create user", NULL}, - {"machine", 'm',POPT_ARG_VAL,&machine, 1,"account is a machine account",NULL}, - {"delete", 'x',POPT_ARG_VAL,&delete_user,1,"delete user",NULL}, - {"import", 'i',POPT_ARG_STRING,&backend_in,0,"use different passdb backend",NULL}, - {"export", 'e',POPT_ARG_STRING,&backend_out,0,"export user accounts to backend", NULL}, - {"debuglevel", 'D',POPT_ARG_STRING, &new_debuglevel,0,"set debuglevel",NULL}, - {"configfile", 'c',POPT_ARG_STRING, &config_file,0,"use different configuration file",NULL}, - {"account-policy",'P',POPT_ARG_STRING, &account_policy,0,"value of an account policy (like maximum password age)",NULL}, - {"value", 'V',POPT_ARG_LONG, &account_policy_value,'V',"set the account policy to this value", NULL}, + {"list", 'l', POPT_ARG_NONE, &list_users, 0, "list all users", NULL}, + {"verbose", 'v', POPT_ARG_NONE, &verbose, 0, "be verbose", NULL }, + {"smbpasswd-style", 'w',POPT_ARG_NONE, &spstyle, 0, "give output in smbpasswd style", NULL}, + {"user", 'u', POPT_ARG_STRING, &user_name, 0, "use username", "USER" }, + {"fullname", 'f', POPT_ARG_STRING, &full_name, 0, "set full name", NULL}, + {"homedir", 'h', POPT_ARG_STRING, &home_dir, 0, "set home directory", NULL}, + {"drive", 'd', POPT_ARG_STRING, &home_drive, 0, "set home drive", NULL}, + {"script", 's', POPT_ARG_STRING, &logon_script, 0, "set logon script", NULL}, + {"profile", 'p', POPT_ARG_STRING, &profile_path, 0, "set profile path", NULL}, + {"create", 'a', POPT_ARG_NONE, &add_user, 0, "create user", NULL}, + {"modify", 'r', POPT_ARG_NONE, &modify_user, 0, "modify user", NULL}, + {"machine", 'm', POPT_ARG_NONE, &machine, 0, "account is a machine account", NULL}, + {"delete", 'x', POPT_ARG_NONE, &delete_user, 0, "delete user", NULL}, + {"backend", 'b', POPT_ARG_STRING, &backend, 0, "use different passdb backend as default backend", NULL}, + {"import", 'i', POPT_ARG_STRING, &backend_in, 0, "import user accounts from this backend", NULL}, + {"export", 'e', POPT_ARG_STRING, &backend_out, 0, "export user accounts to this backend", NULL}, + {"debuglevel", 'D', POPT_ARG_STRING, &new_debuglevel, 0,"set debuglevel",NULL}, + {"configfile", 'c', POPT_ARG_STRING, &config_file, 0,"use different configuration file",NULL}, + {"account-policy", 'P', POPT_ARG_STRING, &account_policy, 0,"value of an account policy (like maximum password age)",NULL}, + {"value", 'V', POPT_ARG_LONG, &account_policy_value, 'V',"set the account policy to this value", NULL}, {0,0,0,0} }; @@ -470,39 +498,67 @@ int main (int argc, char **argv) } } - if (new_debuglevel){ + if (new_debuglevel) { debug_parse_levels(new_debuglevel); AllowDebugChange = False; } if (!lp_load(config_file,True,False,False)) { - fprintf(stderr, "Can't load %s - run testparm to debug it\n", - config_file); + fprintf(stderr, "Can't load %s - run testparm to debug it\n", config_file); exit(1); } - - - setparms = (full_name || home_dir || home_drive || logon_script || profile_path); - - if (((add_user?1:0) + (delete_user?1:0) + (list_users?1:0) + (import?1:0) + (setparms?1:0)) + (backend_out?1:0) + (account_policy?1:0) > 1) { - fprintf (stderr, "Incompatible options on command line!\n"); - exit(1); + + setparms = (config_file ? BIT_CONFIGFILE : 0) + + (new_debuglevel ? BIT_DEBUGLEVEL : 0) + + (backend ? BIT_BACKEND : 0) + + (verbose ? BIT_VERBOSE : 0) + + (spstyle ? BIT_SPSTYLE : 0) + + (full_name ? BIT_FULLNAME : 0) + + (home_dir ? BIT_HOMEDIR : 0) + + (home_drive ? BIT_HDIRDRIVE : 0) + + (logon_script ? BIT_LOGSCRIPT : 0) + + (profile_path ? BIT_PROFILE : 0) + + (machine ? BIT_MACHINE : 0) + + (user_name ? BIT_USER : 0) + + (list_users ? BIT_LIST : 0) + + (modify_user ? BIT_MODIFY : 0) + + (add_user ? BIT_CREATE : 0) + + (delete_user ? BIT_DELETE : 0) + + (account_policy ? BIT_ACCPOLICY : 0) + + (account_policy_value_set ? BIT_ACCPOLVAL : 0) + + (backend_in ? BIT_IMPORT : 0) + + (backend_out ? BIT_EXPORT : 0); + + if (setparms & BIT_BACKEND) { + if (!NT_STATUS_IS_OK(make_pdb_context_string(&bdef, backend))) { + fprintf(stderr, "Can't initialize passdb backend.\n"); + return 1; + } + } else { + if (!NT_STATUS_IS_OK(make_pdb_context_list(&bdef, lp_passdb_backend()))) { + fprintf(stderr, "Can't initialize passdb backend.\n"); + return 1; + } } - if (account_policy) { + /* the lowest bit options are always accepted */ + checkparms = setparms & ~MASK_ALWAYS_GOOD; + + /* accoun tpolicy operations */ + if ((checkparms & BIT_ACCPOLICY) && !(checkparms & ~(BIT_ACCPOLICY + BIT_ACCPOLVAL))) { uint32 value; - int field = account_policy_name_to_feildnum(account_policy); + int field = account_policy_name_to_fieldnum(account_policy); if (field == 0) { fprintf(stderr, "No account policy by that name\n"); exit(1); } - if (!account_policy_get(field, &value)){ + if (!account_policy_get(field, &value)) { fprintf(stderr, "valid account policy, but unable to fetch value!\n"); exit(1); } if (account_policy_value_set) { printf("account policy value for %s was %u\n", account_policy, value); - if (!account_policy_set(field, account_policy_value)){ + if (!account_policy_set(field, account_policy_value)) { fprintf(stderr, "valid account policy, but unable to set value!\n"); exit(1); } @@ -514,63 +570,95 @@ int main (int argc, char **argv) } } - if (!backend_in) { - if (!NT_STATUS_IS_OK(make_pdb_context_list(&in, lp_passdb_backend()))){ - fprintf(stderr, "Can't initialize passdb backend.\n"); - return 1; + /* import and export operations */ + if (((checkparms & BIT_IMPORT) || (checkparms & BIT_EXPORT)) + && !(checkparms & ~(BIT_IMPORT +BIT_EXPORT))) { + if (backend_in) { + if (!NT_STATUS_IS_OK(make_pdb_context_string(&bin, backend_in))) { + fprintf(stderr, "Can't initialize passdb backend.\n"); + return 1; + } + } else { + bin = bdef; } - } else { - if (!NT_STATUS_IS_OK(make_pdb_context_string(&in, backend_in))){ - fprintf(stderr, "Can't initialize passdb backend.\n"); - return 1; + if (backend_out) { + if (!NT_STATUS_IS_OK(make_pdb_context_string(&bout, backend_out))) { + fprintf(stderr, "Can't initialize %s.\n", backend_out); + return 1; + } + } else { + bout = bdef; } + return export_database(bin, bout); } - if (add_user) { - if (!user_name) { + /* if BIT_USER is defined but nothing else then threat it as -l -u for compatibility */ + /* fake up BIT_LIST if only BIT_USER is defined */ + if ((checkparms & BIT_USER) && !(checkparms & ~BIT_USER)) { + checkparms += BIT_LIST; + } + + /* modify flag is optional to maintain backwards compatibility */ + /* fake up BIT_MODIFY if BIT_USER and at least one of MASK_USER_GOOD is defined */ + if (!((checkparms & ~MASK_USER_GOOD) & ~BIT_USER) && (checkparms & MASK_USER_GOOD)) { + checkparms += BIT_MODIFY; + } + + /* list users operations */ + if (checkparms & BIT_LIST) { + if (!(checkparms & ~BIT_LIST)) { + return print_users_list (bdef, verbose, spstyle); + } + if (!(checkparms & ~(BIT_USER + BIT_LIST))) { + return print_user_info (bdef, user_name, verbose, spstyle); + } + } + + /* mask out users options */ + checkparms &= ~MASK_USER_GOOD; + + /* account operation */ + if ((checkparms & BIT_CREATE) || (checkparms & BIT_MODIFY) || (checkparms & BIT_DELETE)) { + /* check use of -u option */ + if (!(checkparms & BIT_USER)) { fprintf (stderr, "Username not specified! (use -u option)\n"); return -1; } - if (machine) - return new_machine (in, user_name); - else - return new_user (in, user_name, full_name, home_dir, - home_drive, logon_script, - profile_path); - } - if (delete_user) { - if (!user_name) { - fprintf (stderr, "Username not specified! (use -u option)\n"); - return -1; + /* account creation operations */ + if (!(checkparms & ~(BIT_CREATE + BIT_USER + BIT_MACHINE))) { + if (checkparms & BIT_MACHINE) { + return new_machine (bdef, user_name); + } else { + return new_user (bdef, user_name, full_name, home_dir, + home_drive, logon_script, + profile_path); + } } - if (machine) - return delete_machine_entry (in, user_name); - else - return delete_user_entry (in, user_name); - } - if (user_name) { - if (setparms) - return set_user_info (in, user_name, full_name, + /* account deletion operations */ + if (!(checkparms & ~(BIT_DELETE + BIT_USER + BIT_MACHINE))) { + if (checkparms & BIT_MACHINE) { + return delete_machine_entry (bdef, user_name); + } else { + return delete_user_entry (bdef, user_name); + } + } + + /* account modification operations */ + if (!(checkparms & ~(BIT_MODIFY + BIT_USER))) { + return set_user_info (bdef, user_name, full_name, home_dir, home_drive, logon_script, profile_path); - else - return print_user_info (in, user_name, verbose, - spstyle); + } } - if (list_users) - return print_users_list (in, verbose, spstyle); - - if (backend_out) - return export_database(in, backend_out); - + if (setparms >= 0x20) { + fprintf (stderr, "Incompatible or insufficient options on command line!\n"); + } poptPrintHelp(pc, stderr, 0); return 1; } - - From 3941058359150a7c2d2084d459620364f1bfacc0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 15 Aug 2002 13:56:33 +0000 Subject: [PATCH 242/262] large set of updates converting some of the textdocs to SGML/DocBook. I think these were originally from Jelmer, but I've lost the original message. Also had some syntax errors in the manpages (does no one regenerate after making changes to the SGML source?) Still have some developer specific docs to add from Jelmer in the next go around.... (This used to be commit 5f673b788314325699a64377d514dda435e6c478) --- docs/Samba-HOWTO-Collection.pdf | Bin 255382 -> 343506 bytes docs/docbook/Makefile.in | 4 +- docs/docbook/manpages/smb.conf.5.sgml | 35 +- docs/docbook/projdoc/Browsing.sgml | 800 ++ docs/docbook/projdoc/Bugs.sgml | 202 + docs/docbook/projdoc/Diagnosis.sgml | 509 ++ docs/docbook/projdoc/Printing.sgml | 398 + docs/docbook/projdoc/Speed.sgml | 578 ++ docs/docbook/projdoc/samba-doc.sgml | 16 +- docs/docbook/projdoc/security_level.sgml | 140 + docs/docbook/projdoc/winbind.sgml | 192 +- docs/htmldocs/Browsing.html | 741 ++ docs/htmldocs/Bugs.html | 238 + docs/htmldocs/Diagnosis.html | 548 ++ docs/htmldocs/Integrating-with-Windows.html | 20 +- docs/htmldocs/Printing.html | 408 ++ docs/htmldocs/Samba-HOWTO-Collection.html | 7265 ++++++++++++++----- docs/htmldocs/Samba-LDAP-HOWTO.html | 4 +- docs/htmldocs/Samba-PDC-HOWTO.html | 2 +- docs/htmldocs/Speed.html | 550 ++ docs/htmldocs/UNIX_INSTALL.html | 29 +- docs/htmldocs/rpcclient.1.html | 43 +- docs/htmldocs/security_level.html | 169 + docs/htmldocs/smb.conf.5.html | 1221 +--- docs/htmldocs/smbcontrol.1.html | 69 +- docs/htmldocs/winbind.html | 260 +- docs/manpages/rpcclient.1 | 20 +- docs/manpages/smb.conf.5 | 462 +- docs/manpages/smbcontrol.1 | 41 +- 29 files changed, 11428 insertions(+), 3536 deletions(-) create mode 100644 docs/docbook/projdoc/Browsing.sgml create mode 100644 docs/docbook/projdoc/Bugs.sgml create mode 100644 docs/docbook/projdoc/Diagnosis.sgml create mode 100644 docs/docbook/projdoc/Printing.sgml create mode 100644 docs/docbook/projdoc/Speed.sgml create mode 100644 docs/docbook/projdoc/security_level.sgml create mode 100644 docs/htmldocs/Browsing.html create mode 100644 docs/htmldocs/Bugs.html create mode 100644 docs/htmldocs/Diagnosis.html create mode 100644 docs/htmldocs/Printing.html create mode 100644 docs/htmldocs/Speed.html create mode 100644 docs/htmldocs/security_level.html diff --git a/docs/Samba-HOWTO-Collection.pdf b/docs/Samba-HOWTO-Collection.pdf index e9e530034f54f4066f36c199263d4701daa82fb6..e47621a0b84ddb45b69e8eed1c6de4dc71b37805 100644 GIT binary patch literal 343506 zcmbSU2Ygh;^GBKzq)3xaAhZC<<@y~`3@H#uBMCLMBRP^lk_&eUy@()HdPk7nq)Bg5 z1O+M51wlGUFVaCp{xiGp?(OX>$M5gwBk$hj_RZ|h?9A+UX7|;K504De2J8H4UB7Ys zw4c^L#NW}qXQM`%c&8&ZFU9Vxo1UAMnd(UK*9KdHwOao$M^1ldMp}BVzt(Cs2kAmW zwEht`SAYLRM~~dTHmBX6w#;=k@DI(*^iROwy8ILDF1xdjJvBH`6Xvwrax)y+;kI0R z-SCF+1YL+lYt&kFrVwMtKuuCcZl=9%VrWdWP<&QTdrGcce;QQ@NP5*HfdtdPKD0-={%iG>YroR zL}aHpQZusCG~pRNdf1)z>=e5z*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<>4s0^y@CGKA8x9e5Ud)dJXpy+|nrAohv?z_3Cqz<9Xy z=}L@2U_Y@#gA5RHL4X!3 zc>qj=i8xHVqTw2B8;%W_tH>aF&q_@~9z>5MHF%UjuCxd^u29jzREpA(bULP0) z#uq~fWo!%~l;bguw;A8IlLoVh-^YBZoL;Z(KE4>zjW%i|#6Tkq30FZPI5-R8=NmC@ z(U|~-Pk@f60zT;wAnd=58W^OMV~vCuyi-AoB3hXM7}g927}lu+nBq7A&3~wUFdu59 z7i=R2dd(OMg;;0`&qC^n?ih>&YE#*ez+gu#6k_j207B*~oQlN257%OxfhZ4SH8e$0 z0}u5EoLdlVNsdk~UV;D-b5)?tn5}}U5}LX|pAU2#;Q|cwqa|>-4{4AC{{aXd8+#ag zPZ#cEew0puGf)r4I0IG=6F9IyXk-c$!;lAhP8^6w&~t+73|h#6haopWi3UrIZG?^y zvHRGvIjpvL2}(OyumveTTJD54IyTM$Fy?FbikyLi#}KbZb1oWQ{= zGLrd4Y07t?s?juf!=DMV0-;FA3G(L!1n>hOktf-~BsVy~Kg4ms|GWb}Kc^WR=N}Wt Te0vTEgEsocket address socket options source environment - + use spnego stat cache stat cache size strip dot @@ -1102,7 +1102,13 @@ %u +add group script (G) +This is the full pathname to a script that will + be run AS ROOT by smbd(8) when a new group is requested. It will expand any %g to the group name passed. This script is only useful for installations using the Windows NT domain administration tools. + + + @@ -1910,6 +1916,7 @@ This script is called when a remote client removes a user from the server, normally using 'User Manager for Domains' or rpcclient. + This script should delete the given UNIX username. @@ -3281,10 +3288,9 @@ ldap admin dn (G) - - The ldap admin dn defines the Distinguished - Name (DN) name used by Samba to contact the ldap - server when retreiving user account information. The ldap + The ldap admin dn defines the Distinguished + Name (DN) name used by Samba to contact the ldap server when retreiving + user account information. The ldap admin dn is used in conjunction with the admin dn password stored in the private/secrets.tdb file. See the smbpasswd(8) man @@ -3301,8 +3307,7 @@ ldap filter (G) - - This parameter specifies the RFC 2254 compliant LDAP search filter. + This parameter specifies the RFC 2254 compliant LDAP search filter. The default is to match the login name with the uid attribute for all entries matching the sambaAccount objectclass. Note that this filter should only return one entry. @@ -3316,10 +3321,9 @@ ldap ssl (G) - - This option is used to define whether or not Samba should - use SSL when connecting to the ldap - server. This is NOT related to + This option is used to define whether or not Samba should + use SSL when connecting to the ldap server + This is NOT related to Samba's previous SSL support which was enabled by specifying the --with-ssl option to the configure script. @@ -3365,7 +3369,7 @@ - ldap machine suffix (G) + ldap machine suffix (G) It specifies where machines should be added to the ldap tree. @@ -6962,7 +6966,12 @@ /usr/local/smb_env_vars - + +use spnego (G) + This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000sp2 clients to agree upon an authentication mechanism. As of samba 3.0alpha it must be set to "no" for these clients to join a samba domain controller. It can be set to "yes" to allow samba to participate in an AD domain controlled by a Windows2000 domain controller. +Default: use spnego = yes + + stat cache (G) diff --git a/docs/docbook/projdoc/Browsing.sgml b/docs/docbook/projdoc/Browsing.sgml new file mode 100644 index 00000000000..a463ea786b4 --- /dev/null +++ b/docs/docbook/projdoc/Browsing.sgml @@ -0,0 +1,800 @@ + + + + + Samba Team + + + + + (5 July 1998) + + +Improved browsing in samba + + +Overview of browsing + + +SMB networking provides a mechanism by which clients can access a list +of machines in a network, a so-called "browse list". This list +contains machines that are ready to offer file and/or print services +to other machines within the network. Thus it does not include +machines which aren't currently able to do server tasks. The browse +list is heavily used by all SMB clients. Configuration of SMB +browsing has been problematic for some Samba users, hence this +document. + + + +Browsing will NOT work if name resolution from NetBIOS names to IP +addresses does not function correctly. Use of a WINS server is highly +recommended to aid the resolution of NetBIOS (SMB) names to IP addresses. +WINS allows remote segment clients to obtain NetBIOS name_type information +that can NOT be provided by any other means of name resolution. + + + + + +Browsing support in samba + + +Samba now fully supports browsing. The browsing is supported by nmbd +and is also controlled by options in the smb.conf file (see smb.conf(5)). + + + +Samba can act as a local browse master for a workgroup and the ability +for samba to support domain logons and scripts is now available. See +DOMAIN.txt for more information on domain logons. + + + +Samba can also act as a domain master browser for a workgroup. This +means that it will collate lists from local browse masters into a +wide area network server list. In order for browse clients to +resolve the names they may find in this list, it is recommended that +both samba and your clients use a WINS server. + + + +Note that you should NOT set Samba to be the domain master for a +workgroup that has the same name as an NT Domain: on each wide area +network, you must only ever have one domain master browser per workgroup, +regardless of whether it is NT, Samba or any other type of domain master +that is providing this service. + + + +[Note that nmbd can be configured as a WINS server, but it is not +necessary to specifically use samba as your WINS server. NTAS can +be configured as your WINS server. In a mixed NT server and +samba environment on a Wide Area Network, it is recommended that +you use the NT server's WINS server capabilities. In a samba-only +environment, it is recommended that you use one and only one nmbd +as your WINS server]. + + + +To get browsing to work you need to run nmbd as usual, but will need +to use the "workgroup" option in smb.conf to control what workgroup +Samba becomes a part of. + + + +Samba also has a useful option for a Samba server to offer itself for +browsing on another subnet. It is recommended that this option is only +used for 'unusual' purposes: announcements over the internet, for +example. See "remote announce" in the smb.conf man page. + + + + +Problem resolution + + +If something doesn't work then hopefully the log.nmb file will help +you track down the problem. Try a debug level of 2 or 3 for finding +problems. Also note that the current browse list usually gets stored +in text form in a file called browse.dat. + + + +Note that if it doesn't work for you, then you should still be able to +type the server name as \\SERVER in filemanager then hit enter and +filemanager should display the list of available shares. + + + +Some people find browsing fails because they don't have the global +"guest account" set to a valid account. Remember that the IPC$ +connection that lists the shares is done as guest, and thus you must +have a valid guest account. + + + +Also, a lot of people are getting bitten by the problem of too many +parameters on the command line of nmbd in inetd.conf. This trick is to +not use spaces between the option and the parameter (eg: -d2 instead +of -d 2), and to not use the -B and -N options. New versions of nmbd +are now far more likely to correctly find your broadcast and network +address, so in most cases these aren't needed. + + + +The other big problem people have is that their broadcast address, +netmask or IP address is wrong (specified with the "interfaces" option +in smb.conf) + + + + +Browsing across subnets + +With the release of Samba 1.9.17(alpha1 and above) Samba has been +updated to enable it to support the replication of browse lists +across subnet boundaries. New code and options have been added to +achieve this. This section describes how to set this feature up +in different settings. + + + +To see browse lists that span TCP/IP subnets (ie. networks separated +by routers that don't pass broadcast traffic) you must set up at least +one WINS server. The WINS server acts as a DNS for NetBIOS names, allowing +NetBIOS name to IP address translation to be done by doing a direct +query of the WINS server. This is done via a directed UDP packet on +port 137 to the WINS server machine. The reason for a WINS server is +that by default, all NetBIOS name to IP address translation is done +by broadcasts from the querying machine. This means that machines +on one subnet will not be able to resolve the names of machines on +another subnet without using a WINS server. + + + +Remember, for browsing across subnets to work correctly, all machines, +be they Windows 95, Windows NT, or Samba servers must have the IP address +of a WINS server given to them by a DHCP server, or by manual configuration +(for Win95 and WinNT, this is in the TCP/IP Properties, under Network +settings) for Samba this is in the smb.conf file. + + + +How does cross subnet browsing work ? + + +Cross subnet browsing is a complicated dance, containing multiple +moving parts. It has taken Microsoft several years to get the code +that achieves this correct, and Samba lags behind in some areas. +However, with the 1.9.17 release, Samba is capable of cross subnet +browsing when configured correctly. + + + +Consider a network set up as follows : + + + + + (DMB) + N1_A N1_B N1_C N1_D N1_E + | | | | | + ------------------------------------------------------- + | subnet 1 | + +---+ +---+ + |R1 | Router 1 Router 2 |R2 | + +---+ +---+ + | | + | subnet 2 subnet 3 | + -------------------------- ------------------------------------ + | | | | | | | | + N2_A N2_B N2_C N2_D N3_A N3_B N3_C N3_D + (WINS) + + + + +Consisting of 3 subnets (1, 2, 3) connected by two routers +(R1, R2) - these do not pass broadcasts. Subnet 1 has 5 machines +on it, subnet 2 has 4 machines, subnet 3 has 4 machines. Assume +for the moment that all these machines are configured to be in the +same workgroup (for simplicities sake). Machine N1_C on subnet 1 +is configured as Domain Master Browser (ie. it will collate the +browse lists for the workgroup). Machine N2_D is configured as +WINS server and all the other machines are configured to register +their NetBIOS names with it. + + + +As all these machines are booted up, elections for master browsers +will take place on each of the three subnets. Assume that machine +N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on +subnet 3 - these machines are known as local master browsers for +their particular subnet. N1_C has an advantage in winning as the +local master browser on subnet 1 as it is set up as Domain Master +Browser. + + + +On each of the three networks, machines that are configured to +offer sharing services will broadcast that they are offering +these services. The local master browser on each subnet will +receive these broadcasts and keep a record of the fact that +the machine is offering a service. This list of records is +the basis of the browse list. For this case, assume that +all the machines are configured to offer services so all machines +will be on the browse list. + + + +For each network, the local master browser on that network is +considered 'authoritative' for all the names it receives via +local broadcast. This is because a machine seen by the local +master browser via a local broadcast must be on the same +network as the local master browser and thus is a 'trusted' +and 'verifiable' resource. Machines on other networks that +the local master browsers learn about when collating their +browse lists have not been directly seen - these records are +called 'non-authoritative'. + + + +At this point the browse lists look as follows (these are +the machines you would see in your network neighborhood if +you looked in it on a particular network right now). + + + + +Subnet Browse Master List +------ ------------- ---- +Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E + +Subnet2 N2_B N2_A, N2_B, N2_C, N2_D + +Subnet3 N3_D N3_A, N3_B, N3_C, N3_D + + + + +Note that at this point all the subnets are separate, no +machine is seen across any of the subnets. + + + +Now examine subnet 2. As soon as N2_B has become the local +master browser it looks for a Domain master browser to synchronize +its browse list with. It does this by querying the WINS server +(N2_D) for the IP address associated with the NetBIOS name +WORKGROUP>1B<. This name was registerd by the Domain master +browser (N1_C) with the WINS server as soon as it was booted. + + + +Once N2_B knows the address of the Domain master browser it +tells it that is the local master browser for subnet 2 by +sending a MasterAnnouncement packet as a UDP port 138 packet. +It then synchronizes with it by doing a NetServerEnum2 call. This +tells the Domain Master Browser to send it all the server +names it knows about. Once the domain master browser receives +the MasterAnnouncement packet it schedules a synchronization +request to the sender of that packet. After both synchronizations +are done the browse lists look like : + + + + +Subnet Browse Master List +------ ------------- ---- +Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E, + N2_A(*), N2_B(*), N2_C(*), N2_D(*) + +Subnet2 N2_B N2_A, N2_B, N2_C, N2_D + N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*) + +Subnet3 N3_D N3_A, N3_B, N3_C, N3_D + +Servers with a (*) after them are non-authoritative names. + + + + +At this point users looking in their network neighborhood on +subnets 1 or 2 will see all the servers on both, users on +subnet 3 will still only see the servers on their own subnet. + + + +The same sequence of events that occured for N2_B now occurs +for the local master browser on subnet 3 (N3_D). When it +synchronizes browse lists with the domain master browser (N1_A) +it gets both the server entries on subnet 1, and those on +subnet 2. After N3_D has synchronized with N1_C and vica-versa +the browse lists look like. + + + + +Subnet Browse Master List +------ ------------- ---- +Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E, + N2_A(*), N2_B(*), N2_C(*), N2_D(*), + N3_A(*), N3_B(*), N3_C(*), N3_D(*) + +Subnet2 N2_B N2_A, N2_B, N2_C, N2_D + N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*) + +Subnet3 N3_D N3_A, N3_B, N3_C, N3_D + N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*), + N2_A(*), N2_B(*), N2_C(*), N2_D(*) + +Servers with a (*) after them are non-authoritative names. + + + + +At this point users looking in their network neighborhood on +subnets 1 or 3 will see all the servers on all sunbets, users on +subnet 2 will still only see the servers on subnets 1 and 2, but not 3. + + + +Finally, the local master browser for subnet 2 (N2_B) will sync again +with the domain master browser (N1_C) and will recieve the missing +server entries. Finally - and as a steady state (if no machines +are removed or shut off) the browse lists will look like : + + + + +Subnet Browse Master List +------ ------------- ---- +Subnet1 N1_C N1_A, N1_B, N1_C, N1_D, N1_E, + N2_A(*), N2_B(*), N2_C(*), N2_D(*), + N3_A(*), N3_B(*), N3_C(*), N3_D(*) + +Subnet2 N2_B N2_A, N2_B, N2_C, N2_D + N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*) + N3_A(*), N3_B(*), N3_C(*), N3_D(*) + +Subnet3 N3_D N3_A, N3_B, N3_C, N3_D + N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*), + N2_A(*), N2_B(*), N2_C(*), N2_D(*) + +Servers with a (*) after them are non-authoritative names. + + + + +Synchronizations between the domain master browser and local +master browsers will continue to occur, but this should be a +steady state situation. + + + +If either router R1 or R2 fails the following will occur: + + + + + + Names of computers on each side of the inaccessible network fragments + will be maintained for as long as 36 minutes, in the network neighbourhood + lists. + + + + + + Attempts to connect to these inaccessible computers will fail, but the + names will not be removed from the network neighbourhood lists. + + + + + + If one of the fragments is cut off from the WINS server, it will only + be able to access servers on its local subnet, by using subnet-isolated + broadcast NetBIOS name resolution. The effects are similar to that of + losing access to a DNS server. + + + + + + + +Setting up a WINS server + + +Either a Samba machine or a Windows NT Server machine may be set up +as a WINS server. To set a Samba machine to be a WINS server you must +add the following option to the smb.conf file on the selected machine : +in the [globals] section add the line + + + + wins support = yes + + + +Versions of Samba previous to 1.9.17 had this parameter default to +yes. If you have any older versions of Samba on your network it is +strongly suggested you upgrade to 1.9.17 or above, or at the very +least set the parameter to 'no' on all these machines. + + + +Machines with "wins support = yes" will keep a list of +all NetBIOS names registered with them, acting as a DNS for NetBIOS names. + + + +You should set up only ONE wins server. Do NOT set the +"wins support = yes" option on more than one Samba +server. + + + +To set up a Windows NT Server as a WINS server you need to set up +the WINS service - see your NT documentation for details. Note that +Windows NT WINS Servers can replicate to each other, allowing more +than one to be set up in a complex subnet environment. As Microsoft +refuse to document these replication protocols Samba cannot currently +participate in these replications. It is possible in the future that +a Samba->Samba WINS replication protocol may be defined, in which +case more than one Samba machine could be set up as a WINS server +but currently only one Samba server should have the "wins support = yes" +parameter set. + + + +After the WINS server has been configured you must ensure that all +machines participating on the network are configured with the address +of this WINS server. If your WINS server is a Samba machine, fill in +the Samba machine IP address in the "Primary WINS Server" field of +the "Control Panel->Network->Protocols->TCP->WINS Server" dialogs +in Windows 95 or Windows NT. To tell a Samba server the IP address +of the WINS server add the following line to the [global] section of +all smb.conf files : + + + + wins server = >name or IP address< + + + +where >name or IP address< is either the DNS name of the WINS server +machine or its IP address. + + + +Note that this line MUST NOT BE SET in the smb.conf file of the Samba +server acting as the WINS server itself. If you set both the +"wins support = yes" option and the +"wins server = >name<" option then +nmbd will fail to start. + + + +There are two possible scenarios for setting up cross subnet browsing. +The first details setting up cross subnet browsing on a network containing +Windows 95, Samba and Windows NT machines that are not configured as +part of a Windows NT Domain. The second details setting up cross subnet +browsing on networks that contain NT Domains. + + + + + +Setting up Browsing in a WORKGROUP + + +To set up cross subnet browsing on a network containing machines +in up to be in a WORKGROUP, not an NT Domain you need to set up one +Samba server to be the Domain Master Browser (note that this is *NOT* +the same as a Primary Domain Controller, although in an NT Domain the +same machine plays both roles). The role of a Domain master browser is +to collate the browse lists from local master browsers on all the +subnets that have a machine participating in the workgroup. Without +one machine configured as a domain master browser each subnet would +be an isolated workgroup, unable to see any machines on any other +subnet. It is the presense of a domain master browser that makes +cross subnet browsing possible for a workgroup. + + + +In an WORKGROUP environment the domain master browser must be a +Samba server, and there must only be one domain master browser per +workgroup name. To set up a Samba server as a domain master browser, +set the following option in the [global] section of the smb.conf file : + + + + domain master = yes + + + +The domain master browser should also preferrably be the local master +browser for its own subnet. In order to achieve this set the following +options in the [global] section of the smb.conf file : + + + + + domain master = yes + local master = yes + preferred master = yes + os level = 65 + + + + +The domain master browser may be the same machine as the WINS +server, if you require. + + + +Next, you should ensure that each of the subnets contains a +machine that can act as a local master browser for the +workgroup. Any NT machine should be able to do this, as will +Windows 95 machines (although these tend to get rebooted more +often, so it's not such a good idea to use these). To make a +Samba server a local master browser set the following +options in the [global] section of the smb.conf file : + + + + + domain master = no + local master = yes + preferred master = yes + os level = 65 + + + + +Do not do this for more than one Samba server on each subnet, +or they will war with each other over which is to be the local +master browser. + + + +The "local master" parameter allows Samba to act as a local master +browser. The "preferred master" causes nmbd to force a browser +election on startup and the "os level" parameter sets Samba high +enough so that it should win any browser elections. + + + +If you have an NT machine on the subnet that you wish to +be the local master browser then you can disable Samba from +becoming a local master browser by setting the following +options in the [global] section of the smb.conf file : + + + + + domain master = no + local master = no + preferred master = no + os level = 0 + + + + + + +Setting up Browsing in a DOMAIN + + +If you are adding Samba servers to a Windows NT Domain then +you must not set up a Samba server as a domain master browser. +By default, a Windows NT Primary Domain Controller for a Domain +name is also the Domain master browser for that name, and many +things will break if a Samba server registers the Domain master +browser NetBIOS name (DOMAIN>1B<) with WINS instead of the PDC. + + + +For subnets other than the one containing the Windows NT PDC +you may set up Samba servers as local master browsers as +described. To make a Samba server a local master browser set +the following options in the [global] section of the smb.conf +file : + + + + + domain master = no + local master = yes + preferred master = yes + os level = 65 + + + + +If you wish to have a Samba server fight the election with machines +on the same subnet you may set the "os level" parameter to lower +levels. By doing this you can tune the order of machines that +will become local master browsers if they are running. For +more details on this see the section "FORCING SAMBA TO BE THE MASTER" +below. + + + +If you have Windows NT machines that are members of the domain +on all subnets, and you are sure they will always be running then +you can disable Samba from taking part in browser elections and +ever becoming a local master browser by setting following options +in the [global] section of the smb.conf file : + + + + + domain master = no + local master = no + preferred master = no + os level = 0 + + + + + + +Forcing samba to be the master + + +Who becomes the "master browser" is determined by an election process +using broadcasts. Each election packet contains a number of parameters +which determine what precedence (bias) a host should have in the +election. By default Samba uses a very low precedence and thus loses +elections to just about anyone else. + + + +If you want Samba to win elections then just set the "os level" global +option in smb.conf to a higher number. It defaults to 0. Using 34 +would make it win all elections over every other system (except other +samba systems!) + + + +A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A +NTAS domain controller uses level 32. + + +The maximum os level is 255 + + +If you want samba to force an election on startup, then set the +"preferred master" global option in smb.conf to "yes". Samba will +then have a slight advantage over other potential master browsers +that are not preferred master browsers. Use this parameter with +care, as if you have two hosts (whether they are windows 95 or NT or +samba) on the same local subnet both set with "preferred master" to +"yes", then periodically and continually they will force an election +in order to become the local master browser. + + + +If you want samba to be a "domain master browser", then it is +recommended that you also set "preferred master" to "yes", because +samba will not become a domain master browser for the whole of your +LAN or WAN if it is not also a local master browser on its own +broadcast isolated subnet. + + + +It is possible to configure two samba servers to attempt to become +the domain master browser for a domain. The first server that comes +up will be the domain master browser. All other samba servers will +attempt to become the domain master browser every 5 minutes. They +will find that another samba server is already the domain master +browser and will fail. This provides automatic redundancy, should +the current domain master browser fail. + + + + + +Making samba the domain master + + +The domain master is responsible for collating the browse lists of +multiple subnets so that browsing can occur between subnets. You can +make samba act as the domain master by setting "domain master = yes" +in smb.conf. By default it will not be a domain master. + + + +Note that you should NOT set Samba to be the domain master for a +workgroup that has the same name as an NT Domain. + + + +When samba is the domain master and the master browser it will listen +for master announcements (made roughly every twelve minutes) from local +master browsers on other subnets and then contact them to synchronise +browse lists. + + + +If you want samba to be the domain master then I suggest you also set +the "os level" high enough to make sure it wins elections, and set +"preferred master" to "yes", to get samba to force an election on +startup. + + + +Note that all your servers (including samba) and clients should be +using a WINS server to resolve NetBIOS names. If your clients are only +using broadcasting to resolve NetBIOS names, then two things will occur: + + + + + + your local master browsers will be unable to find a domain master + browser, as it will only be looking on the local subnet. + + + + + + if a client happens to get hold of a domain-wide browse list, and + a user attempts to access a host in that list, it will be unable to + resolve the NetBIOS name of that host. + + + + + +If, however, both samba and your clients are using a WINS server, then: + + + + + + your local master browsers will contact the WINS server and, as long as + samba has registered that it is a domain master browser with the WINS + server, your local master browser will receive samba's ip address + as its domain master browser. + + + + + + when a client receives a domain-wide browse list, and a user attempts + to access a host in that list, it will contact the WINS server to + resolve the NetBIOS name of that host. as long as that host has + registered its NetBIOS name with the same WINS server, the user will + be able to see that host. + + + + + + + +Note about broadcast addresses + + +If your network uses a "0" based broadcast address (for example if it +ends in a 0) then you will strike problems. Windows for Workgroups +does not seem to support a 0's broadcast and you will probably find +that browsing and name lookups won't work. + + + + +Multiple interfaces + + +Samba now supports machines with multiple network interfaces. If you +have multiple interfaces then you will need to use the "interfaces" +option in smb.conf to configure them. See smb.conf(5) for details. + + + diff --git a/docs/docbook/projdoc/Bugs.sgml b/docs/docbook/projdoc/Bugs.sgml new file mode 100644 index 00000000000..5a24458e080 --- /dev/null +++ b/docs/docbook/projdoc/Bugs.sgml @@ -0,0 +1,202 @@ + + + + + + Samba Team + + + 27 June 1997 + + +Reporting Bugs + + +Introduction + + +The email address for bug reports is samba@samba.org + + + +Please take the time to read this file before you submit a bug +report. Also, please see if it has changed between releases, as we +may be changing the bug reporting mechanism at some time. + + + +Please also do as much as you can yourself to help track down the +bug. Samba is maintained by a dedicated group of people who volunteer +their time, skills and efforts. We receive far more mail about it than +we can possibly answer, so you have a much higher chance of an answer +and a fix if you send us a "developer friendly" bug report that lets +us fix it fast. + + + +Do not assume that if you post the bug to the comp.protocols.smb +newsgroup or the mailing list that we will read it. If you suspect that your +problem is not a bug but a configuration problem then it is better to send +it to the Samba mailing list, as there are (at last count) 5000 other users on +that list that may be able to help you. + + + +You may also like to look though the recent mailing list archives, +which are conveniently accessible on the Samba web pages +at http://samba.org/samba/ + + + + + +General info + + +Before submitting a bug report check your config for silly +errors. Look in your log files for obvious messages that tell you that +you've misconfigured something and run testparm to test your config +file for correct syntax. + + + +Have you run through the diagnosis? +This is very important. + + + +If you include part of a log file with your bug report then be sure to +annotate it with exactly what you were doing on the client at the +time, and exactly what the results were. + + + + + +Debug levels + + +If the bug has anything to do with Samba behaving incorrectly as a +server (like refusing to open a file) then the log files will probably +be very useful. Depending on the problem a log level of between 3 and +10 showing the problem may be appropriate. A higher level givesmore +detail, but may use too much disk space. + + + +To set the debug level use log level = in your +smb.conf. You may also find it useful to set the log +level higher for just one machine and keep separate logs for each machine. +To do this use: + + + +log level = 10 +log file = /usr/local/samba/lib/log.%m +include = /usr/local/samba/lib/smb.conf.%m + + + +then create a file +/usr/local/samba/lib/smb.conf.machine where +"machine" is the name of the client you wish to debug. In that file +put any smb.conf commands you want, for example +log level= may be useful. This also allows you to +experiment with different security systems, protocol levels etc on just +one machine. + + + +The smb.conf entry log level = +is synonymous with the entry debuglevel = that has been +used in older versions of Samba and is being retained for backwards +compatibility of smb.conf files. + + + +As the log level = value is increased you will record +a significantly increasing level of debugging information. For most +debugging operations you may not need a setting higher than 3. Nearly +all bugs can be tracked at a setting of 10, but be prepared for a VERY +large volume of log data. + + + + + +Internal errors + + +If you get a "INTERNAL ERROR" message in your log files it means that +Samba got an unexpected signal while running. It is probably a +segmentation fault and almost certainly means a bug in Samba (unless +you have faulty hardware or system software) + + + +If the message came from smbd then it will probably be accompanied by +a message which details the last SMB message received by smbd. This +info is often very useful in tracking down the problem so please +include it in your bug report. + + + +You should also detail how to reproduce the problem, if +possible. Please make this reasonably detailed. + + + +You may also find that a core file appeared in a "corefiles" +subdirectory of the directory where you keep your samba log +files. This file is the most useful tool for tracking down the bug. To +use it you do this: + + +gdb smbd core + + +adding appropriate paths to smbd and core so gdb can find them. If you +don't have gdb then try "dbx". Then within the debugger use the +command "where" to give a stack trace of where the problem +occurred. Include this in your mail. + + + +If you known any assembly language then do a "disass" of the routine +where the problem occurred (if its in a library routine then +disassemble the routine that called it) and try to work out exactly +where the problem is by looking at the surrounding code. Even if you +don't know assembly then incuding this info in the bug report can be +useful. + + + + +Attaching to a running process + + +Unfortunately some unixes (in particular some recent linux kernels) +refuse to dump a core file if the task has changed uid (which smbd +does often). To debug with this sort of system you could try to attach +to the running process using "gdb smbd PID" where you get PID from +smbstatus. Then use "c" to continue and try to cause the core dump +using the client. The debugger should catch the fault and tell you +where it occurred. + + + + + +Patches + + +The best sort of bug report is one that includes a fix! If you send us +patches please use diff -u format if your version of +diff supports it, otherwise use diff -c4. Make sure +your do the diff against a clean version of the source and let me know +exactly what version you used. + + + + + diff --git a/docs/docbook/projdoc/Diagnosis.sgml b/docs/docbook/projdoc/Diagnosis.sgml new file mode 100644 index 00000000000..20b2ccee086 --- /dev/null +++ b/docs/docbook/projdoc/Diagnosis.sgml @@ -0,0 +1,509 @@ + + + + AndrewTridgell + + Samba Team +

tridge@samba.org
+ + + 1 November 1999 + + +Diagnosing your samba server + + +Introduction + + +This file contains a list of tests you can perform to validate your +Samba server. It also tells you what the likely cause of the problem +is if it fails any one of these steps. If it passes all these tests +then it is probably working fine. + + + +You should do ALL the tests, in the order shown. I have tried to +carefully choose them so later tests only use capabilities verified in +the earlier tests. + + + +If you send me an email saying "it doesn't work" and you have not +followed this test procedure then you should not be surprised if I +ignore your email. + + + + + +Assumptions + + +In all of the tests I assume you have a Samba server called BIGSERVER +and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the +PC is running windows for workgroups with a recent copy of the +microsoft tcp/ip stack. Alternatively, your PC may be running Windows +95 or Windows NT (Workstation or Server). + + + +The procedure is similar for other types of clients. + + + +I also assume you know the name of an available share in your +smb.conf. I will assume this share is called "tmp". You can add a +"tmp" share like by adding the following to smb.conf: + + + + +[tmp] + comment = temporary files + path = /tmp + read only = yes + + + + + +THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME +COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS + + + +Please pay attention to the error messages you receive. If any error message +reports that your server is being unfriendly you should first check that you +IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf +file points to name servers that really do exist. + + + +Also, if you do not have DNS server access for name resolution please check +that the settings for your smb.conf file results in "dns proxy = no". The +best way to check this is with "testparm smb.conf" + + + + + +Tests + + +Test 1 + +In the directory in which you store your smb.conf file, run the command +"testparm smb.conf". If it reports any errors then your smb.conf +configuration file is faulty. + + + +Note: Your smb.conf file may be located in: /etc + Or in: /usr/local/samba/lib + + + + +Test 2 + + +Run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from +the unix box. If you don't get a valid response then your TCP/IP +software is not correctly installed. + + + +Note that you will need to start a "dos prompt" window on the PC to +run ping. + + + +If you get a message saying "host not found" or similar then your DNS +software or /etc/hosts file is not correctly setup. It is possible to +run samba without DNS entries for the server and client, but I assume +you do have correct entries for the remainder of these tests. + + + +Another reason why ping might fail is if your host is running firewall +software. You will need to relax the rules to let in the workstation +in question, perhaps by allowing access from another subnet (on Linux +this is done via the ipfwadm program.) + + + + +Test 3 + + +Run the command "smbclient -L BIGSERVER" on the unix box. You +should get a list of available shares back. + + + +If you get a error message containing the string "Bad password" then +you probably have either an incorrect "hosts allow", "hosts deny" or +"valid users" line in your smb.conf, or your guest account is not +valid. Check what your guest account is using "testparm" and +temporarily remove any "hosts allow", "hosts deny", "valid users" or +"invalid users" lines. + + + +If you get a "connection refused" response then the smbd server may +not be running. If you installed it in inetd.conf then you probably edited +that file incorrectly. If you installed it as a daemon then check that +it is running, and check that the netbios-ssn port is in a LISTEN +state using "netstat -a". + + + +If you get a "session request failed" then the server refused the +connection. If it says "Your server software is being unfriendly" then +its probably because you have invalid command line parameters to smbd, +or a similar fatal problem with the initial startup of smbd. Also +check your config file (smb.conf) for syntax errors with "testparm" +and that the various directories where samba keeps its log and lock +files exist. + + + +There are a number of reasons for which smbd may refuse or decline +a session request. The most common of these involve one or more of +the following smb.conf file entries: + + + + hosts deny = ALL + hosts allow = xxx.xxx.xxx.xxx/yy + bind interfaces only = Yes + + + +In the above, no allowance has been made for any session requests that +will automatically translate to the loopback adaptor address 127.0.0.1. +To solve this problem change these lines to: + + + + hosts deny = ALL + hosts allow = xxx.xxx.xxx.xxx/yy 127. + + + +Do NOT use the "bind interfaces only" parameter where you may wish to +use the samba password change facility, or where smbclient may need to +access local service for name resolution or for local resource +connections. (Note: the "bind interfaces only" parameter deficiency +where it will not allow connections to the loopback address will be +fixed soon). + + + +Another common cause of these two errors is having something already running +on port 139, such as Samba (ie: smbd is running from inetd already) or +something like Digital's Pathworks. Check your inetd.conf file before trying +to start smbd as a daemon, it can avoid a lot of frustration! + + + +And yet another possible cause for failure of TEST 3 is when the subnet mask +and / or broadcast address settings are incorrect. Please check that the +network interface IP Address / Broadcast Address / Subnet Mask settings are +correct and that Samba has correctly noted these in the log.nmb file. + + + + + +Test 4 + + +Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the +IP address of your Samba server back. + + + +If you don't then nmbd is incorrectly installed. Check your inetd.conf +if you run it from there, or that the daemon is running and listening +to udp port 137. + + + +One common problem is that many inetd implementations can't take many +parameters on the command line. If this is the case then create a +one-line script that contains the right parameters and run that from +inetd. + + + + + +Test 5 + +run the command nmblookup -B ACLIENT '*' + + +You should get the PCs IP address back. If you don't then the client +software on the PC isn't installed correctly, or isn't started, or you +got the name of the PC wrong. + + + +If ACLIENT doesn't resolve via DNS then use the IP address of the +client in the above test. + + + + + +Test 6 + + +Run the command nmblookup -d 2 '*' + + + +This time we are trying the same as the previous test but are trying +it via a broadcast to the default broadcast address. A number of +Netbios/TCPIP hosts on the network should respond, although Samba may +not catch all of the responses in the short time it listens. You +should see "got a positive name query response" messages from several +hosts. + + + +If this doesn't give a similar result to the previous test then +nmblookup isn't correctly getting your broadcast address through its +automatic mechanism. In this case you should experiment use the +"interfaces" option in smb.conf to manually configure your IP +address, broadcast and netmask. + + + +If your PC and server aren't on the same subnet then you will need to +use the -B option to set the broadcast address to the that of the PCs +subnet. + + + +This test will probably fail if your subnet mask and broadcast address are +not correct. (Refer to TEST 3 notes above). + + + + + +Test 7 + + +Run the command smbclient //BIGSERVER/TMP. You should +then be prompted for a password. You should use the password of the account +you are logged into the unix box with. If you want to test with +another account then add the -U >accountname< option to the end of +the command line. eg: +smbclient //bigserver/tmp -Ujohndoe + + + +Note: It is possible to specify the password along with the username +as follows: +smbclient //bigserver/tmp -Ujohndoe%secret + + + +Once you enter the password you should get the "smb>" prompt. If you +don't then look at the error message. If it says "invalid network +name" then the service "tmp" is not correctly setup in your smb.conf. + + + +If it says "bad password" then the likely causes are: + + + + + + you have shadow passords (or some other password system) but didn't + compile in support for them in smbd + + + + + + your "valid users" configuration is incorrect + + + + + + you have a mixed case password and you haven't enabled the "password + level" option at a high enough level + + + + + + the "path =" line in smb.conf is incorrect. Check it with testparm + + + + + + you enabled password encryption but didn't create the SMB encrypted + password file + + + + + +Once connected you should be able to use the commands +dir get put etc. +Type help >command< for instructions. You should +especially check that the amount of free disk space shown is correct +when you type dir. + + + + + +Test 8 + + +On the PC type the command net view \\BIGSERVER. You will +need to do this from within a "dos prompt" window. You should get back a +list of available shares on the server. + + + +If you get a "network name not found" or similar error then netbios +name resolution is not working. This is usually caused by a problem in +nmbd. To overcome it you could do one of the following (you only need +to choose one of them): + + + + + fixup the nmbd installation + + + + add the IP address of BIGSERVER to the "wins server" box in the + advanced tcp/ip setup on the PC. + + + + enable windows name resolution via DNS in the advanced section of + the tcp/ip setup + + + + add BIGSERVER to your lmhosts file on the PC. + + + + +If you get a "invalid network name" or "bad password error" then the +same fixes apply as they did for the "smbclient -L" test above. In +particular, make sure your "hosts allow" line is correct (see the man +pages) + + + +Also, do not overlook that fact that when the workstation requests the +connection to the samba server it will attempt to connect using the +name with which you logged onto your Windows machine. You need to make +sure that an account exists on your Samba server with that exact same +name and password. + + + +If you get "specified computer is not receiving requests" or similar +it probably means that the host is not contactable via tcp services. +Check to see if the host is running tcp wrappers, and if so add an entry in +the hosts.allow file for your client (or subnet, etc.) + + + + + +Test 9 + + +Run the command net use x: \\BIGSERVER\TMP. You should +be prompted for a password then you should get a "command completed +successfully" message. If not then your PC software is incorrectly +installed or your smb.conf is incorrect. make sure your "hosts allow" +and other config lines in smb.conf are correct. + + + +It's also possible that the server can't work out what user name to +connect you as. To see if this is the problem add the line "user = +USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the +username corresponding to the password you typed. If you find this +fixes things you may need the username mapping option. + + + + + +Test 10 + + +Run the command nmblookup -M TESTGROUP where +TESTGROUP is the name of the workgroup that your Samba server and +Windows PCs belong to. You should get back the IP address of the +master browser for that workgroup. + + + +If you don't then the election process has failed. Wait a minute to +see if it is just being slow then try again. If it still fails after +that then look at the browsing options you have set in smb.conf. Make +sure you have preferred master = yes to ensure that +an election is held at startup. + + + + + +Test 11 + + +From file manager try to browse the server. Your samba server should +appear in the browse list of your local workgroup (or the one you +specified in smb.conf). You should be able to double click on the name +of the server and get a list of shares. If you get a "invalid +password" error when you do then you are probably running WinNT and it +is refusing to browse a server that has no encrypted password +capability and is in user level security mode. In this case either set +security = server AND +password server = Windows_NT_Machine in your +smb.conf file, or enable encrypted passwords AFTER compiling in support +for encrypted passwords (refer to the Makefile). + + + + + + +Still having troubles? + + +Try the mailing list or newsgroup, or use the ethereal utility to +sniff the problem. The official samba mailing list can be reached at +samba@samba.org. To find +out more about samba and how to subscribe to the mailing list check +out the samba web page at +http://samba.org/samba + + + +Also look at the other docs in the Samba package! + + + + + diff --git a/docs/docbook/projdoc/Printing.sgml b/docs/docbook/projdoc/Printing.sgml new file mode 100644 index 00000000000..cb7e5cdfb7c --- /dev/null +++ b/docs/docbook/projdoc/Printing.sgml @@ -0,0 +1,398 @@ + + + + PatrickPowell + +
papowell@lprng.org
+
+
+ 11 August 2000 +
+ +Debugging Printing Problems + + +Introduction + + +This is a short description of how to debug printing problems with +Samba. This describes how to debug problems with printing from a SMB +client to a Samba server, not the other way around. For the reverse +see the examples/printing directory. + + + +Ok, so you want to print to a Samba server from your PC. The first +thing you need to understand is that Samba does not actually do any +printing itself, it just acts as a middleman between your PC client +and your Unix printing subsystem. Samba receives the file from the PC +then passes the file to a external "print command". What print command +you use is up to you. + + + +The whole things is controlled using options in smb.conf. The most +relevant options (which you should look up in the smb.conf man page) +are: + + + + [global] + print command - send a file to a spooler + lpq command - get spool queue status + lprm command - remove a job + [printers] + path = /var/spool/lpd/samba + + + +The following are nice to know about: + + + + queuepause command - stop a printer or print queue + queueresume command - start a printer or print queue + + + +Example: + + + + print command = /usr/bin/lpr -r -P%p %s + lpq command = /usr/bin/lpq -P%p %s + lprm command = /usr/bin/lprm -P%p %j + queuepause command = /usr/sbin/lpc -P%p stop + queuepause command = /usr/sbin/lpc -P%p start + + + +Samba should set reasonable defaults for these depending on your +system type, but it isn't clairvoyant. It is not uncommon that you +have to tweak these for local conditions. The commands should +always have fully specified pathnames, as the smdb may not have +the correct PATH values. + + + +When you send a job to Samba to be printed, it will make a temporary +copy of it in the directory specified in the [printers] section. +and it should be periodically cleaned out. The lpr -r option +requests that the temporary copy be removed after printing; If +printing fails then you might find leftover files in this directory, +and it should be periodically cleaned out. Samba used the lpq +command to determine the "job number" assigned to your print job +by the spooler. + + + +The %>letter< are "macros" that get dynamically replaced with appropriate +values when they are used. The %s gets replaced with the name of the spool +file that Samba creates and the %p gets replaced with the name of the +printer. The %j gets replaced with the "job number" which comes from +the lpq output. + + + + + +Debugging printer problems + + +One way to debug printing problems is to start by replacing these +command with shell scripts that record the arguments and the contents +of the print file. A simple example of this kind of things might +be: + + + + print command = /tmp/saveprint %p %s + + #!/bin/saveprint + # we make sure that we are the right user + /usr/bin/id -p >/tmp/tmp.print + # we run the command and save the error messages + # replace the command with the one appropriate for your system + /usr/bin/lpr -r -P$1 $2 2>>&/tmp/tmp.print + + + +Then you print a file and try removing it. You may find that the +print queue needs to be stopped in order to see the queue status +and remove the job: + + + + +h4: {42} % echo hi >/tmp/hi +h4: {43} % smbclient //localhost/lw4 +added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0 +Password: +Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7] +smb: \> print /tmp/hi +putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s) +smb: \> queue +1049 3 hi-17534 +smb: \> cancel 1049 +Error cancelling job 1049 : code 0 +smb: \> cancel 1049 +Job 1049 cancelled +smb: \> queue +smb: \> exit + + + +The 'code 0' indicates that the job was removed. The comment +by the smbclient is a bit misleading on this. +You can observe the command output and then and look at the +/tmp/tmp.print file to see what the results are. You can quickly +find out if the problem is with your printing system. Often people +have problems with their /etc/printcap file or permissions on +various print queues. + + + + +What printers do I have? + + +You can use the 'testprns' program to check to see if the printer +name you are using is recognized by Samba. For example, you can +use: + + + + testprns printer /etc/printcap + + + +Samba can get its printcap information from a file or from a program. +You can try the following to see the format of the extracted +information: + + + + testprns -a printer /etc/printcap + + testprns -a printer '|/bin/cat printcap' + + + + + +Setting up printcap and print servers + + +You may need to set up some printcaps for your Samba system to use. +It is strongly recommended that you use the facilities provided by +the print spooler to set up queues and printcap information. + + + +Samba requires either a printcap or program to deliver printcap +information. This printcap information has the format: + + + + name|alias1|alias2...:option=value:... + + + +For almost all printing systems, the printer 'name' must be composed +only of alphanumeric or underscore '_' characters. Some systems also +allow hyphens ('-') as well. An alias is an alternative name for the +printer, and an alias with a space in it is used as a 'comment' +about the printer. The printcap format optionally uses a \ at the end of lines +to extend the printcap to multiple lines. + + + +Here are some examples of printcap files: + + + + + +pr just printer name + + +pr|alias printer name and alias + + +pr|My Printer printer name, alias used as comment + + +pr:sh:\ Same as pr:sh:cm= testing + :cm= \ + testing + + +pr:sh Same as pr:sh:cm= testing + :cm= testing + + + + + +Samba reads the printcap information when first started. If you make +changes in the printcap information, then you must do the following: + + + + + +make sure that the print spooler is aware of these changes. +The LPRng system uses the 'lpc reread' command to do this. + + + +make sure that the spool queues, etc., exist and have the +correct permissions. The LPRng system uses the 'checkpc -f' +command to do this. + + + +You now should send a SIGHUP signal to the smbd server to have +it reread the printcap information. + + + + + + +Job sent, no output + + +This is the most frustrating part of printing. You may have sent the +job, verified that the job was forwarded, set up a wrapper around +the command to send the file, but there was no output from the printer. + + + +First, check to make sure that the job REALLY is getting to the +right print queue. If you are using a BSD or LPRng print spooler, +you can temporarily stop the printing of jobs. Jobs can still be +submitted, but they will not be printed. Use: + + + + lpc -Pprinter stop + + + +Now submit a print job and then use 'lpq -Pprinter' to see if the +job is in the print queue. If it is not in the print queue then +you will have to find out why it is not being accepted for printing. + + + +Next, you may want to check to see what the format of the job really +was. With the assistance of the system administrator you can view +the submitted jobs files. You may be surprised to find that these +are not in what you would expect to call a printable format. +You can use the UNIX 'file' utitily to determine what the job +format actually is: + + + + cd /var/spool/lpd/printer # spool directory of print jobs + ls # find job files + file dfA001myhost + + + +You should make sure that your printer supports this format OR that +your system administrator has installed a 'print filter' that will +convert the file to a format appropriate for your printer. + + + + + +Job sent, strange output + + +Once you have the job printing, you can then start worrying about +making it print nicely. + + + +The most common problem is extra pages of output: banner pages +OR blank pages at the end. + + + +If you are getting banner pages, check and make sure that the +printcap option or printer option is configured for no banners. +If you have a printcap, this is the :sh (suppress header or banner +page) option. You should have the following in your printer. + + + + printer: ... :sh + + + +If you have this option and are still getting banner pages, there +is a strong chance that your printer is generating them for you +automatically. You should make sure that banner printing is disabled +for the printer. This usually requires using the printer setup software +or procedures supplied by the printer manufacturer. + + + +If you get an extra page of output, this could be due to problems +with your job format, or if you are generating PostScript jobs, +incorrect setting on your printer driver on the MicroSoft client. +For example, under Win95 there is a option: + + + + Printers|Printer Name|(Right Click)Properties|Postscript|Advanced| + + + +that allows you to choose if a Ctrl-D is appended to all jobs. +This is a very bad thing to do, as most spooling systems will +automatically add a ^D to the end of the job if it is detected as +PostScript. The multiple ^D may cause an additional page of output. + + + + + +Raw PostScript printed + + +This is a problem that is usually caused by either the print spooling +system putting information at the start of the print job that makes +the printer think the job is a text file, or your printer simply +does not support PostScript. You may need to enable 'Automatic +Format Detection' on your printer. + + + + + +Advanced Printing + + +Note that you can do some pretty magic things by using your +imagination with the "print command" option and some shell scripts. +Doing print accounting is easy by passing the %U option to a print +command shell script. You could even make the print command detect +the type of output and its size and send it to an appropriate +printer. + + + + + +Real debugging + + +If the above debug tips don't help, then maybe you need to bring in +the bug guns, system tracing. See Tracing.txt in this directory. + + +
diff --git a/docs/docbook/projdoc/Speed.sgml b/docs/docbook/projdoc/Speed.sgml new file mode 100644 index 00000000000..17adf104291 --- /dev/null +++ b/docs/docbook/projdoc/Speed.sgml @@ -0,0 +1,578 @@ + + + + + + Samba Team +
samba@samba.org
+
+
+ + PaulCochrane + + Dundee Limb Fitting Centre +
paulc@dth.scot.nhs.uk
+
+
+
+ +Samba performance issues + + +Comparisons + + +The Samba server uses TCP to talk to the client. Thus if you are +trying to see if it performs well you should really compare it to +programs that use the same protocol. The most readily available +programs for file transfer that use TCP are ftp or another TCP based +SMB server. + + + +If you want to test against something like a NT or WfWg server then +you will have to disable all but TCP on either the client or +server. Otherwise you may well be using a totally different protocol +(such as Netbeui) and comparisons may not be valid. + + + +Generally you should find that Samba performs similarly to ftp at raw +transfer speed. It should perform quite a bit faster than NFS, +although this very much depends on your system. + + + +Several people have done comparisons between Samba and Novell, NFS or +WinNT. In some cases Samba performed the best, in others the worst. I +suspect the biggest factor is not Samba vs some other system but the +hardware and drivers used on the various systems. Given similar +hardware Samba should certainly be competitive in speed with other +systems. + + + + + +Oplocks + + +Overview + + +Oplocks are the way that SMB clients get permission from a server to +locally cache file operations. If a server grants an oplock +(opportunistic lock) then the client is free to assume that it is the +only one accessing the file and it will agressively cache file +data. With some oplock types the client may even cache file open/close +operations. This can give enormous performance benefits. + + + +With the release of Samba 1.9.18 we now correctly support opportunistic +locks. This is turned on by default, and can be turned off on a share- +by-share basis by setting the parameter : + + + +oplocks = False + + + +We recommend that you leave oplocks on however, as current benchmark +tests with NetBench seem to give approximately a 30% improvement in +speed with them on. This is on average however, and the actual +improvement seen can be orders of magnitude greater, depending on +what the client redirector is doing. + + + +Previous to Samba 1.9.18 there was a 'fake oplocks' option. This +option has been left in the code for backwards compatibility reasons +but it's use is now deprecated. A short summary of what the old +code did follows. + + + + + +Level2 Oplocks + + +With Samba 2.0.5 a new capability - level2 (read only) oplocks is +supported (although the option is off by default - see the smb.conf +man page for details). Turning on level2 oplocks (on a share-by-share basis) +by setting the parameter : + + + +level2 oplocks = true + + + +should speed concurrent access to files that are not commonly written +to, such as application serving shares (ie. shares that contain common +.EXE files - such as a Microsoft Office share) as it allows clients to +read-ahread cache copies of these files. + + + + + +Old 'fake oplocks' option - deprecated + + +Samba can also fake oplocks, by granting a oplock whenever a client +asks for one. This is controlled using the smb.conf option "fake +oplocks". If you set "fake oplocks = yes" then you are telling the +client that it may agressively cache the file data for all opens. + + + +Enabling 'fake oplocks' on all read-only shares or shares that you know +will only be accessed from one client at a time you will see a big +performance improvement on many operations. If you enable this option +on shares where multiple clients may be accessing the files read-write +at the same time you can get data corruption. + + + + + + +Socket options + + +There are a number of socket options that can greatly affect the +performance of a TCP based server like Samba. + + + +The socket options that Samba uses are settable both on the command +line with the -O option, or in the smb.conf file. + + + +The "socket options" section of the smb.conf manual page describes how +to set these and gives recommendations. + + + +Getting the socket options right can make a big difference to your +performance, but getting them wrong can degrade it by just as +much. The correct settings are very dependent on your local network. + + + +The socket option TCP_NODELAY is the one that seems to make the +biggest single difference for most networks. Many people report that +adding "socket options = TCP_NODELAY" doubles the read performance of +a Samba drive. The best explanation I have seen for this is that the +Microsoft TCP/IP stack is slow in sending tcp ACKs. + + + + + +Read size + + +The option "read size" affects the overlap of disk reads/writes with +network reads/writes. If the amount of data being transferred in +several of the SMB commands (currently SMBwrite, SMBwriteX and +SMBreadbraw) is larger than this value then the server begins writing +the data before it has received the whole packet from the network, or +in the case of SMBreadbraw, it begins writing to the network before +all the data has been read from disk. + + + +This overlapping works best when the speeds of disk and network access +are similar, having very little effect when the speed of one is much +greater than the other. + + + +The default value is 16384, but very little experimentation has been +done yet to determine the optimal value, and it is likely that the best +value will vary greatly between systems anyway. A value over 65536 is +pointless and will cause you to allocate memory unnecessarily. + + + + + +Max xmit + + +At startup the client and server negotiate a "maximum transmit" size, +which limits the size of nearly all SMB commands. You can set the +maximum size that Samba will negotiate using the "max xmit = " option +in smb.conf. Note that this is the maximum size of SMB request that +Samba will accept, but not the maximum size that the *client* will accept. +The client maximum receive size is sent to Samba by the client and Samba +honours this limit. + + + +It defaults to 65536 bytes (the maximum), but it is possible that some +clients may perform better with a smaller transmit unit. Trying values +of less than 2048 is likely to cause severe problems. + + + +In most cases the default is the best option. + + + + + +Locking + + +By default Samba does not implement strict locking on each read/write +call (although it did in previous versions). If you enable strict +locking (using "strict locking = yes") then you may find that you +suffer a severe performance hit on some systems. + + + +The performance hit will probably be greater on NFS mounted +filesystems, but could be quite high even on local disks. + + + + + +Share modes + + +Some people find that opening files is very slow. This is often +because of the "share modes" code needed to fully implement the dos +share modes stuff. You can disable this code using "share modes = +no". This will gain you a lot in opening and closing files but will +mean that (in some cases) the system won't force a second user of a +file to open the file read-only if the first has it open +read-write. For many applications that do their own locking this +doesn't matter, but for some it may. Most Windows applications +depend heavily on "share modes" working correctly and it is +recommended that the Samba share mode support be left at the +default of "on". + + + +The share mode code in Samba has been re-written in the 1.9.17 +release following tests with the Ziff-Davis NetBench PC Benchmarking +tool. It is now believed that Samba 1.9.17 implements share modes +similarly to Windows NT. + + + +NOTE: In the most recent versions of Samba there is an option to use +shared memory via mmap() to implement the share modes. This makes +things much faster. See the Makefile for how to enable this. + + + + + +Log level + + +If you set the log level (also known as "debug level") higher than 2 +then you may suffer a large drop in performance. This is because the +server flushes the log file after each operation, which can be very +expensive. + + + + +Wide lines + + +The "wide links" option is now enabled by default, but if you disable +it (for better security) then you may suffer a performance hit in +resolving filenames. The performance loss is lessened if you have +"getwd cache = yes", which is now the default. + + + + + +Read raw + + +The "read raw" operation is designed to be an optimised, low-latency +file read operation. A server may choose to not support it, +however. and Samba makes support for "read raw" optional, with it +being enabled by default. + + + +In some cases clients don't handle "read raw" very well and actually +get lower performance using it than they get using the conventional +read operations. + + + +So you might like to try "read raw = no" and see what happens on your +network. It might lower, raise or not affect your performance. Only +testing can really tell. + + + + + +Write raw + + +The "write raw" operation is designed to be an optimised, low-latency +file write operation. A server may choose to not support it, +however. and Samba makes support for "write raw" optional, with it +being enabled by default. + + + +Some machines may find "write raw" slower than normal write, in which +case you may wish to change this option. + + + + + +Read prediction + + +Samba can do read prediction on some of the SMB commands. Read +prediction means that Samba reads some extra data on the last file it +read while waiting for the next SMB command to arrive. It can then +respond more quickly when the next read request arrives. + + + +This is disabled by default. You can enable it by using "read +prediction = yes". + + + +Note that read prediction is only used on files that were opened read +only. + + + +Read prediction should particularly help for those silly clients (such +as "Write" under NT) which do lots of very small reads on a file. + + + +Samba will not read ahead more data than the amount specified in the +"read size" option. It always reads ahead on 1k block boundaries. + + + + + +Memory mapping + + +Samba supports reading files via memory mapping them. One some +machines this can give a large boost to performance, on others it +makes not difference at all, and on some it may reduce performance. + + + +To enable you you have to recompile Samba with the -DUSE_MMAP option +on the FLAGS line of the Makefile. + + + +Note that memory mapping is only used on files opened read only, and +is not used by the "read raw" operation. Thus you may find memory +mapping is more effective if you disable "read raw" using "read raw = +no". + + + + + +Slow Clients + + +One person has reported that setting the protocol to COREPLUS rather +than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s). + + + +I suspect that his PC's (386sx16 based) were asking for more data than +they could chew. I suspect a similar speed could be had by setting +"read raw = no" and "max xmit = 2048", instead of changing the +protocol. Lowering the "read size" might also help. + + + + + +Slow Logins + + +Slow logins are almost always due to the password checking time. Using +the lowest practical "password level" will improve things a lot. You +could also enable the "UFC crypt" option in the Makefile. + + + + + +Client tuning + + +Often a speed problem can be traced to the client. The client (for +example Windows for Workgroups) can often be tuned for better TCP +performance. + + + +See your client docs for details. In particular, I have heard rumours +that the WfWg options TCPWINDOWSIZE and TCPSEGMENTSIZE can have a +large impact on performance. + + + +Also note that some people have found that setting DefaultRcvWindow in +the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a +big improvement. I don't know why. + + + +My own experience wth DefaultRcvWindow is that I get much better +performance with a large value (16384 or larger). Other people have +reported that anything over 3072 slows things down enourmously. One +person even reported a speed drop of a factor of 30 when he went from +3072 to 8192. I don't know why. + + + +It probably depends a lot on your hardware, and the type of unix box +you have at the other end of the link. + + + +Paul Cochrane has done some testing on client side tuning and come +to the following conclusions: + + + +Install the W2setup.exe file from www.microsoft.com. This is an +update for the winsock stack and utilities which improve performance. + + + +Configure the win95 TCPIP registry settings to give better +perfomance. I use a program called MTUSPEED.exe which I got off the +net. There are various other utilities of this type freely available. +The setting which give the best performance for me are: + + + + +MaxMTU Remove + + +RWIN Remove + + +MTUAutoDiscover Disable + + +MTUBlackHoleDetect Disable + + +Time To Live Enabled + + +Time To Live - HOPS 32 + + +NDI Cache Size 0 + + + + +I tried virtually all of the items mentioned in the document and +the only one which made a difference to me was the socket options. It +turned out I was better off without any!!!!! + + + +In terms of overall speed of transfer, between various win95 clients +and a DX2-66 20MB server with a crappy NE2000 compatible and old IDE +drive (Kernel 2.0.30). The transfer rate was reasonable for 10 baseT. + + + +FIXME +The figures are: Put Get +P166 client 3Com card: 420-440kB/s 500-520kB/s +P100 client 3Com card: 390-410kB/s 490-510kB/s +DX4-75 client NE2000: 370-380kB/s 330-350kB/s + + + +I based these test on transfer two files a 4.5MB text file and a 15MB +textfile. The results arn't bad considering the hardware Samba is +running on. It's a crap machine!!!! + + + +The updates mentioned in 1 and 2 brought up the transfer rates from +just over 100kB/s in some clients. + + + +A new client is a P333 connected via a 100MB/s card and hub. The +transfer rates from this were good: 450-500kB/s on put and 600+kB/s +on get. + + + +Looking at standard FTP throughput, Samba is a bit slower (100kB/s +upwards). I suppose there is more going on in the samba protocol, but +if it could get up to the rate of FTP the perfomance would be quite +staggering. + + + + + +My Results + + +Some people want to see real numbers in a document like this, so here +they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b +tcp/ip stack. It has a slow IDE drive and 20Mb of ram. It has a SMC +Elite-16 ISA bus ethernet card. The only WfWg tuning I've done is to +set DefaultRcvWindow in the [MSTCP] section of system.ini to 16384. My +server is a 486dx3-66 running Linux. It also has 20Mb of ram and a SMC +Elite-16 card. You can see my server config in the examples/tridge/ +subdirectory of the distribution. + + + +I get 490k/s on reading a 8Mb file with copy. +I get 441k/s writing the same file to the samba server. + + + +Of course, there's a lot more to benchmarks than 2 raw throughput +figures, but it gives you a ballpark figure. + + + +I've also tested Win95 and WinNT, and found WinNT gave me the best +speed as a samba client. The fastest client of all (for me) is +smbclient running on another linux box. Maybe I'll add those results +here someday ... + + + +
diff --git a/docs/docbook/projdoc/samba-doc.sgml b/docs/docbook/projdoc/samba-doc.sgml index 28baa7f6094..0ec9efe014e 100644 --- a/docs/docbook/projdoc/samba-doc.sgml +++ b/docs/docbook/projdoc/samba-doc.sgml @@ -13,6 +13,12 @@ + + + + + + ]> @@ -31,7 +37,7 @@ Abstract -Last Update : Mon Apr 1 08:47:26 CST 2002 +Last Update : Thu Aug 15 12:48:45 CDT 2002 @@ -58,18 +64,24 @@ Cheers, jerry &UNIX-INSTALL; +&Diagnosis; &IntegratingWithWindows; &Samba-PAM; &MS-Dfs-Setup; &NT-Security; &PRINTER-DRIVER2; +&PRINTING; +&SECURITY-LEVEL; &DOMAIN-MEMBER; +&WINBIND; &Samba-PDC-HOWTO; &Samba-BDC-HOWTO; &Samba-LDAP; -&WINBIND; +&BROWSING; +&SPEED; &OS2-Client; &CVS-Access; +&BUGS; &INDEX-FILE; diff --git a/docs/docbook/projdoc/security_level.sgml b/docs/docbook/projdoc/security_level.sgml new file mode 100644 index 00000000000..46a2ad7fe46 --- /dev/null +++ b/docs/docbook/projdoc/security_level.sgml @@ -0,0 +1,140 @@ + + + + AndrewTridgell + + Samba Team +
samba@samba.org
+
+
+
+ +Security levels + + +Introduction + + +Samba supports the following options to the global smb.conf parameter + + + +[global] +security = [share|user(default)|domain|ads] + + + +Please refer to the smb.conf man page for usage information and to the document +DOMAIN_MEMBER.html for further background details +on domain mode security. The Windows 2000 Kerberos domain security model +(security = ads) is described in the ADS-HOWTO.html. + + + +Of the above, "security = server" means that Samba reports to clients that +it is running in "user mode" but actually passes off all authentication +requests to another "user mode" server. This requires an additional +parameter "password server =" that points to the real authentication server. +That real authentication server can be another Samba server or can be a +Windows NT server, the later natively capable of encrypted password support. + + + + + +More complete description of security levels + + +A SMB server tells the client at startup what "security level" it is +running. There are two options "share level" and "user level". Which +of these two the client receives affects the way the client then tries +to authenticate itself. It does not directly affect (to any great +extent) the way the Samba server does security. I know this is +strange, but it fits in with the client/server approach of SMB. In SMB +everything is initiated and controlled by the client, and the server +can only tell the client what is available and whether an action is +allowed. + + + +I'll describe user level security first, as its simpler. In user level +security the client will send a "session setup" command directly after +the protocol negotiation. This contains a username and password. The +server can either accept or reject that username/password +combination. Note that at this stage the server has no idea what +share the client will eventually try to connect to, so it can't base +the "accept/reject" on anything other than: + + + +the username/password +the machine that the client is coming from + + + +If the server accepts the username/password then the client expects to +be able to mount any share (using a "tree connection") without +specifying a password. It expects that all access rights will be as +the username/password specified in the "session setup". + + + +It is also possible for a client to send multiple "session setup" +requests. When the server responds it gives the client a "uid" to use +as an authentication tag for that username/password. The client can +maintain multiple authentication contexts in this way (WinDD is an +example of an application that does this) + + + +Ok, now for share level security. In share level security the client +authenticates itself separately for each share. It will send a +password along with each "tree connection" (share mount). It does not +explicitly send a username with this operation. The client is +expecting a password to be associated with each share, independent of +the user. This means that samba has to work out what username the +client probably wants to use. It is never explicitly sent the +username. Some commercial SMB servers such as NT actually associate +passwords directly with shares in share level security, but samba +always uses the unix authentication scheme where it is a +username/password that is authenticated, not a "share/password". + + + +Many clients send a "session setup" even if the server is in share +level security. They normally send a valid username but no +password. Samba records this username in a list of "possible +usernames". When the client then does a "tree connection" it also adds +to this list the name of the share they try to connect to (useful for +home directories) and any users listed in the "user =" smb.conf +line. The password is then checked in turn against these "possible +usernames". If a match is found then the client is authenticated as +that user. + + + +Finally "server level" security. In server level security the samba +server reports to the client that it is in user level security. The +client then does a "session setup" as described earlier. The samba +server takes the username/password that the client sends and attempts +to login to the "password server" by sending exactly the same +username/password that it got from the client. If that server is in +user level security and accepts the password then samba accepts the +clients connection. This allows the samba server to use another SMB +server as the "password server". + + + +You should also note that at the very start of all this, where the +server tells the client what security level it is in, it also tells +the client if it supports encryption. If it does then it supplies the +client with a random "cryptkey". The client will then send all +passwords in encrypted form. You have to compile samba with encryption +enabled to support this feature, and you have to maintain a separate +smbpasswd file with SMB style encrypted passwords. It is +cryptographically impossible to translate from unix style encryption +to SMB style encryption, although there are some fairly simple management +schemes by which the two could be kept in sync. + + +
diff --git a/docs/docbook/projdoc/winbind.sgml b/docs/docbook/projdoc/winbind.sgml index 62e065914b4..d70c1a3679d 100644 --- a/docs/docbook/projdoc/winbind.sgml +++ b/docs/docbook/projdoc/winbind.sgml @@ -23,9 +23,19 @@
jtrostel@snapserver.com
- - - 16 Oct 2000 + + NaagMummaneni + +
getnag@rediffmail.com
+
+
+ + JelmerVernooij + +
jelmer@nl.linux.org
+
+
+ 27 June 2002 Unified Logons between Windows NT and UNIX using Winbind @@ -489,6 +499,13 @@ I also found it necessary to make the following symbolic link: root# ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2
+And, in the case of Sun solaris: + +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1 +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1 +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2 + + Now, as root you need to edit /etc/nsswitch.conf to allow user and group entries to be visible from the winbindd @@ -682,14 +699,18 @@ The same thing can be done for groups with the command -Fix the <filename>/etc/rc.d/init.d/smb</filename> startup files +Fix the init.d startup scripts + + +Linux The winbindd daemon needs to start up after the smbd and nmbd daemons are running. -To accomplish this task, you need to modify the /etc/init.d/smb +To accomplish this task, you need to modify the startup scripts of your system. They are located at /etc/init.d/smb in RedHat and +/etc/init.d/samba in Debian. script to add commands to invoke this daemon in the proper sequence. My -/etc/init.d/smb file starts up smbd, +startup script starts up smbd, nmbd, and winbindd from the /usr/local/samba/bin directory directly. The 'start' function in the script looks like this: @@ -744,18 +765,79 @@ stop() { return $RETVAL } + + +Solaris + +On solaris, you need to modify the +/etc/init.d/samba.server startup script. It usually +only starts smbd and nmbd but should now start winbindd too. If you +have samba installed in /usr/local/samba/bin, +the file could contains something like this: + + + +## +## samba.server +## + +if [ ! -d /usr/bin ] +then # /usr not mounted + exit +fi + +killproc() { # kill the named process(es) + pid=`/usr/bin/ps -e | + /usr/bin/grep -w $1 | + /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` + [ "$pid" != "" ] && kill $pid +} + +# Start/stop processes required for samba server + +case "$1" in + +'start') +# +# Edit these lines to suit your installation (paths, workgroup, host) +# +echo Starting SMBD + /usr/local/samba/bin/smbd -D -s \ + /usr/local/samba/smb.conf + +echo Starting NMBD + /usr/local/samba/bin/nmbd -D -l \ + /usr/local/samba/var/log -s /usr/local/samba/smb.conf + +echo Starting Winbind Daemon + /usr/local/samba/bin/winbindd + ;; + +'stop') + killproc nmbd + killproc smbd + killproc winbindd + ;; + +*) + echo "Usage: /etc/init.d/samba.server { start | stop }" + ;; +esac + + + + +Restarting If you restart the smbd, nmbd, and winbindd daemons at this point, you should be able to connect to the samba server as a domain member just as if you were a local user. - + - - Configure Winbind and PAM @@ -781,13 +863,17 @@ by invoking the command from the ../source directory. The pam_winbind.so file should be copied to the location of your other pam security modules. On my RedHat system, this was the -/lib/security directory. +/lib/security directory. On Solaris, the pam security +modules reside in /usr/lib/security. root# cp ../samba/source/nsswitch/pam_winbind.so /lib/security + +Linux/FreeBSD-specific PAM configuration + The /etc/pam.d/samba file does not need to be changed. I just left this fileas it was: @@ -875,6 +961,92 @@ line after the winbind.so line to get rid of annoying double prompts for passwords. + + + +Solaris-specific configuration + + +The /etc/pam.conf needs to be changed. I changed this file so that my Domain +users can logon both locally as well as telnet.The following are the changes +that I made.You can customize the pam.conf file as per your requirements,but +be sure of those changes because in the worst case it will leave your system +nearly impossible to boot. + + + +# +#ident "@(#)pam.conf 1.14 99/09/16 SMI" +# +# Copyright (c) 1996-1999, Sun Microsystems, Inc. +# All Rights Reserved. +# +# PAM configuration +# +# Authentication management +# +login auth required /usr/lib/security/pam_winbind.so +login auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass +login auth required /usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass +# +rlogin auth sufficient /usr/lib/security/pam_winbind.so +rlogin auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1 +rlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass +# +dtlogin auth sufficient /usr/lib/security/pam_winbind.so +dtlogin auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass +# +rsh auth required /usr/lib/security/$ISA/pam_rhosts_auth.so.1 +other auth sufficient /usr/lib/security/pam_winbind.so +other auth required /usr/lib/security/$ISA/pam_unix.so.1 try_first_pass +# +# Account management +# +login account sufficient /usr/lib/security/pam_winbind.so +login account requisite /usr/lib/security/$ISA/pam_roles.so.1 +login account required /usr/lib/security/$ISA/pam_unix.so.1 +# +dtlogin account sufficient /usr/lib/security/pam_winbind.so +dtlogin account requisite /usr/lib/security/$ISA/pam_roles.so.1 +dtlogin account required /usr/lib/security/$ISA/pam_unix.so.1 +# +other account sufficient /usr/lib/security/pam_winbind.so +other account requisite /usr/lib/security/$ISA/pam_roles.so.1 +other account required /usr/lib/security/$ISA/pam_unix.so.1 +# +# Session management +# +other session required /usr/lib/security/$ISA/pam_unix.so.1 +# +# Password management +# +#other password sufficient /usr/lib/security/pam_winbind.so +other password required /usr/lib/security/$ISA/pam_unix.so.1 +dtsession auth required /usr/lib/security/$ISA/pam_unix.so.1 +# +# Support for Kerberos V5 authentication (uncomment to use Kerberos) +# +#rlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass +#login auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass +#dtlogin auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass +#other auth optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass +#dtlogin account optional /usr/lib/security/$ISA/pam_krb5.so.1 +#other account optional /usr/lib/security/$ISA/pam_krb5.so.1 +#other session optional /usr/lib/security/$ISA/pam_krb5.so.1 +#other password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass + + + +I also added a try_first_pass line after the winbind.so line to get rid of +annoying double prompts for passwords. + + + +Now restart your Samba & try connecting through your application that you +configured in the pam.conf. + + + diff --git a/docs/htmldocs/Browsing.html b/docs/htmldocs/Browsing.html new file mode 100644 index 00000000000..5f5f71ba694 --- /dev/null +++ b/docs/htmldocs/Browsing.html @@ -0,0 +1,741 @@ +Improved browsing in samba

Overview of browsing

SMB networking provides a mechanism by which clients can access a list +of machines in a network, a so-called "browse list". This list +contains machines that are ready to offer file and/or print services +to other machines within the network. Thus it does not include +machines which aren't currently able to do server tasks. The browse +list is heavily used by all SMB clients. Configuration of SMB +browsing has been problematic for some Samba users, hence this +document.

Browsing will NOT work if name resolution from NetBIOS names to IP +addresses does not function correctly. Use of a WINS server is highly +recommended to aid the resolution of NetBIOS (SMB) names to IP addresses. +WINS allows remote segment clients to obtain NetBIOS name_type information +that can NOT be provided by any other means of name resolution.


Browsing support in samba

Samba now fully supports browsing. The browsing is supported by nmbd +and is also controlled by options in the smb.conf file (see smb.conf(5)).

Samba can act as a local browse master for a workgroup and the ability +for samba to support domain logons and scripts is now available. See +DOMAIN.txt for more information on domain logons.

Samba can also act as a domain master browser for a workgroup. This +means that it will collate lists from local browse masters into a +wide area network server list. In order for browse clients to +resolve the names they may find in this list, it is recommended that +both samba and your clients use a WINS server.

Note that you should NOT set Samba to be the domain master for a +workgroup that has the same name as an NT Domain: on each wide area +network, you must only ever have one domain master browser per workgroup, +regardless of whether it is NT, Samba or any other type of domain master +that is providing this service.

[Note that nmbd can be configured as a WINS server, but it is not +necessary to specifically use samba as your WINS server. NTAS can +be configured as your WINS server. In a mixed NT server and +samba environment on a Wide Area Network, it is recommended that +you use the NT server's WINS server capabilities. In a samba-only +environment, it is recommended that you use one and only one nmbd +as your WINS server].

To get browsing to work you need to run nmbd as usual, but will need +to use the "workgroup" option in smb.conf to control what workgroup +Samba becomes a part of.

Samba also has a useful option for a Samba server to offer itself for +browsing on another subnet. It is recommended that this option is only +used for 'unusual' purposes: announcements over the internet, for +example. See "remote announce" in the smb.conf man page.


Problem resolution

If something doesn't work then hopefully the log.nmb file will help +you track down the problem. Try a debug level of 2 or 3 for finding +problems. Also note that the current browse list usually gets stored +in text form in a file called browse.dat.

Note that if it doesn't work for you, then you should still be able to +type the server name as \\SERVER in filemanager then hit enter and +filemanager should display the list of available shares.

Some people find browsing fails because they don't have the global +"guest account" set to a valid account. Remember that the IPC$ +connection that lists the shares is done as guest, and thus you must +have a valid guest account.

Also, a lot of people are getting bitten by the problem of too many +parameters on the command line of nmbd in inetd.conf. This trick is to +not use spaces between the option and the parameter (eg: -d2 instead +of -d 2), and to not use the -B and -N options. New versions of nmbd +are now far more likely to correctly find your broadcast and network +address, so in most cases these aren't needed.

The other big problem people have is that their broadcast address, +netmask or IP address is wrong (specified with the "interfaces" option +in smb.conf)


Browsing across subnets

With the release of Samba 1.9.17(alpha1 and above) Samba has been +updated to enable it to support the replication of browse lists +across subnet boundaries. New code and options have been added to +achieve this. This section describes how to set this feature up +in different settings.

To see browse lists that span TCP/IP subnets (ie. networks separated +by routers that don't pass broadcast traffic) you must set up at least +one WINS server. The WINS server acts as a DNS for NetBIOS names, allowing +NetBIOS name to IP address translation to be done by doing a direct +query of the WINS server. This is done via a directed UDP packet on +port 137 to the WINS server machine. The reason for a WINS server is +that by default, all NetBIOS name to IP address translation is done +by broadcasts from the querying machine. This means that machines +on one subnet will not be able to resolve the names of machines on +another subnet without using a WINS server.

Remember, for browsing across subnets to work correctly, all machines, +be they Windows 95, Windows NT, or Samba servers must have the IP address +of a WINS server given to them by a DHCP server, or by manual configuration +(for Win95 and WinNT, this is in the TCP/IP Properties, under Network +settings) for Samba this is in the smb.conf file.


How does cross subnet browsing work ?

Cross subnet browsing is a complicated dance, containing multiple +moving parts. It has taken Microsoft several years to get the code +that achieves this correct, and Samba lags behind in some areas. +However, with the 1.9.17 release, Samba is capable of cross subnet +browsing when configured correctly.

Consider a network set up as follows :

                                   (DMB)
+             N1_A      N1_B        N1_C       N1_D        N1_E
+              |          |           |          |           |
+          -------------------------------------------------------
+            |          subnet 1                       |
+          +---+                                      +---+
+          |R1 | Router 1                  Router 2   |R2 |
+          +---+                                      +---+
+            |                                          |
+            |  subnet 2              subnet 3          |
+  --------------------------       ------------------------------------
+  |     |     |      |               |        |         |           |
+ N2_A  N2_B  N2_C   N2_D           N3_A     N3_B      N3_C        N3_D 
+                    (WINS)

Consisting of 3 subnets (1, 2, 3) connected by two routers +(R1, R2) - these do not pass broadcasts. Subnet 1 has 5 machines +on it, subnet 2 has 4 machines, subnet 3 has 4 machines. Assume +for the moment that all these machines are configured to be in the +same workgroup (for simplicities sake). Machine N1_C on subnet 1 +is configured as Domain Master Browser (ie. it will collate the +browse lists for the workgroup). Machine N2_D is configured as +WINS server and all the other machines are configured to register +their NetBIOS names with it.

As all these machines are booted up, elections for master browsers +will take place on each of the three subnets. Assume that machine +N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on +subnet 3 - these machines are known as local master browsers for +their particular subnet. N1_C has an advantage in winning as the +local master browser on subnet 1 as it is set up as Domain Master +Browser.

On each of the three networks, machines that are configured to +offer sharing services will broadcast that they are offering +these services. The local master browser on each subnet will +receive these broadcasts and keep a record of the fact that +the machine is offering a service. This list of records is +the basis of the browse list. For this case, assume that +all the machines are configured to offer services so all machines +will be on the browse list.

For each network, the local master browser on that network is +considered 'authoritative' for all the names it receives via +local broadcast. This is because a machine seen by the local +master browser via a local broadcast must be on the same +network as the local master browser and thus is a 'trusted' +and 'verifiable' resource. Machines on other networks that +the local master browsers learn about when collating their +browse lists have not been directly seen - these records are +called 'non-authoritative'.

At this point the browse lists look as follows (these are +the machines you would see in your network neighborhood if +you looked in it on a particular network right now).

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D

Note that at this point all the subnets are separate, no +machine is seen across any of the subnets.

Now examine subnet 2. As soon as N2_B has become the local +master browser it looks for a Domain master browser to synchronize +its browse list with. It does this by querying the WINS server +(N2_D) for the IP address associated with the NetBIOS name +WORKGROUP>1B<. This name was registerd by the Domain master +browser (N1_C) with the WINS server as soon as it was booted.

Once N2_B knows the address of the Domain master browser it +tells it that is the local master browser for subnet 2 by +sending a MasterAnnouncement packet as a UDP port 138 packet. +It then synchronizes with it by doing a NetServerEnum2 call. This +tells the Domain Master Browser to send it all the server +names it knows about. Once the domain master browser receives +the MasterAnnouncement packet it schedules a synchronization +request to the sender of that packet. After both synchronizations +are done the browse lists look like :

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
+
+Servers with a (*) after them are non-authoritative names.

At this point users looking in their network neighborhood on +subnets 1 or 2 will see all the servers on both, users on +subnet 3 will still only see the servers on their own subnet.

The same sequence of events that occured for N2_B now occurs +for the local master browser on subnet 3 (N3_D). When it +synchronizes browse lists with the domain master browser (N1_A) +it gets both the server entries on subnet 1, and those on +subnet 2. After N3_D has synchronized with N1_C and vica-versa +the browse lists look like.

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*),
+                                 N3_A(*), N3_B(*), N3_C(*), N3_D(*)
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+
+Servers with a (*) after them are non-authoritative names.

At this point users looking in their network neighborhood on +subnets 1 or 3 will see all the servers on all sunbets, users on +subnet 2 will still only see the servers on subnets 1 and 2, but not 3.

Finally, the local master browser for subnet 2 (N2_B) will sync again +with the domain master browser (N1_C) and will recieve the missing +server entries. Finally - and as a steady state (if no machines +are removed or shut off) the browse lists will look like :

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*),
+                                 N3_A(*), N3_B(*), N3_C(*), N3_D(*)
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+                                 N3_A(*), N3_B(*), N3_C(*), N3_D(*)
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+	
+Servers with a (*) after them are non-authoritative names.

Synchronizations between the domain master browser and local +master browsers will continue to occur, but this should be a +steady state situation.

If either router R1 or R2 fails the following will occur:

  1. Names of computers on each side of the inaccessible network fragments + will be maintained for as long as 36 minutes, in the network neighbourhood + lists. +

  2. Attempts to connect to these inaccessible computers will fail, but the + names will not be removed from the network neighbourhood lists. +

  3. If one of the fragments is cut off from the WINS server, it will only + be able to access servers on its local subnet, by using subnet-isolated + broadcast NetBIOS name resolution. The effects are similar to that of + losing access to a DNS server. +


Setting up a WINS server

Either a Samba machine or a Windows NT Server machine may be set up +as a WINS server. To set a Samba machine to be a WINS server you must +add the following option to the smb.conf file on the selected machine : +in the [globals] section add the line

wins support = yes

Versions of Samba previous to 1.9.17 had this parameter default to +yes. If you have any older versions of Samba on your network it is +strongly suggested you upgrade to 1.9.17 or above, or at the very +least set the parameter to 'no' on all these machines.

Machines with "wins support = yes" will keep a list of +all NetBIOS names registered with them, acting as a DNS for NetBIOS names.

You should set up only ONE wins server. Do NOT set the +"wins support = yes" option on more than one Samba +server.

To set up a Windows NT Server as a WINS server you need to set up +the WINS service - see your NT documentation for details. Note that +Windows NT WINS Servers can replicate to each other, allowing more +than one to be set up in a complex subnet environment. As Microsoft +refuse to document these replication protocols Samba cannot currently +participate in these replications. It is possible in the future that +a Samba->Samba WINS replication protocol may be defined, in which +case more than one Samba machine could be set up as a WINS server +but currently only one Samba server should have the "wins support = yes" +parameter set.

After the WINS server has been configured you must ensure that all +machines participating on the network are configured with the address +of this WINS server. If your WINS server is a Samba machine, fill in +the Samba machine IP address in the "Primary WINS Server" field of +the "Control Panel->Network->Protocols->TCP->WINS Server" dialogs +in Windows 95 or Windows NT. To tell a Samba server the IP address +of the WINS server add the following line to the [global] section of +all smb.conf files :

wins server = >name or IP address<

where >name or IP address< is either the DNS name of the WINS server +machine or its IP address.

Note that this line MUST NOT BE SET in the smb.conf file of the Samba +server acting as the WINS server itself. If you set both the +"wins support = yes" option and the +"wins server = >name<" option then +nmbd will fail to start.

There are two possible scenarios for setting up cross subnet browsing. +The first details setting up cross subnet browsing on a network containing +Windows 95, Samba and Windows NT machines that are not configured as +part of a Windows NT Domain. The second details setting up cross subnet +browsing on networks that contain NT Domains.


Setting up Browsing in a WORKGROUP

To set up cross subnet browsing on a network containing machines +in up to be in a WORKGROUP, not an NT Domain you need to set up one +Samba server to be the Domain Master Browser (note that this is *NOT* +the same as a Primary Domain Controller, although in an NT Domain the +same machine plays both roles). The role of a Domain master browser is +to collate the browse lists from local master browsers on all the +subnets that have a machine participating in the workgroup. Without +one machine configured as a domain master browser each subnet would +be an isolated workgroup, unable to see any machines on any other +subnet. It is the presense of a domain master browser that makes +cross subnet browsing possible for a workgroup.

In an WORKGROUP environment the domain master browser must be a +Samba server, and there must only be one domain master browser per +workgroup name. To set up a Samba server as a domain master browser, +set the following option in the [global] section of the smb.conf file :

domain master = yes

The domain master browser should also preferrably be the local master +browser for its own subnet. In order to achieve this set the following +options in the [global] section of the smb.conf file :

        domain master = yes
+        local master = yes
+        preferred master = yes
+        os level = 65

The domain master browser may be the same machine as the WINS +server, if you require.

Next, you should ensure that each of the subnets contains a +machine that can act as a local master browser for the +workgroup. Any NT machine should be able to do this, as will +Windows 95 machines (although these tend to get rebooted more +often, so it's not such a good idea to use these). To make a +Samba server a local master browser set the following +options in the [global] section of the smb.conf file :

        domain master = no
+        local master = yes
+        preferred master = yes
+        os level = 65

Do not do this for more than one Samba server on each subnet, +or they will war with each other over which is to be the local +master browser.

The "local master" parameter allows Samba to act as a local master +browser. The "preferred master" causes nmbd to force a browser +election on startup and the "os level" parameter sets Samba high +enough so that it should win any browser elections.

If you have an NT machine on the subnet that you wish to +be the local master browser then you can disable Samba from +becoming a local master browser by setting the following +options in the [global] section of the smb.conf file :

        domain master = no
+        local master = no
+        preferred master = no
+        os level = 0


Setting up Browsing in a DOMAIN

If you are adding Samba servers to a Windows NT Domain then +you must not set up a Samba server as a domain master browser. +By default, a Windows NT Primary Domain Controller for a Domain +name is also the Domain master browser for that name, and many +things will break if a Samba server registers the Domain master +browser NetBIOS name (DOMAIN>1B<) with WINS instead of the PDC.

For subnets other than the one containing the Windows NT PDC +you may set up Samba servers as local master browsers as +described. To make a Samba server a local master browser set +the following options in the [global] section of the smb.conf +file :

        domain master = no
+        local master = yes
+        preferred master = yes
+        os level = 65

If you wish to have a Samba server fight the election with machines +on the same subnet you may set the "os level" parameter to lower +levels. By doing this you can tune the order of machines that +will become local master browsers if they are running. For +more details on this see the section "FORCING SAMBA TO BE THE MASTER" +below.

If you have Windows NT machines that are members of the domain +on all subnets, and you are sure they will always be running then +you can disable Samba from taking part in browser elections and +ever becoming a local master browser by setting following options +in the [global] section of the smb.conf file :

domain master = no + local master = no + preferred master = no + os level = 0


Forcing samba to be the master

Who becomes the "master browser" is determined by an election process +using broadcasts. Each election packet contains a number of parameters +which determine what precedence (bias) a host should have in the +election. By default Samba uses a very low precedence and thus loses +elections to just about anyone else.

If you want Samba to win elections then just set the "os level" global +option in smb.conf to a higher number. It defaults to 0. Using 34 +would make it win all elections over every other system (except other +samba systems!)

A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A +NTAS domain controller uses level 32.

The maximum os level is 255

If you want samba to force an election on startup, then set the +"preferred master" global option in smb.conf to "yes". Samba will +then have a slight advantage over other potential master browsers +that are not preferred master browsers. Use this parameter with +care, as if you have two hosts (whether they are windows 95 or NT or +samba) on the same local subnet both set with "preferred master" to +"yes", then periodically and continually they will force an election +in order to become the local master browser.

If you want samba to be a "domain master browser", then it is +recommended that you also set "preferred master" to "yes", because +samba will not become a domain master browser for the whole of your +LAN or WAN if it is not also a local master browser on its own +broadcast isolated subnet.

It is possible to configure two samba servers to attempt to become +the domain master browser for a domain. The first server that comes +up will be the domain master browser. All other samba servers will +attempt to become the domain master browser every 5 minutes. They +will find that another samba server is already the domain master +browser and will fail. This provides automatic redundancy, should +the current domain master browser fail.


Making samba the domain master

The domain master is responsible for collating the browse lists of +multiple subnets so that browsing can occur between subnets. You can +make samba act as the domain master by setting "domain master = yes" +in smb.conf. By default it will not be a domain master.

Note that you should NOT set Samba to be the domain master for a +workgroup that has the same name as an NT Domain.

When samba is the domain master and the master browser it will listen +for master announcements (made roughly every twelve minutes) from local +master browsers on other subnets and then contact them to synchronise +browse lists.

If you want samba to be the domain master then I suggest you also set +the "os level" high enough to make sure it wins elections, and set +"preferred master" to "yes", to get samba to force an election on +startup.

Note that all your servers (including samba) and clients should be +using a WINS server to resolve NetBIOS names. If your clients are only +using broadcasting to resolve NetBIOS names, then two things will occur:

  1. your local master browsers will be unable to find a domain master + browser, as it will only be looking on the local subnet. +

  2. if a client happens to get hold of a domain-wide browse list, and + a user attempts to access a host in that list, it will be unable to + resolve the NetBIOS name of that host. +

If, however, both samba and your clients are using a WINS server, then:

  1. your local master browsers will contact the WINS server and, as long as + samba has registered that it is a domain master browser with the WINS + server, your local master browser will receive samba's ip address + as its domain master browser. +

  2. when a client receives a domain-wide browse list, and a user attempts + to access a host in that list, it will contact the WINS server to + resolve the NetBIOS name of that host. as long as that host has + registered its NetBIOS name with the same WINS server, the user will + be able to see that host. +


Note about broadcast addresses

If your network uses a "0" based broadcast address (for example if it +ends in a 0) then you will strike problems. Windows for Workgroups +does not seem to support a 0's broadcast and you will probably find +that browsing and name lookups won't work.


Multiple interfaces

Samba now supports machines with multiple network interfaces. If you +have multiple interfaces then you will need to use the "interfaces" +option in smb.conf to configure them. See smb.conf(5) for details.

\ No newline at end of file diff --git a/docs/htmldocs/Bugs.html b/docs/htmldocs/Bugs.html new file mode 100644 index 00000000000..0f7fb7bd609 --- /dev/null +++ b/docs/htmldocs/Bugs.html @@ -0,0 +1,238 @@ +Reporting Bugs

Introduction

The email address for bug reports is samba@samba.org

Please take the time to read this file before you submit a bug +report. Also, please see if it has changed between releases, as we +may be changing the bug reporting mechanism at some time.

Please also do as much as you can yourself to help track down the +bug. Samba is maintained by a dedicated group of people who volunteer +their time, skills and efforts. We receive far more mail about it than +we can possibly answer, so you have a much higher chance of an answer +and a fix if you send us a "developer friendly" bug report that lets +us fix it fast.

Do not assume that if you post the bug to the comp.protocols.smb +newsgroup or the mailing list that we will read it. If you suspect that your +problem is not a bug but a configuration problem then it is better to send +it to the Samba mailing list, as there are (at last count) 5000 other users on +that list that may be able to help you.

You may also like to look though the recent mailing list archives, +which are conveniently accessible on the Samba web pages +at http://samba.org/samba/


General info

Before submitting a bug report check your config for silly +errors. Look in your log files for obvious messages that tell you that +you've misconfigured something and run testparm to test your config +file for correct syntax.

Have you run through the diagnosis? +This is very important.

If you include part of a log file with your bug report then be sure to +annotate it with exactly what you were doing on the client at the +time, and exactly what the results were.


Debug levels

If the bug has anything to do with Samba behaving incorrectly as a +server (like refusing to open a file) then the log files will probably +be very useful. Depending on the problem a log level of between 3 and +10 showing the problem may be appropriate. A higher level givesmore +detail, but may use too much disk space.

To set the debug level use log level = in your +smb.conf. You may also find it useful to set the log +level higher for just one machine and keep separate logs for each machine. +To do this use:

log level = 10
+log file = /usr/local/samba/lib/log.%m
+include = /usr/local/samba/lib/smb.conf.%m

then create a file +/usr/local/samba/lib/smb.conf.machine where +"machine" is the name of the client you wish to debug. In that file +put any smb.conf commands you want, for example +log level= may be useful. This also allows you to +experiment with different security systems, protocol levels etc on just +one machine.

The smb.conf entry log level = +is synonymous with the entry debuglevel = that has been +used in older versions of Samba and is being retained for backwards +compatibility of smb.conf files.

As the log level = value is increased you will record +a significantly increasing level of debugging information. For most +debugging operations you may not need a setting higher than 3. Nearly +all bugs can be tracked at a setting of 10, but be prepared for a VERY +large volume of log data.


Internal errors

If you get a "INTERNAL ERROR" message in your log files it means that +Samba got an unexpected signal while running. It is probably a +segmentation fault and almost certainly means a bug in Samba (unless +you have faulty hardware or system software)

If the message came from smbd then it will probably be accompanied by +a message which details the last SMB message received by smbd. This +info is often very useful in tracking down the problem so please +include it in your bug report.

You should also detail how to reproduce the problem, if +possible. Please make this reasonably detailed.

You may also find that a core file appeared in a "corefiles" +subdirectory of the directory where you keep your samba log +files. This file is the most useful tool for tracking down the bug. To +use it you do this:

gdb smbd core

adding appropriate paths to smbd and core so gdb can find them. If you +don't have gdb then try "dbx". Then within the debugger use the +command "where" to give a stack trace of where the problem +occurred. Include this in your mail.

If you known any assembly language then do a "disass" of the routine +where the problem occurred (if its in a library routine then +disassemble the routine that called it) and try to work out exactly +where the problem is by looking at the surrounding code. Even if you +don't know assembly then incuding this info in the bug report can be +useful.


Attaching to a running process

Unfortunately some unixes (in particular some recent linux kernels) +refuse to dump a core file if the task has changed uid (which smbd +does often). To debug with this sort of system you could try to attach +to the running process using "gdb smbd PID" where you get PID from +smbstatus. Then use "c" to continue and try to cause the core dump +using the client. The debugger should catch the fault and tell you +where it occurred.


Patches

The best sort of bug report is one that includes a fix! If you send us +patches please use diff -u format if your version of +diff supports it, otherwise use diff -c4. Make sure +your do the diff against a clean version of the source and let me know +exactly what version you used.

\ No newline at end of file diff --git a/docs/htmldocs/Diagnosis.html b/docs/htmldocs/Diagnosis.html new file mode 100644 index 00000000000..1944c37be91 --- /dev/null +++ b/docs/htmldocs/Diagnosis.html @@ -0,0 +1,548 @@ +Diagnosing your samba server

Introduction

This file contains a list of tests you can perform to validate your +Samba server. It also tells you what the likely cause of the problem +is if it fails any one of these steps. If it passes all these tests +then it is probably working fine.

You should do ALL the tests, in the order shown. I have tried to +carefully choose them so later tests only use capabilities verified in +the earlier tests.

If you send me an email saying "it doesn't work" and you have not +followed this test procedure then you should not be surprised if I +ignore your email.


Assumptions

In all of the tests I assume you have a Samba server called BIGSERVER +and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the +PC is running windows for workgroups with a recent copy of the +microsoft tcp/ip stack. Alternatively, your PC may be running Windows +95 or Windows NT (Workstation or Server).

The procedure is similar for other types of clients.

I also assume you know the name of an available share in your +smb.conf. I will assume this share is called "tmp". You can add a +"tmp" share like by adding the following to smb.conf:


[tmp]
+ comment = temporary files 
+ path = /tmp
+ read only = yes

THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME +COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS

Please pay attention to the error messages you receive. If any error message +reports that your server is being unfriendly you should first check that you +IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf +file points to name servers that really do exist.

Also, if you do not have DNS server access for name resolution please check +that the settings for your smb.conf file results in "dns proxy = no". The +best way to check this is with "testparm smb.conf"


Tests

Test 1

In the directory in which you store your smb.conf file, run the command +"testparm smb.conf". If it reports any errors then your smb.conf +configuration file is faulty.

Note: Your smb.conf file may be located in: /etc + Or in: /usr/local/samba/lib


Test 2

Run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from +the unix box. If you don't get a valid response then your TCP/IP +software is not correctly installed.

Note that you will need to start a "dos prompt" window on the PC to +run ping.

If you get a message saying "host not found" or similar then your DNS +software or /etc/hosts file is not correctly setup. It is possible to +run samba without DNS entries for the server and client, but I assume +you do have correct entries for the remainder of these tests.

Another reason why ping might fail is if your host is running firewall +software. You will need to relax the rules to let in the workstation +in question, perhaps by allowing access from another subnet (on Linux +this is done via the ipfwadm program.)


Test 3

Run the command "smbclient -L BIGSERVER" on the unix box. You +should get a list of available shares back.

If you get a error message containing the string "Bad password" then +you probably have either an incorrect "hosts allow", "hosts deny" or +"valid users" line in your smb.conf, or your guest account is not +valid. Check what your guest account is using "testparm" and +temporarily remove any "hosts allow", "hosts deny", "valid users" or +"invalid users" lines.

If you get a "connection refused" response then the smbd server may +not be running. If you installed it in inetd.conf then you probably edited +that file incorrectly. If you installed it as a daemon then check that +it is running, and check that the netbios-ssn port is in a LISTEN +state using "netstat -a".

If you get a "session request failed" then the server refused the +connection. If it says "Your server software is being unfriendly" then +its probably because you have invalid command line parameters to smbd, +or a similar fatal problem with the initial startup of smbd. Also +check your config file (smb.conf) for syntax errors with "testparm" +and that the various directories where samba keeps its log and lock +files exist.

There are a number of reasons for which smbd may refuse or decline +a session request. The most common of these involve one or more of +the following smb.conf file entries:

	hosts deny = ALL
+	hosts allow = xxx.xxx.xxx.xxx/yy
+	bind interfaces only = Yes

In the above, no allowance has been made for any session requests that +will automatically translate to the loopback adaptor address 127.0.0.1. +To solve this problem change these lines to:

	hosts deny = ALL
+	hosts allow = xxx.xxx.xxx.xxx/yy 127.

Do NOT use the "bind interfaces only" parameter where you may wish to +use the samba password change facility, or where smbclient may need to +access local service for name resolution or for local resource +connections. (Note: the "bind interfaces only" parameter deficiency +where it will not allow connections to the loopback address will be +fixed soon).

Another common cause of these two errors is having something already running +on port 139, such as Samba (ie: smbd is running from inetd already) or +something like Digital's Pathworks. Check your inetd.conf file before trying +to start smbd as a daemon, it can avoid a lot of frustration!

And yet another possible cause for failure of TEST 3 is when the subnet mask +and / or broadcast address settings are incorrect. Please check that the +network interface IP Address / Broadcast Address / Subnet Mask settings are +correct and that Samba has correctly noted these in the log.nmb file.


Test 4

Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the +IP address of your Samba server back.

If you don't then nmbd is incorrectly installed. Check your inetd.conf +if you run it from there, or that the daemon is running and listening +to udp port 137.

One common problem is that many inetd implementations can't take many +parameters on the command line. If this is the case then create a +one-line script that contains the right parameters and run that from +inetd.


Test 5

run the command nmblookup -B ACLIENT '*'

You should get the PCs IP address back. If you don't then the client +software on the PC isn't installed correctly, or isn't started, or you +got the name of the PC wrong.

If ACLIENT doesn't resolve via DNS then use the IP address of the +client in the above test.


Test 6

Run the command nmblookup -d 2 '*'

This time we are trying the same as the previous test but are trying +it via a broadcast to the default broadcast address. A number of +Netbios/TCPIP hosts on the network should respond, although Samba may +not catch all of the responses in the short time it listens. You +should see "got a positive name query response" messages from several +hosts.

If this doesn't give a similar result to the previous test then +nmblookup isn't correctly getting your broadcast address through its +automatic mechanism. In this case you should experiment use the +"interfaces" option in smb.conf to manually configure your IP +address, broadcast and netmask.

If your PC and server aren't on the same subnet then you will need to +use the -B option to set the broadcast address to the that of the PCs +subnet.

This test will probably fail if your subnet mask and broadcast address are +not correct. (Refer to TEST 3 notes above).


Test 7

Run the command smbclient //BIGSERVER/TMP. You should +then be prompted for a password. You should use the password of the account +you are logged into the unix box with. If you want to test with +another account then add the -U >accountname< option to the end of +the command line. eg: +smbclient //bigserver/tmp -Ujohndoe

Note: It is possible to specify the password along with the username +as follows: +smbclient //bigserver/tmp -Ujohndoe%secret

Once you enter the password you should get the "smb>" prompt. If you +don't then look at the error message. If it says "invalid network +name" then the service "tmp" is not correctly setup in your smb.conf.

If it says "bad password" then the likely causes are:

  1. you have shadow passords (or some other password system) but didn't + compile in support for them in smbd +

  2. your "valid users" configuration is incorrect +

  3. you have a mixed case password and you haven't enabled the "password + level" option at a high enough level +

  4. the "path =" line in smb.conf is incorrect. Check it with testparm +

  5. you enabled password encryption but didn't create the SMB encrypted + password file +

Once connected you should be able to use the commands +dir get put etc. +Type help >command< for instructions. You should +especially check that the amount of free disk space shown is correct +when you type dir.


Test 8

On the PC type the command net view \\BIGSERVER. You will +need to do this from within a "dos prompt" window. You should get back a +list of available shares on the server.

If you get a "network name not found" or similar error then netbios +name resolution is not working. This is usually caused by a problem in +nmbd. To overcome it you could do one of the following (you only need +to choose one of them):

  1. fixup the nmbd installation

  2. add the IP address of BIGSERVER to the "wins server" box in the + advanced tcp/ip setup on the PC.

  3. enable windows name resolution via DNS in the advanced section of + the tcp/ip setup

  4. add BIGSERVER to your lmhosts file on the PC.

If you get a "invalid network name" or "bad password error" then the +same fixes apply as they did for the "smbclient -L" test above. In +particular, make sure your "hosts allow" line is correct (see the man +pages)

Also, do not overlook that fact that when the workstation requests the +connection to the samba server it will attempt to connect using the +name with which you logged onto your Windows machine. You need to make +sure that an account exists on your Samba server with that exact same +name and password.

If you get "specified computer is not receiving requests" or similar +it probably means that the host is not contactable via tcp services. +Check to see if the host is running tcp wrappers, and if so add an entry in +the hosts.allow file for your client (or subnet, etc.)


Test 9

Run the command net use x: \\BIGSERVER\TMP. You should +be prompted for a password then you should get a "command completed +successfully" message. If not then your PC software is incorrectly +installed or your smb.conf is incorrect. make sure your "hosts allow" +and other config lines in smb.conf are correct.

It's also possible that the server can't work out what user name to +connect you as. To see if this is the problem add the line "user = +USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the +username corresponding to the password you typed. If you find this +fixes things you may need the username mapping option.


Test 10

Run the command nmblookup -M TESTGROUP where +TESTGROUP is the name of the workgroup that your Samba server and +Windows PCs belong to. You should get back the IP address of the +master browser for that workgroup.

If you don't then the election process has failed. Wait a minute to +see if it is just being slow then try again. If it still fails after +that then look at the browsing options you have set in smb.conf. Make +sure you have preferred master = yes to ensure that +an election is held at startup.


Test 11

From file manager try to browse the server. Your samba server should +appear in the browse list of your local workgroup (or the one you +specified in smb.conf). You should be able to double click on the name +of the server and get a list of shares. If you get a "invalid +password" error when you do then you are probably running WinNT and it +is refusing to browse a server that has no encrypted password +capability and is in user level security mode. In this case either set +security = server AND +password server = Windows_NT_Machine in your +smb.conf file, or enable encrypted passwords AFTER compiling in support +for encrypted passwords (refer to the Makefile).


Still having troubles?

Try the mailing list or newsgroup, or use the ethereal utility to +sniff the problem. The official samba mailing list can be reached at +samba@samba.org. To find +out more about samba and how to subscribe to the mailing list check +out the samba web page at +http://samba.org/samba

Also look at the other docs in the Samba package!

\ No newline at end of file diff --git a/docs/htmldocs/Integrating-with-Windows.html b/docs/htmldocs/Integrating-with-Windows.html index 7c5fe316272..fd2bd7fdaf6 100644 --- a/docs/htmldocs/Integrating-with-Windows.html +++ b/docs/htmldocs/Integrating-with-Windows.html @@ -191,7 +191,7 @@ CLASS="FILENAME" > is one such file.

When the IP address of the destination interface has been -determined a protocol called ARP/RARP isused to identify +determined a protocol called ARP/RARP is used to identify the MAC address of the target interface. ARP stands for Address Resolution Protocol, and is a broadcast oriented method that uses UDP (User Datagram Protocol) to send a request to all @@ -414,7 +414,7 @@ architecture of the MS Windows network. The term "workgroup" indicates that the primary nature of the network environment is that of a peer-to-peer design. In a WORKGROUP all machines are responsible for their own security, and generally such security is limited to use of -just a password (known as SHARE MORE security). In most situations +just a password (known as SHARE MODE security). In most situations with peer-to-peer networking the users who control their own machines will simply opt to have no security at all. It is possible to have USER MODE security in a WORKGROUP environment, thus requiring use @@ -444,8 +444,8 @@ NAME="AEN100" >

All MS Windows machines employ an in memory buffer in which is -stored the NetBIOS names and their IP addresses for all external -machines that that the local machine has communicated with over the +stored the NetBIOS names and IP addresses for all external +machines that that machine has communicated with over the past 10-15 minutes. It is more efficient to obtain an IP address for a machine from the local cache than it is to go through all the configured name resolution mechanisms.

If a machine whose name is in the local name cache has been shut down before the name had been expired and flushed from the cache, then an attempt to exchange a message with that machine will be subject -to time-out delays. ie: It's name is in the cache, so a name resolution +to time-out delays. i.e.: Its name is in the cache, so a name resolution lookup will succeed, but the machine can not respond. This can be frustrating for users - but it is a characteristic of the protocol.

As stated above, MS Windows machines register their NetBIOS names -(ie: the machine name for each service type in operation) on start +(i.e.: the machine name for each service type in operation) on start up. Also, as stated above, the exact method by which this name registration takes place is determined by whether or not the MS Windows client/server has been given a WINS server address, whether or not LMHOSTS lookup @@ -685,7 +685,7 @@ Instead, the domain master browser serves the role of contacting each local master browser (found by asking WINS or from LMHOSTS) and exchanging browse list contents. This way every master browser will eventually obtain a complete list of all machines that are on the network. Every 11-15 minutes an election -is held to determine which machine will be the master browser. By nature of +is held to determine which machine will be the master browser. By the nature of the election criteria used, the machine with the highest uptime, or the most senior protocol version, or other criteria, will win the election as domain master browser.

MS Windows clients have a habit of dropping network mappings that have been idle for 10 minutes or longer. When the user attempts to -use the mapped drive connection that has been dropped the SMB protocol -has a mechanism by which the connection can be re-established using +use the mapped drive connection that has been dropped, the client +re-establishes the connection using a cached copy of the password.

When Microsoft changed the default password mode, they dropped support for @@ -959,7 +959,7 @@ NAME="AEN196" >

This mode of authentication demands that there be on the -Unix/Linux system both a Unix style account as well as and +Unix/Linux system both a Unix style account as well as an smbpasswd entry for the user. The Unix system account can be locked if required as only the encrypted password will be used for SMB client authentication.

Debugging Printing Problems

Introduction

This is a short description of how to debug printing problems with +Samba. This describes how to debug problems with printing from a SMB +client to a Samba server, not the other way around. For the reverse +see the examples/printing directory.

Ok, so you want to print to a Samba server from your PC. The first +thing you need to understand is that Samba does not actually do any +printing itself, it just acts as a middleman between your PC client +and your Unix printing subsystem. Samba receives the file from the PC +then passes the file to a external "print command". What print command +you use is up to you.

The whole things is controlled using options in smb.conf. The most +relevant options (which you should look up in the smb.conf man page) +are:

      [global]
+        print command     - send a file to a spooler
+        lpq command       - get spool queue status
+        lprm command      - remove a job
+      [printers]
+        path = /var/spool/lpd/samba

The following are nice to know about:

        queuepause command   - stop a printer or print queue
+        queueresume command  - start a printer or print queue

Example:

        print command = /usr/bin/lpr -r -P%p %s
+        lpq command   = /usr/bin/lpq    -P%p %s
+        lprm command  = /usr/bin/lprm   -P%p %j
+        queuepause command = /usr/sbin/lpc -P%p stop
+        queuepause command = /usr/sbin/lpc -P%p start

Samba should set reasonable defaults for these depending on your +system type, but it isn't clairvoyant. It is not uncommon that you +have to tweak these for local conditions. The commands should +always have fully specified pathnames, as the smdb may not have +the correct PATH values.

When you send a job to Samba to be printed, it will make a temporary +copy of it in the directory specified in the [printers] section. +and it should be periodically cleaned out. The lpr -r option +requests that the temporary copy be removed after printing; If +printing fails then you might find leftover files in this directory, +and it should be periodically cleaned out. Samba used the lpq +command to determine the "job number" assigned to your print job +by the spooler.

The %>letter< are "macros" that get dynamically replaced with appropriate +values when they are used. The %s gets replaced with the name of the spool +file that Samba creates and the %p gets replaced with the name of the +printer. The %j gets replaced with the "job number" which comes from +the lpq output.


Debugging printer problems

One way to debug printing problems is to start by replacing these +command with shell scripts that record the arguments and the contents +of the print file. A simple example of this kind of things might +be:

	print command = /tmp/saveprint %p %s
+
+    #!/bin/saveprint
+    # we make sure that we are the right user
+    /usr/bin/id -p >/tmp/tmp.print
+    # we run the command and save the error messages
+    # replace the command with the one appropriate for your system
+    /usr/bin/lpr -r -P$1 $2 2>>&/tmp/tmp.print

Then you print a file and try removing it. You may find that the +print queue needs to be stopped in order to see the queue status +and remove the job:


h4: {42} % echo hi >/tmp/hi
+h4: {43} % smbclient //localhost/lw4
+added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0
+Password: 
+Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7]
+smb: \> print /tmp/hi
+putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s)
+smb: \> queue
+1049     3            hi-17534
+smb: \> cancel 1049
+Error cancelling job 1049 : code 0
+smb: \> cancel 1049
+Job 1049 cancelled
+smb: \> queue
+smb: \> exit

The 'code 0' indicates that the job was removed. The comment +by the smbclient is a bit misleading on this. +You can observe the command output and then and look at the +/tmp/tmp.print file to see what the results are. You can quickly +find out if the problem is with your printing system. Often people +have problems with their /etc/printcap file or permissions on +various print queues.


What printers do I have?

You can use the 'testprns' program to check to see if the printer +name you are using is recognized by Samba. For example, you can +use:

    testprns printer /etc/printcap

Samba can get its printcap information from a file or from a program. +You can try the following to see the format of the extracted +information:

    testprns -a printer /etc/printcap
+
+    testprns -a printer '|/bin/cat printcap'


Setting up printcap and print servers

You may need to set up some printcaps for your Samba system to use. +It is strongly recommended that you use the facilities provided by +the print spooler to set up queues and printcap information.

Samba requires either a printcap or program to deliver printcap +information. This printcap information has the format:

  name|alias1|alias2...:option=value:...

For almost all printing systems, the printer 'name' must be composed +only of alphanumeric or underscore '_' characters. Some systems also +allow hyphens ('-') as well. An alias is an alternative name for the +printer, and an alias with a space in it is used as a 'comment' +about the printer. The printcap format optionally uses a \ at the end of lines +to extend the printcap to multiple lines.

Here are some examples of printcap files:

  1. pr just printer name

  2. pr|alias printer name and alias

  3. pr|My Printer printer name, alias used as comment

  4. pr:sh:\ Same as pr:sh:cm= testing + :cm= \ + testing

  5. pr:sh Same as pr:sh:cm= testing + :cm= testing

Samba reads the printcap information when first started. If you make +changes in the printcap information, then you must do the following:

  1. make sure that the print spooler is aware of these changes. +The LPRng system uses the 'lpc reread' command to do this.

  2. make sure that the spool queues, etc., exist and have the +correct permissions. The LPRng system uses the 'checkpc -f' +command to do this.

  3. You now should send a SIGHUP signal to the smbd server to have +it reread the printcap information.


Job sent, no output

This is the most frustrating part of printing. You may have sent the +job, verified that the job was forwarded, set up a wrapper around +the command to send the file, but there was no output from the printer.

First, check to make sure that the job REALLY is getting to the +right print queue. If you are using a BSD or LPRng print spooler, +you can temporarily stop the printing of jobs. Jobs can still be +submitted, but they will not be printed. Use:

  lpc -Pprinter stop

Now submit a print job and then use 'lpq -Pprinter' to see if the +job is in the print queue. If it is not in the print queue then +you will have to find out why it is not being accepted for printing.

Next, you may want to check to see what the format of the job really +was. With the assistance of the system administrator you can view +the submitted jobs files. You may be surprised to find that these +are not in what you would expect to call a printable format. +You can use the UNIX 'file' utitily to determine what the job +format actually is:

    cd /var/spool/lpd/printer   # spool directory of print jobs
+    ls                          # find job files
+    file dfA001myhost

You should make sure that your printer supports this format OR that +your system administrator has installed a 'print filter' that will +convert the file to a format appropriate for your printer.


Job sent, strange output

Once you have the job printing, you can then start worrying about +making it print nicely.

The most common problem is extra pages of output: banner pages +OR blank pages at the end.

If you are getting banner pages, check and make sure that the +printcap option or printer option is configured for no banners. +If you have a printcap, this is the :sh (suppress header or banner +page) option. You should have the following in your printer.

   printer: ... :sh

If you have this option and are still getting banner pages, there +is a strong chance that your printer is generating them for you +automatically. You should make sure that banner printing is disabled +for the printer. This usually requires using the printer setup software +or procedures supplied by the printer manufacturer.

If you get an extra page of output, this could be due to problems +with your job format, or if you are generating PostScript jobs, +incorrect setting on your printer driver on the MicroSoft client. +For example, under Win95 there is a option:

  Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|

that allows you to choose if a Ctrl-D is appended to all jobs. +This is a very bad thing to do, as most spooling systems will +automatically add a ^D to the end of the job if it is detected as +PostScript. The multiple ^D may cause an additional page of output.


Raw PostScript printed

This is a problem that is usually caused by either the print spooling +system putting information at the start of the print job that makes +the printer think the job is a text file, or your printer simply +does not support PostScript. You may need to enable 'Automatic +Format Detection' on your printer.


Advanced Printing

Note that you can do some pretty magic things by using your +imagination with the "print command" option and some shell scripts. +Doing print accounting is easy by passing the %U option to a print +command shell script. You could even make the print command detect +the type of output and its size and send it to an appropriate +printer.


Real debugging

If the above debug tips don't help, then maybe you need to bring in +the bug guns, system tracing. See Tracing.txt in this directory.

\ No newline at end of file diff --git a/docs/htmldocs/Samba-HOWTO-Collection.html b/docs/htmldocs/Samba-HOWTO-Collection.html index 5175bd4c8dd..ffb6939e173 100644 --- a/docs/htmldocs/Samba-HOWTO-Collection.html +++ b/docs/htmldocs/Samba-HOWTO-Collection.html @@ -40,7 +40,7 @@ NAME="AEN8" >

Last Update : Mon Apr 1 08:47:26 CST 2002

: Thu Aug 15 12:48:45 CDT 2002

This book is a collection of HOWTOs added to Samba documentation over the years. I try to ensure that all are current, but sometimes the is a larger job @@ -178,64 +178,147 @@ HREF="#AEN199" >

1.10.6. Mapping Usernames
1.10.7. Other Character Sets
2. Diagnosing your samba server
2.1. Introduction
2.2. Assumptions
2.3. Tests
2.3.1. Test 1
2.3.2. Test 2
2.3.3. Test 3
2.3.4. Test 4
2.3.5. Test 5
2.3.6. Test 6
2.3.7. Test 7
2.3.8. Test 8
2.3.9. Test 9
2.3.10. Test 10
2.3.11. Test 11
2.4. Still having troubles?
3. Integrating MS Windows networks with Samba
2.1. 3.1. Agenda
2.2. 3.2. Name Resolution in a pure Unix/Linux world
2.2.1. 3.2.1. /etc/hosts
2.2.2. 3.2.2. /etc/resolv.conf
2.2.3. 3.2.3. /etc/host.conf
2.2.4. 3.2.4. /etc/nsswitch.conf
2.3. 3.3. Name resolution as used within MS Windows networking
2.3.1. 3.3.1. The NetBIOS Name Cache
2.3.2. 3.3.2. The LMHOSTS file
2.3.3. 3.3.3. HOSTS file
2.3.4. 3.3.4. DNS Lookup
2.3.5. 3.3.5. WINS Lookup
2.4. 3.4. How browsing functions and how to deploy stable and dependable browsing using Samba
2.5. 3.5. MS Windows security options and how to configure Samba for seemless integration
2.5.1. 3.5.1. Use MS Windows NT as an authentication server
2.5.2. 3.5.2. Make Samba a member of an MS Windows NT security domain
2.5.3. 3.5.3. Configure Samba as an authentication server
2.5.3.1. 3.5.3.1. Users
2.5.3.2. 3.5.3.2. MS Windows NT Machine Accounts
2.6. 3.6. Conclusions
3. 4. Configuring PAM for distributed but centrally managed authentication
3.1. 4.1. Samba and PAM
3.2. 4.2. Distributed Authentication
3.3. 4.3. PAM Configuration in smb.conf
4. 5. Hosting a Microsoft Distributed File System tree on Samba
4.1. 5.1. Instructions
4.1.1. 5.1.1. Notes
5. 6. UNIX Permission Bits and Windows NT Access Control Lists
5.1. 6.1. Viewing and changing UNIX permissions using the NT security dialogs
5.2. 6.2. How to view file security on a Samba share
5.3. 6.3. Viewing file ownership
5.4. 6.4. Viewing file or directory permissions
5.4.1. 6.4.1. File Permissions
5.4.2. 6.4.2. Directory Permissions
5.5. 6.5. Modifying file or directory permissions
5.6. 6.6. Interaction with the standard Samba create mask parameters
5.7. 6.7. Interaction with the standard Samba file attribute mapping
6. 7. Printing Support in Samba 2.2.x
6.1. 7.1. Introduction
6.2. 7.2. Configuration
6.2.1. 7.2.1. Creating [print$]
6.2.2. 7.2.2. Setting Drivers for Existing Printers
6.2.3. 7.2.3. Support a large number of printers
6.2.4. 7.2.4. Adding New Printers via the Windows NT APW
6.2.5. 7.2.5. Samba and Printer Ports
6.3. 7.3. The Imprints Toolset
6.3.1. 7.3.1. What is Imprints?
6.3.2. 7.3.2. Creating Printer Driver Packages
6.3.3. 7.3.3. The Imprints server
6.3.4. 7.3.4. The Installation Client
6.4. 7.4.
7. 8. Debugging Printing Problems
8.1. Introduction
8.2. Debugging printer problems
8.3. What printers do I have?
8.4. Setting up printcap and print servers
8.5. Job sent, no output
8.6. Job sent, strange output
8.7. Raw PostScript printed
8.8. Advanced Printing
8.9. Real debugging
9. Security levels
9.1. Introduction
9.2. More complete description of security levels
10. security = domain in Samba 2.x
7.1. 10.1. Joining an NT Domain with Samba 2.2
7.2. 10.2. Samba and Windows 2000 Domains
7.3. Why is this better than security = server?
8. How to Configure Samba 2.2 as a Primary Domain Controller
8.1. Prerequisite Reading
8.2. Background
8.3. Configuring the Samba Domain Controller
8.4. Creating Machine Trust Accounts and Joining Clients to the -Domain
8.4.1. Manual Creation of Machine Trust Accounts
8.4.2. "On-the-Fly" Creation of Machine Trust Accounts
8.4.3. Joining the Client to the Domain
8.5. Common Problems and Errors
8.6. System Policies and Profiles
8.7. What other help can I get?
8.8. Domain Control for Windows 9x/ME
8.8.1. Configuration Instructions: Network Logons
8.8.2. Configuration Instructions: Setting up Roaming User Profiles
8.8.2.1. Windows NT Configuration
8.8.2.2. Windows 9X Configuration
8.8.2.3. Win9X and WinNT Configuration
8.8.2.4. Windows 9X Profile Setup
8.8.2.5. Windows NT Workstation 4.0
8.8.2.6. Windows NT Server
8.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0
8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba
9. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain
9.1. Prerequisite Reading
9.2. Background
9.3. What qualifies a Domain Controller on the network?
9.3.1. How does a Workstation find its domain controller?
9.3.2. When is the PDC needed?
9.4. Can Samba be a Backup Domain Controller?
9.5. How do I set up a Samba BDC?
9.5.1. How do I replicate the smbpasswd file?
10. Storing Samba's User/Machine Account information in an LDAP Directory
10.1. Purpose
10.2. Introduction
10.3. Supported LDAP Servers
10.4. Schema and Relationship to the RFC 2307 posixAccount
10.5. Configuring Samba with LDAP
10.5.1. OpenLDAP configuration
10.5.2. Configuring Samba
10.6. Accounts and Groups management
10.7. Security and sambaAccount
10.8. LDAP specials attributes for sambaAccounts
10.9. Example LDIF Entries for a sambaAccount
10.10. CommentsWhy is this better than security = server?
11.1. Abstract
11.2. Introduction
11.3. What Winbind Provides
11.3.1. Target Uses
11.4. How Winbind Works
11.4.1. Microsoft Remote Procedure Calls
11.4.2. Name Service Switch
11.4.3. Pluggable Authentication Modules
11.4.4. User and Group ID Allocation
11.4.5. Result Caching
11.5. Installation and Configuration
11.5.1. Introduction
11.5.2. Requirements
11.5.3. Testing Things Out
11.5.3.1. Configure and compile SAMBA
11.5.3.2. Configure nsswitch.conf
11.5.3.3. Configure smb.conf
11.5.3.4. Join the SAMBA server to the PDC domain
11.5.3.5. Start up the winbindd daemon and test it!
11.5.3.6. Fix the /etc/rc.d/init.d/smb startup filesFix the init.d startup scripts
11.5.3.7. Configure Winbind and PAM
11.6. Limitations
11.7. Conclusion
12. How to Configure Samba 2.2 as a Primary Domain Controller
12.1. Prerequisite Reading
12.2. Background
12.3. Configuring the Samba Domain Controller
12.4. Creating Machine Trust Accounts and Joining Clients to the +Domain
12.4.1. Manual Creation of Machine Trust Accounts
12.4.2. "On-the-Fly" Creation of Machine Trust Accounts
12.4.3. Joining the Client to the Domain
12.5. Common Problems and Errors
12.6. System Policies and Profiles
12.7. What other help can I get?
12.8. Domain Control for Windows 9x/ME
12.8.1. Configuration Instructions: Network Logons
12.8.2. Configuration Instructions: Setting up Roaming User Profiles
12.8.2.1. Windows NT Configuration
12.8.2.2. Windows 9X Configuration
12.8.2.3. Win9X and WinNT Configuration
12.8.2.4. Windows 9X Profile Setup
12.8.2.5. Windows NT Workstation 4.0
12.8.2.6. Windows NT Server
12.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0
12.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba
13. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain
13.1. Prerequisite Reading
13.2. Background
13.3. What qualifies a Domain Controller on the network?
13.3.1. How does a Workstation find its domain controller?
13.3.2. When is the PDC needed?
13.4. Can Samba be a Backup Domain Controller?
13.5. How do I set up a Samba BDC?
13.5.1. How do I replicate the smbpasswd file?
14. Storing Samba's User/Machine Account information in an LDAP Directory
14.1. Purpose
14.2. Introduction
14.3. Supported LDAP Servers
14.4. Schema and Relationship to the RFC 2307 posixAccount
14.5. Configuring Samba with LDAP
14.5.1. OpenLDAP configuration
14.5.2. Configuring Samba
14.6. Accounts and Groups management
14.7. Security and sambaAccount
14.8. LDAP specials attributes for sambaAccounts
14.9. Example LDIF Entries for a sambaAccount
14.10. Comments
15. Improved browsing in samba
15.1. Overview of browsing
15.2. Browsing support in samba
15.3. Problem resolution
15.4. Browsing across subnets
15.4.1. How does cross subnet browsing work ?
15.5. Setting up a WINS server
15.6. Setting up Browsing in a WORKGROUP
15.7. Setting up Browsing in a DOMAIN
15.8. Forcing samba to be the master
15.9. Making samba the domain master
15.10. Note about broadcast addresses
15.11. Multiple interfaces
16. Samba performance issues
16.1. Comparisons
16.2. Oplocks
16.2.1. Overview
16.2.2. Level2 Oplocks
16.2.3. Old 'fake oplocks' option - deprecated
16.3. Socket options
16.4. Read size
16.5. Max xmit
16.6. Locking
16.7. Share modes
16.8. Log level
16.9. Wide lines
16.10. Read raw
16.11. Write raw
16.12. Read prediction
16.13. Memory mapping
16.14. Slow Clients
16.15. Slow Logins
16.16. Client tuning
16.17. My Results
17. OS2 Client HOWTO
12.1. 17.1. FAQs
12.1.1. 17.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?
12.1.2. 17.1.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?
12.1.3. 17.1.3. Are there any other issues when OS/2 (any version) is used as a client?
12.1.4. 17.1.4. How do I get printer driver download working for OS/2 clients?
13. 18. HOWTO Access Samba source code via CVS
13.1. 18.1. Introduction
13.2. 18.2. CVS Access to samba.org
13.2.1. 18.2.1. Access via CVSweb
13.2.2. 18.2.2. Access via cvs
19. Reporting Bugs
19.1. Introduction
19.2. General info
19.3. Debug levels
19.4. Internal errors
19.5. Attaching to a running process
19.6. Patches
Index

Your should get back a list of shares available on +>You should get back a list of shares available on your server. If you don't then something is incorrectly setup. Note that this method can also be used to see what shares are available on other LanManager clients (such as WfWg).

By default Samba uses a blank scope ID. This means all your windows boxes must also have a blank scope ID. If you really want to use a non-blank scope ID then you will - need to use the -i <scope> option to nmbd, smbd, and - smbclient. All your PCs will need to have the same setting for + need to use the 'netbios scope' smb.conf option. + All your PCs will need to have the same setting for this to work. I do not recommend scope IDs.

You can disable share modes using "share modes = no". - This may be useful on a heavily loaded server as the share - modes code is very slow. See also the FAST_SHARE_MODES - option in the Makefile for a way to do full share modes - very fast using shared memory (if your OS supports it).


Chapter 2. Diagnosing your samba server

2.1. Introduction

This file contains a list of tests you can perform to validate your +Samba server. It also tells you what the likely cause of the problem +is if it fails any one of these steps. If it passes all these tests +then it is probably working fine.

You should do ALL the tests, in the order shown. I have tried to +carefully choose them so later tests only use capabilities verified in +the earlier tests.

If you send me an email saying "it doesn't work" and you have not +followed this test procedure then you should not be surprised if I +ignore your email.


2.2. Assumptions

In all of the tests I assume you have a Samba server called BIGSERVER +and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the +PC is running windows for workgroups with a recent copy of the +microsoft tcp/ip stack. Alternatively, your PC may be running Windows +95 or Windows NT (Workstation or Server).

The procedure is similar for other types of clients.

I also assume you know the name of an available share in your +smb.conf. I will assume this share is called "tmp". You can add a +"tmp" share like by adding the following to smb.conf:


[tmp]
+ comment = temporary files 
+ path = /tmp
+ read only = yes

THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME +COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS

Please pay attention to the error messages you receive. If any error message +reports that your server is being unfriendly you should first check that you +IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf +file points to name servers that really do exist.

Also, if you do not have DNS server access for name resolution please check +that the settings for your smb.conf file results in "dns proxy = no". The +best way to check this is with "testparm smb.conf"


2.3. Tests

2.3.1. Test 1

In the directory in which you store your smb.conf file, run the command +"testparm smb.conf". If it reports any errors then your smb.conf +configuration file is faulty.

Note: Your smb.conf file may be located in: /etc + Or in: /usr/local/samba/lib


1.10.7. Other Character Sets2.3.2. Test 2

If you have problems using filenames with accented - characters in them (like the German, French or Scandinavian - character sets) then I recommend you look at the "valid chars" - option in smb.conf and also take a look at the validchars - package in the examples directory.

Run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from +the unix box. If you don't get a valid response then your TCP/IP +software is not correctly installed.

Note that you will need to start a "dos prompt" window on the PC to +run ping.

If you get a message saying "host not found" or similar then your DNS +software or /etc/hosts file is not correctly setup. It is possible to +run samba without DNS entries for the server and client, but I assume +you do have correct entries for the remainder of these tests.

Another reason why ping might fail is if your host is running firewall +software. You will need to relax the rules to let in the workstation +in question, perhaps by allowing access from another subnet (on Linux +this is done via the ipfwadm program.)


2.3.3. Test 3

Run the command "smbclient -L BIGSERVER" on the unix box. You +should get a list of available shares back.

If you get a error message containing the string "Bad password" then +you probably have either an incorrect "hosts allow", "hosts deny" or +"valid users" line in your smb.conf, or your guest account is not +valid. Check what your guest account is using "testparm" and +temporarily remove any "hosts allow", "hosts deny", "valid users" or +"invalid users" lines.

If you get a "connection refused" response then the smbd server may +not be running. If you installed it in inetd.conf then you probably edited +that file incorrectly. If you installed it as a daemon then check that +it is running, and check that the netbios-ssn port is in a LISTEN +state using "netstat -a".

If you get a "session request failed" then the server refused the +connection. If it says "Your server software is being unfriendly" then +its probably because you have invalid command line parameters to smbd, +or a similar fatal problem with the initial startup of smbd. Also +check your config file (smb.conf) for syntax errors with "testparm" +and that the various directories where samba keeps its log and lock +files exist.

There are a number of reasons for which smbd may refuse or decline +a session request. The most common of these involve one or more of +the following smb.conf file entries:

	hosts deny = ALL
+	hosts allow = xxx.xxx.xxx.xxx/yy
+	bind interfaces only = Yes

In the above, no allowance has been made for any session requests that +will automatically translate to the loopback adaptor address 127.0.0.1. +To solve this problem change these lines to:

	hosts deny = ALL
+	hosts allow = xxx.xxx.xxx.xxx/yy 127.

Do NOT use the "bind interfaces only" parameter where you may wish to +use the samba password change facility, or where smbclient may need to +access local service for name resolution or for local resource +connections. (Note: the "bind interfaces only" parameter deficiency +where it will not allow connections to the loopback address will be +fixed soon).

Another common cause of these two errors is having something already running +on port 139, such as Samba (ie: smbd is running from inetd already) or +something like Digital's Pathworks. Check your inetd.conf file before trying +to start smbd as a daemon, it can avoid a lot of frustration!

And yet another possible cause for failure of TEST 3 is when the subnet mask +and / or broadcast address settings are incorrect. Please check that the +network interface IP Address / Broadcast Address / Subnet Mask settings are +correct and that Samba has correctly noted these in the log.nmb file.


2.3.4. Test 4

Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the +IP address of your Samba server back.

If you don't then nmbd is incorrectly installed. Check your inetd.conf +if you run it from there, or that the daemon is running and listening +to udp port 137.

One common problem is that many inetd implementations can't take many +parameters on the command line. If this is the case then create a +one-line script that contains the right parameters and run that from +inetd.


2.3.5. Test 5

run the command nmblookup -B ACLIENT '*'

You should get the PCs IP address back. If you don't then the client +software on the PC isn't installed correctly, or isn't started, or you +got the name of the PC wrong.

If ACLIENT doesn't resolve via DNS then use the IP address of the +client in the above test.


2.3.6. Test 6

Run the command nmblookup -d 2 '*'

This time we are trying the same as the previous test but are trying +it via a broadcast to the default broadcast address. A number of +Netbios/TCPIP hosts on the network should respond, although Samba may +not catch all of the responses in the short time it listens. You +should see "got a positive name query response" messages from several +hosts.

If this doesn't give a similar result to the previous test then +nmblookup isn't correctly getting your broadcast address through its +automatic mechanism. In this case you should experiment use the +"interfaces" option in smb.conf to manually configure your IP +address, broadcast and netmask.

If your PC and server aren't on the same subnet then you will need to +use the -B option to set the broadcast address to the that of the PCs +subnet.

This test will probably fail if your subnet mask and broadcast address are +not correct. (Refer to TEST 3 notes above).


2.3.7. Test 7

Run the command smbclient //BIGSERVER/TMP. You should +then be prompted for a password. You should use the password of the account +you are logged into the unix box with. If you want to test with +another account then add the -U >accountname< option to the end of +the command line. eg: +smbclient //bigserver/tmp -Ujohndoe

Note: It is possible to specify the password along with the username +as follows: +smbclient //bigserver/tmp -Ujohndoe%secret

Once you enter the password you should get the "smb>" prompt. If you +don't then look at the error message. If it says "invalid network +name" then the service "tmp" is not correctly setup in your smb.conf.

If it says "bad password" then the likely causes are:

  1. you have shadow passords (or some other password system) but didn't + compile in support for them in smbd +

  2. your "valid users" configuration is incorrect +

  3. you have a mixed case password and you haven't enabled the "password + level" option at a high enough level +

  4. the "path =" line in smb.conf is incorrect. Check it with testparm +

  5. you enabled password encryption but didn't create the SMB encrypted + password file +

Once connected you should be able to use the commands +dir get put etc. +Type help >command< for instructions. You should +especially check that the amount of free disk space shown is correct +when you type dir.


2.3.8. Test 8

On the PC type the command net view \\BIGSERVER. You will +need to do this from within a "dos prompt" window. You should get back a +list of available shares on the server.

If you get a "network name not found" or similar error then netbios +name resolution is not working. This is usually caused by a problem in +nmbd. To overcome it you could do one of the following (you only need +to choose one of them):

  1. fixup the nmbd installation

  2. add the IP address of BIGSERVER to the "wins server" box in the + advanced tcp/ip setup on the PC.

  3. enable windows name resolution via DNS in the advanced section of + the tcp/ip setup

  4. add BIGSERVER to your lmhosts file on the PC.

If you get a "invalid network name" or "bad password error" then the +same fixes apply as they did for the "smbclient -L" test above. In +particular, make sure your "hosts allow" line is correct (see the man +pages)

Also, do not overlook that fact that when the workstation requests the +connection to the samba server it will attempt to connect using the +name with which you logged onto your Windows machine. You need to make +sure that an account exists on your Samba server with that exact same +name and password.

If you get "specified computer is not receiving requests" or similar +it probably means that the host is not contactable via tcp services. +Check to see if the host is running tcp wrappers, and if so add an entry in +the hosts.allow file for your client (or subnet, etc.)


2.3.9. Test 9

Run the command net use x: \\BIGSERVER\TMP. You should +be prompted for a password then you should get a "command completed +successfully" message. If not then your PC software is incorrectly +installed or your smb.conf is incorrect. make sure your "hosts allow" +and other config lines in smb.conf are correct.

It's also possible that the server can't work out what user name to +connect you as. To see if this is the problem add the line "user = +USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the +username corresponding to the password you typed. If you find this +fixes things you may need the username mapping option.


2.3.10. Test 10

Run the command nmblookup -M TESTGROUP where +TESTGROUP is the name of the workgroup that your Samba server and +Windows PCs belong to. You should get back the IP address of the +master browser for that workgroup.

If you don't then the election process has failed. Wait a minute to +see if it is just being slow then try again. If it still fails after +that then look at the browsing options you have set in smb.conf. Make +sure you have preferred master = yes to ensure that +an election is held at startup.


2.3.11. Test 11

From file manager try to browse the server. Your samba server should +appear in the browse list of your local workgroup (or the one you +specified in smb.conf). You should be able to double click on the name +of the server and get a list of shares. If you get a "invalid +password" error when you do then you are probably running WinNT and it +is refusing to browse a server that has no encrypted password +capability and is in user level security mode. In this case either set +security = server AND +password server = Windows_NT_Machine in your +smb.conf file, or enable encrypted passwords AFTER compiling in support +for encrypted passwords (refer to the Makefile).


2.4. Still having troubles?

Try the mailing list or newsgroup, or use the ethereal utility to +sniff the problem. The official samba mailing list can be reached at +samba@samba.org. To find +out more about samba and how to subscribe to the mailing list check +out the samba web page at +http://samba.org/samba

Also look at the other docs in the Samba package!


Chapter 2. Integrating MS Windows networks with SambaChapter 3. Integrating MS Windows networks with Samba

2.1. Agenda3.1. Agenda

To identify the key functional mechanisms of MS Windows networking @@ -1938,8 +2849,8 @@ CLASS="SECT1" >


2.2. Name Resolution in a pure Unix/Linux world3.2. Name Resolution in a pure Unix/Linux world

The key configuration files covered in this section are:


2.2.1. 3.2.1. /etc/hosts is one such file.

When the IP address of the destination interface has been -determined a protocol called ARP/RARP isused to identify +determined a protocol called ARP/RARP is used to identify the MAC address of the target interface. ARP stands for Address Resolution Protocol, and is a broadcast oriented method that uses UDP (User Datagram Protocol) to send a request to all @@ -2070,8 +2981,8 @@ CLASS="SECT2" >


2.2.2. 3.2.2. /etc/resolv.conf

2.2.3. 3.2.3. /etc/host.conf

2.2.4. 3.2.4. /etc/nsswitch.conf

2.3. Name resolution as used within MS Windows networking3.3. Name resolution as used within MS Windows networking

MS Windows networking is predicated about the name each machine @@ -2293,7 +3204,7 @@ architecture of the MS Windows network. The term "workgroup" indicates that the primary nature of the network environment is that of a peer-to-peer design. In a WORKGROUP all machines are responsible for their own security, and generally such security is limited to use of -just a password (known as SHARE MORE security). In most situations +just a password (known as SHARE MODE security). In most situations with peer-to-peer networking the users who control their own machines will simply opt to have no security at all. It is possible to have USER MODE security in a WORKGROUP environment, thus requiring use @@ -2318,13 +3229,13 @@ CLASS="SECT2" >


2.3.1. The NetBIOS Name Cache3.3.1. The NetBIOS Name Cache

All MS Windows machines employ an in memory buffer in which is -stored the NetBIOS names and their IP addresses for all external -machines that that the local machine has communicated with over the +stored the NetBIOS names and IP addresses for all external +machines that that machine has communicated with over the past 10-15 minutes. It is more efficient to obtain an IP address for a machine from the local cache than it is to go through all the configured name resolution mechanisms.

If a machine whose name is in the local name cache has been shut down before the name had been expired and flushed from the cache, then an attempt to exchange a message with that machine will be subject -to time-out delays. ie: It's name is in the cache, so a name resolution +to time-out delays. i.e.: Its name is in the cache, so a name resolution lookup will succeed, but the machine can not respond. This can be frustrating for users - but it is a characteristic of the protocol.


2.3.2. The LMHOSTS file3.3.2. The LMHOSTS file

This file is usually located in MS Windows NT 4.0 or @@ -2457,8 +3368,8 @@ CLASS="SECT2" >


2.3.3. HOSTS file3.3.3. HOSTS file

This file is usually located in MS Windows NT 4.0 or 2000 in @@ -2479,8 +3390,8 @@ CLASS="SECT2" >


2.3.4. DNS Lookup3.3.4. DNS Lookup

This capability is configured in the TCP/IP setup area in the network @@ -2499,8 +3410,8 @@ CLASS="SECT2" >


2.3.5. WINS Lookup3.3.5. WINS Lookup

A WINS (Windows Internet Name Server) service is the equivaent of the @@ -2560,13 +3471,13 @@ CLASS="SECT1" >


2.4. How browsing functions and how to deploy stable and +NAME="AEN491" +>3.4. How browsing functions and how to deploy stable and dependable browsing using Samba

As stated above, MS Windows machines register their NetBIOS names -(ie: the machine name for each service type in operation) on start +(i.e.: the machine name for each service type in operation) on start up. Also, as stated above, the exact method by which this name registration takes place is determined by whether or not the MS Windows client/server has been given a WINS server address, whether or not LMHOSTS lookup @@ -2591,7 +3502,7 @@ Instead, the domain master browser serves the role of contacting each local master browser (found by asking WINS or from LMHOSTS) and exchanging browse list contents. This way every master browser will eventually obtain a complete list of all machines that are on the network. Every 11-15 minutes an election -is held to determine which machine will be the master browser. By nature of +is held to determine which machine will be the master browser. By the nature of the election criteria used, the machine with the highest uptime, or the most senior protocol version, or other criteria, will win the election as domain master browser.


2.5. MS Windows security options and how to configure +NAME="AEN501" +>3.5. MS Windows security options and how to configure Samba for seemless integration

MS Windows clients have a habit of dropping network mappings that have been idle for 10 minutes or longer. When the user attempts to -use the mapped drive connection that has been dropped the SMB protocol -has a mechanism by which the connection can be re-established using +use the mapped drive connection that has been dropped, the client +re-establishes the connection using a cached copy of the password.

When Microsoft changed the default password mode, they dropped support for @@ -2769,8 +3680,8 @@ CLASS="SECT2" >


2.5.1. Use MS Windows NT as an authentication server3.5.1. Use MS Windows NT as an authentication server

This method involves the additions of the following parameters @@ -2814,8 +3725,8 @@ CLASS="SECT2" >


2.5.2. Make Samba a member of an MS Windows NT security domain3.5.2. Make Samba a member of an MS Windows NT security domain

This method involves additon of the following paramters in the smb.conf file:


2.5.3. Configure Samba as an authentication server3.5.3. Configure Samba as an authentication server

This mode of authentication demands that there be on the -Unix/Linux system both a Unix style account as well as and +Unix/Linux system both a Unix style account as well as an smbpasswd entry for the user. The Unix system account can be locked if required as only the encrypted password will be used for SMB client authentication.


2.5.3.1. Users3.5.3.1. Users

A user account that may provide a home directory should be @@ -2964,8 +3875,8 @@ CLASS="SECT3" >


2.5.3.2. MS Windows NT Machine Accounts3.5.3.2. MS Windows NT Machine Accounts

These are required only when Samba is used as a domain @@ -2994,8 +3905,8 @@ CLASS="SECT1" >


2.6. Conclusions3.6. Conclusions

Samba provides a flexible means to operate as...


Chapter 3. Configuring PAM for distributed but centrally +>Chapter 4. Configuring PAM for distributed but centrally managed authentication

3.1. Samba and PAM4.1. Samba and PAM

A number of Unix systems (eg: Sun Solaris), as well as the @@ -3298,8 +4209,8 @@ CLASS="SECT1" >


3.2. Distributed Authentication4.2. Distributed Authentication

The astute administrator will realize from this that the @@ -3331,8 +4242,8 @@ CLASS="SECT1" >


3.3. PAM Configuration in smb.conf4.3. PAM Configuration in smb.conf

There is an option in smb.conf called


Chapter 4. Hosting a Microsoft Distributed File System tree on SambaChapter 5. Hosting a Microsoft Distributed File System tree on Samba

4.1. Instructions5.1. Instructions

The Distributed File System (or Dfs) provides a means of @@ -3536,8 +4447,8 @@ CLASS="SECT2" >


4.1.1. Notes5.1.1. Notes


Chapter 5. UNIX Permission Bits and Windows NT Access Control ListsChapter 6. UNIX Permission Bits and Windows NT Access Control Lists

5.1. Viewing and changing UNIX permissions using the NT +NAME="AEN718" +>6.1. Viewing and changing UNIX permissions using the NT security dialogs


5.2. How to view file security on a Samba share6.2. How to view file security on a Samba share

From an NT 4.0 client, single-click with the right @@ -3662,8 +4573,8 @@ CLASS="SECT1" >


5.3. Viewing file ownership6.3. Viewing file ownership

Clicking on the


5.4. Viewing file or directory permissions6.4. Viewing file or directory permissions

The third button is the


5.4.1. File Permissions6.4.1. File Permissions

The standard UNIX user/group/world triple and @@ -3872,8 +4783,8 @@ CLASS="SECT2" >


5.4.2. Directory Permissions6.4.2. Directory Permissions

Directories on an NT NTFS file system have two @@ -3904,8 +4815,8 @@ CLASS="SECT1" >


5.5. Modifying file or directory permissions6.5. Modifying file or directory permissions

Modifying file and directory permissions is as simple @@ -4002,8 +4913,8 @@ CLASS="SECT1" >


5.6. Interaction with the standard Samba create mask +NAME="AEN816" +>6.6. Interaction with the standard Samba create mask parameters


5.7. Interaction with the standard Samba file attribute +NAME="AEN880" +>6.7. Interaction with the standard Samba file attribute mapping


Chapter 6. Printing Support in Samba 2.2.xChapter 7. Printing Support in Samba 2.2.x

6.1. Introduction7.1. Introduction

Beginning with the 2.2.0 release, Samba supports @@ -4414,8 +5325,8 @@ CLASS="SECT1" >


6.2. Configuration7.2. Configuration


6.2.1. Creating [print$]7.2.1. Creating [print$]

In order to support the uploading of printer driver @@ -4685,8 +5596,8 @@ CLASS="SECT2" >


6.2.2. Setting Drivers for Existing Printers7.2.2. Setting Drivers for Existing Printers

The initial listing of printers in the Samba host's @@ -4757,8 +5668,8 @@ CLASS="SECT2" >


6.2.3. Support a large number of printers7.2.3. Support a large number of printers

One issue that has arisen during the development @@ -4832,8 +5743,8 @@ CLASS="SECT2" >


6.2.4. Adding New Printers via the Windows NT APW7.2.4. Adding New Printers via the Windows NT APW

By default, Samba offers all printer shares defined in


6.2.5. Samba and Printer Ports7.2.5. Samba and Printer Ports

Windows NT/2000 print servers associate a port with each printer. These normally @@ -4975,8 +5886,8 @@ CLASS="SECT1" >


6.3. The Imprints Toolset7.3. The Imprints Toolset

The Imprints tool set provides a UNIX equivalent of the @@ -4993,8 +5904,8 @@ CLASS="SECT2" >


6.3.1. What is Imprints?7.3.1. What is Imprints?

Imprints is a collection of tools for supporting the goals @@ -5025,8 +5936,8 @@ CLASS="SECT2" >


6.3.2. Creating Printer Driver Packages7.3.2. Creating Printer Driver Packages

The process of creating printer driver packages is beyond @@ -5041,8 +5952,8 @@ CLASS="SECT2" >


6.3.3. The Imprints server7.3.3. The Imprints server

The Imprints server is really a database server that @@ -5061,8 +5972,8 @@ CLASS="SECT2" >


6.3.4. The Installation Client7.3.4. The Installation Client

More information regarding the Imprints installation client @@ -5164,8 +6075,8 @@ CLASS="SECT1" >


6.4. 7.4. Migration to from Samba 2.0.x to 2.2.x

Chapter 7. security = domain in Samba 2.xChapter 8. Debugging Printing Problems

7.1. Joining an NT Domain with Samba 2.28.1. Introduction

This is a short description of how to debug printing problems with +Samba. This describes how to debug problems with printing from a SMB +client to a Samba server, not the other way around. For the reverse +see the examples/printing directory.

Ok, so you want to print to a Samba server from your PC. The first +thing you need to understand is that Samba does not actually do any +printing itself, it just acts as a middleman between your PC client +and your Unix printing subsystem. Samba receives the file from the PC +then passes the file to a external "print command". What print command +you use is up to you.

The whole things is controlled using options in smb.conf. The most +relevant options (which you should look up in the smb.conf man page) +are:

      [global]
+        print command     - send a file to a spooler
+        lpq command       - get spool queue status
+        lprm command      - remove a job
+      [printers]
+        path = /var/spool/lpd/samba

The following are nice to know about:

        queuepause command   - stop a printer or print queue
+        queueresume command  - start a printer or print queue

Example:

        print command = /usr/bin/lpr -r -P%p %s
+        lpq command   = /usr/bin/lpq    -P%p %s
+        lprm command  = /usr/bin/lprm   -P%p %j
+        queuepause command = /usr/sbin/lpc -P%p stop
+        queuepause command = /usr/sbin/lpc -P%p start

Samba should set reasonable defaults for these depending on your +system type, but it isn't clairvoyant. It is not uncommon that you +have to tweak these for local conditions. The commands should +always have fully specified pathnames, as the smdb may not have +the correct PATH values.

When you send a job to Samba to be printed, it will make a temporary +copy of it in the directory specified in the [printers] section. +and it should be periodically cleaned out. The lpr -r option +requests that the temporary copy be removed after printing; If +printing fails then you might find leftover files in this directory, +and it should be periodically cleaned out. Samba used the lpq +command to determine the "job number" assigned to your print job +by the spooler.

The %>letter< are "macros" that get dynamically replaced with appropriate +values when they are used. The %s gets replaced with the name of the spool +file that Samba creates and the %p gets replaced with the name of the +printer. The %j gets replaced with the "job number" which comes from +the lpq output.


8.2. Debugging printer problems

One way to debug printing problems is to start by replacing these +command with shell scripts that record the arguments and the contents +of the print file. A simple example of this kind of things might +be:

	print command = /tmp/saveprint %p %s
+
+    #!/bin/saveprint
+    # we make sure that we are the right user
+    /usr/bin/id -p >/tmp/tmp.print
+    # we run the command and save the error messages
+    # replace the command with the one appropriate for your system
+    /usr/bin/lpr -r -P$1 $2 2>>&/tmp/tmp.print

Then you print a file and try removing it. You may find that the +print queue needs to be stopped in order to see the queue status +and remove the job:


h4: {42} % echo hi >/tmp/hi
+h4: {43} % smbclient //localhost/lw4
+added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0
+Password: 
+Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7]
+smb: \> print /tmp/hi
+putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s)
+smb: \> queue
+1049     3            hi-17534
+smb: \> cancel 1049
+Error cancelling job 1049 : code 0
+smb: \> cancel 1049
+Job 1049 cancelled
+smb: \> queue
+smb: \> exit

The 'code 0' indicates that the job was removed. The comment +by the smbclient is a bit misleading on this. +You can observe the command output and then and look at the +/tmp/tmp.print file to see what the results are. You can quickly +find out if the problem is with your printing system. Often people +have problems with their /etc/printcap file or permissions on +various print queues.


8.3. What printers do I have?

You can use the 'testprns' program to check to see if the printer +name you are using is recognized by Samba. For example, you can +use:

    testprns printer /etc/printcap

Samba can get its printcap information from a file or from a program. +You can try the following to see the format of the extracted +information:

    testprns -a printer /etc/printcap
+
+    testprns -a printer '|/bin/cat printcap'


8.4. Setting up printcap and print servers

You may need to set up some printcaps for your Samba system to use. +It is strongly recommended that you use the facilities provided by +the print spooler to set up queues and printcap information.

Samba requires either a printcap or program to deliver printcap +information. This printcap information has the format:

  name|alias1|alias2...:option=value:...

For almost all printing systems, the printer 'name' must be composed +only of alphanumeric or underscore '_' characters. Some systems also +allow hyphens ('-') as well. An alias is an alternative name for the +printer, and an alias with a space in it is used as a 'comment' +about the printer. The printcap format optionally uses a \ at the end of lines +to extend the printcap to multiple lines.

Here are some examples of printcap files:

  1. pr just printer name

  2. pr|alias printer name and alias

  3. pr|My Printer printer name, alias used as comment

  4. pr:sh:\ Same as pr:sh:cm= testing + :cm= \ + testing

  5. pr:sh Same as pr:sh:cm= testing + :cm= testing

Samba reads the printcap information when first started. If you make +changes in the printcap information, then you must do the following:

  1. make sure that the print spooler is aware of these changes. +The LPRng system uses the 'lpc reread' command to do this.

  2. make sure that the spool queues, etc., exist and have the +correct permissions. The LPRng system uses the 'checkpc -f' +command to do this.

  3. You now should send a SIGHUP signal to the smbd server to have +it reread the printcap information.


8.5. Job sent, no output

This is the most frustrating part of printing. You may have sent the +job, verified that the job was forwarded, set up a wrapper around +the command to send the file, but there was no output from the printer.

First, check to make sure that the job REALLY is getting to the +right print queue. If you are using a BSD or LPRng print spooler, +you can temporarily stop the printing of jobs. Jobs can still be +submitted, but they will not be printed. Use:

  lpc -Pprinter stop

Now submit a print job and then use 'lpq -Pprinter' to see if the +job is in the print queue. If it is not in the print queue then +you will have to find out why it is not being accepted for printing.

Next, you may want to check to see what the format of the job really +was. With the assistance of the system administrator you can view +the submitted jobs files. You may be surprised to find that these +are not in what you would expect to call a printable format. +You can use the UNIX 'file' utitily to determine what the job +format actually is:

    cd /var/spool/lpd/printer   # spool directory of print jobs
+    ls                          # find job files
+    file dfA001myhost

You should make sure that your printer supports this format OR that +your system administrator has installed a 'print filter' that will +convert the file to a format appropriate for your printer.


8.6. Job sent, strange output

Once you have the job printing, you can then start worrying about +making it print nicely.

The most common problem is extra pages of output: banner pages +OR blank pages at the end.

If you are getting banner pages, check and make sure that the +printcap option or printer option is configured for no banners. +If you have a printcap, this is the :sh (suppress header or banner +page) option. You should have the following in your printer.

   printer: ... :sh

If you have this option and are still getting banner pages, there +is a strong chance that your printer is generating them for you +automatically. You should make sure that banner printing is disabled +for the printer. This usually requires using the printer setup software +or procedures supplied by the printer manufacturer.

If you get an extra page of output, this could be due to problems +with your job format, or if you are generating PostScript jobs, +incorrect setting on your printer driver on the MicroSoft client. +For example, under Win95 there is a option:

  Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|

that allows you to choose if a Ctrl-D is appended to all jobs. +This is a very bad thing to do, as most spooling systems will +automatically add a ^D to the end of the job if it is detected as +PostScript. The multiple ^D may cause an additional page of output.


8.7. Raw PostScript printed

This is a problem that is usually caused by either the print spooling +system putting information at the start of the print job that makes +the printer think the job is a text file, or your printer simply +does not support PostScript. You may need to enable 'Automatic +Format Detection' on your printer.


8.8. Advanced Printing

Note that you can do some pretty magic things by using your +imagination with the "print command" option and some shell scripts. +Doing print accounting is easy by passing the %U option to a print +command shell script. You could even make the print command detect +the type of output and its size and send it to an appropriate +printer.


8.9. Real debugging

If the above debug tips don't help, then maybe you need to bring in +the bug guns, system tracing. See Tracing.txt in this directory.


Chapter 9. Security levels

9.1. Introduction

Samba supports the following options to the global smb.conf parameter

[global]
+security = [share|user(default)|domain|ads]

Please refer to the smb.conf man page for usage information and to the document +DOMAIN_MEMBER.html for further background details +on domain mode security. The Windows 2000 Kerberos domain security model +(security = ads) is described in the ADS-HOWTO.html.

Of the above, "security = server" means that Samba reports to clients that +it is running in "user mode" but actually passes off all authentication +requests to another "user mode" server. This requires an additional +parameter "password server =" that points to the real authentication server. +That real authentication server can be another Samba server or can be a +Windows NT server, the later natively capable of encrypted password support.


9.2. More complete description of security levels

A SMB server tells the client at startup what "security level" it is +running. There are two options "share level" and "user level". Which +of these two the client receives affects the way the client then tries +to authenticate itself. It does not directly affect (to any great +extent) the way the Samba server does security. I know this is +strange, but it fits in with the client/server approach of SMB. In SMB +everything is initiated and controlled by the client, and the server +can only tell the client what is available and whether an action is +allowed.

I'll describe user level security first, as its simpler. In user level +security the client will send a "session setup" command directly after +the protocol negotiation. This contains a username and password. The +server can either accept or reject that username/password +combination. Note that at this stage the server has no idea what +share the client will eventually try to connect to, so it can't base +the "accept/reject" on anything other than:

  1. the username/password

  2. the machine that the client is coming from

If the server accepts the username/password then the client expects to +be able to mount any share (using a "tree connection") without +specifying a password. It expects that all access rights will be as +the username/password specified in the "session setup".

It is also possible for a client to send multiple "session setup" +requests. When the server responds it gives the client a "uid" to use +as an authentication tag for that username/password. The client can +maintain multiple authentication contexts in this way (WinDD is an +example of an application that does this)

Ok, now for share level security. In share level security the client +authenticates itself separately for each share. It will send a +password along with each "tree connection" (share mount). It does not +explicitly send a username with this operation. The client is +expecting a password to be associated with each share, independent of +the user. This means that samba has to work out what username the +client probably wants to use. It is never explicitly sent the +username. Some commercial SMB servers such as NT actually associate +passwords directly with shares in share level security, but samba +always uses the unix authentication scheme where it is a +username/password that is authenticated, not a "share/password".

Many clients send a "session setup" even if the server is in share +level security. They normally send a valid username but no +password. Samba records this username in a list of "possible +usernames". When the client then does a "tree connection" it also adds +to this list the name of the share they try to connect to (useful for +home directories) and any users listed in the "user =" smb.conf +line. The password is then checked in turn against these "possible +usernames". If a match is found then the client is authenticated as +that user.

Finally "server level" security. In server level security the samba +server reports to the client that it is in user level security. The +client then does a "session setup" as described earlier. The samba +server takes the username/password that the client sends and attempts +to login to the "password server" by sending exactly the same +username/password that it got from the client. If that server is in +user level security and accepts the password then samba accepts the +clients connection. This allows the samba server to use another SMB +server as the "password server".

You should also note that at the very start of all this, where the +server tells the client what security level it is in, it also tells +the client if it supports encryption. If it does then it supplies the +client with a random "cryptkey". The client will then send all +passwords in encrypted form. You have to compile samba with encryption +enabled to support this feature, and you have to maintain a separate +smbpasswd file with SMB style encrypted passwords. It is +cryptographically impossible to translate from unix style encryption +to SMB style encryption, although there are some fairly simple management +schemes by which the two could be kept in sync.


Chapter 10. security = domain in Samba 2.x

10.1. Joining an NT Domain with Samba 2.2

Assume you have a Samba 2.x server with a NetBIOS name of @@ -5559,8 +7122,8 @@ CLASS="SECT1" >


7.2. Samba and Windows 2000 Domains10.2. Samba and Windows 2000 Domains

Many people have asked regarding the state of Samba's ability to participate in @@ -5584,8 +7147,8 @@ CLASS="SECT1" >


7.3. Why is this better than security = server?10.3. Why is this better than security = server?

Currently, domain security in Samba doesn't free you from @@ -5670,16 +7233,1643 @@ TARGET="_top" CLASS="CHAPTER" >


Chapter 8. How to Configure Samba 2.2 as a Primary Domain ControllerChapter 11. Unified Logons between Windows NT and UNIX using Winbind

8.1. Prerequisite Reading11.1. Abstract

Integration of UNIX and Microsoft Windows NT through + a unified logon has been considered a "holy grail" in heterogeneous + computing environments for a long time. We present + winbind, a component of the Samba suite + of programs as a solution to the unified logon problem. Winbind + uses a UNIX implementation + of Microsoft RPC calls, Pluggable Authentication Modules, and the Name + Service Switch to allow Windows NT domain users to appear and operate + as UNIX users on a UNIX machine. This paper describes the winbind + system, explaining the functionality it provides, how it is configured, + and how it works internally.


11.2. Introduction

It is well known that UNIX and Microsoft Windows NT have + different models for representing user and group information and + use different technologies for implementing them. This fact has + made it difficult to integrate the two systems in a satisfactory + manner.

One common solution in use today has been to create + identically named user accounts on both the UNIX and Windows systems + and use the Samba suite of programs to provide file and print services + between the two. This solution is far from perfect however, as + adding and deleting users on both sets of machines becomes a chore + and two sets of passwords are required both of which + can lead to synchronization problems between the UNIX and Windows + systems and confusion for users.

We divide the unified logon problem for UNIX machines into + three smaller problems:

  • Obtaining Windows NT user and group information +

  • Authenticating Windows NT users +

  • Password changing for Windows NT users +

Ideally, a prospective solution to the unified logon problem + would satisfy all the above components without duplication of + information on the UNIX machines and without creating additional + tasks for the system administrator when maintaining users and + groups on either system. The winbind system provides a simple + and elegant solution to all three components of the unified logon + problem.


11.3. What Winbind Provides

Winbind unifies UNIX and Windows NT account management by + allowing a UNIX box to become a full member of a NT domain. Once + this is done the UNIX box will see NT users and groups as if + they were native UNIX users and groups, allowing the NT domain + to be used in much the same manner that NIS+ is used within + UNIX-only environments.

The end result is that whenever any + program on the UNIX machine asks the operating system to lookup + a user or group name, the query will be resolved by asking the + NT domain controller for the specified domain to do the lookup. + Because Winbind hooks into the operating system at a low level + (via the NSS name resolution modules in the C library) this + redirection to the NT domain controller is completely + transparent.

Users on the UNIX machine can then use NT user and group + names as they would use "native" UNIX names. They can chown files + so that they are owned by NT domain users or even login to the + UNIX machine and run a UNIX X-Window session as a domain user.

The only obvious indication that Winbind is being used is + that user and group names take the form DOMAIN\user and + DOMAIN\group. This is necessary as it allows Winbind to determine + that redirection to a domain controller is wanted for a particular + lookup and which trusted domain is being referenced.

Additionally, Winbind provides an authentication service + that hooks into the Pluggable Authentication Modules (PAM) system + to provide authentication via a NT domain to any PAM enabled + applications. This capability solves the problem of synchronizing + passwords between systems since all passwords are stored in a single + location (on the domain controller).


11.3.1. Target Uses

Winbind is targeted at organizations that have an + existing NT based domain infrastructure into which they wish + to put UNIX workstations or servers. Winbind will allow these + organizations to deploy UNIX workstations without having to + maintain a separate account infrastructure. This greatly + simplifies the administrative overhead of deploying UNIX + workstations into a NT based organization.

Another interesting way in which we expect Winbind to + be used is as a central part of UNIX based appliances. Appliances + that provide file and print services to Microsoft based networks + will be able to use Winbind to provide seamless integration of + the appliance into the domain.


11.4. How Winbind Works

The winbind system is designed around a client/server + architecture. A long running winbindd daemon + listens on a UNIX domain socket waiting for requests + to arrive. These requests are generated by the NSS and PAM + clients and processed sequentially.

The technologies used to implement winbind are described + in detail below.


11.4.1. Microsoft Remote Procedure Calls

Over the last two years, efforts have been underway + by various Samba Team members to decode various aspects of + the Microsoft Remote Procedure Call (MSRPC) system. This + system is used for most network related operations between + Windows NT machines including remote management, user authentication + and print spooling. Although initially this work was done + to aid the implementation of Primary Domain Controller (PDC) + functionality in Samba, it has also yielded a body of code which + can be used for other purposes.

Winbind uses various MSRPC calls to enumerate domain users + and groups and to obtain detailed information about individual + users or groups. Other MSRPC calls can be used to authenticate + NT domain users and to change user passwords. By directly querying + a Windows PDC for user and group information, winbind maps the + NT account information onto UNIX user and group names.


11.4.2. Name Service Switch

The Name Service Switch, or NSS, is a feature that is + present in many UNIX operating systems. It allows system + information such as hostnames, mail aliases and user information + to be resolved from different sources. For example, a standalone + UNIX workstation may resolve system information from a series of + flat files stored on the local filesystem. A networked workstation + may first attempt to resolve system information from local files, + and then consult a NIS database for user information or a DNS server + for hostname information.

The NSS application programming interface allows winbind + to present itself as a source of system information when + resolving UNIX usernames and groups. Winbind uses this interface, + and information obtained from a Windows NT server using MSRPC + calls to provide a new source of account enumeration. Using standard + UNIX library calls, one can enumerate the users and groups on + a UNIX machine running winbind and see all users and groups in + a NT domain plus any trusted domain as though they were local + users and groups.

The primary control file for NSS is + /etc/nsswitch.conf. + When a UNIX application makes a request to do a lookup + the C library looks in /etc/nsswitch.conf + for a line which matches the service type being requested, for + example the "passwd" service type is used when user or group names + are looked up. This config line species which implementations + of that service should be tried and in what order. If the passwd + config line is:

passwd: files example

then the C library will first load a module called + /lib/libnss_files.so followed by + the module /lib/libnss_example.so. The + C library will dynamically load each of these modules in turn + and call resolver functions within the modules to try to resolve + the request. Once the request is resolved the C library returns the + result to the application.

This NSS interface provides a very easy way for Winbind + to hook into the operating system. All that needs to be done + is to put libnss_winbind.so in /lib/ + then add "winbind" into /etc/nsswitch.conf at + the appropriate place. The C library will then call Winbind to + resolve user and group names.


11.4.3. Pluggable Authentication Modules

Pluggable Authentication Modules, also known as PAM, + is a system for abstracting authentication and authorization + technologies. With a PAM module it is possible to specify different + authentication methods for different system applications without + having to recompile these applications. PAM is also useful + for implementing a particular policy for authorization. For example, + a system administrator may only allow console logins from users + stored in the local password file but only allow users resolved from + a NIS database to log in over the network.

Winbind uses the authentication management and password + management PAM interface to integrate Windows NT users into a + UNIX system. This allows Windows NT users to log in to a UNIX + machine and be authenticated against a suitable Primary Domain + Controller. These users can also change their passwords and have + this change take effect directly on the Primary Domain Controller. +

PAM is configured by providing control files in the directory + /etc/pam.d/ for each of the services that + require authentication. When an authentication request is made + by an application the PAM code in the C library looks up this + control file to determine what modules to load to do the + authentication check and in what order. This interface makes adding + a new authentication service for Winbind very easy, all that needs + to be done is that the pam_winbind.so module + is copied to /lib/security/ and the PAM + control files for relevant services are updated to allow + authentication via winbind. See the PAM documentation + for more details.


11.4.4. User and Group ID Allocation

When a user or group is created under Windows NT + is it allocated a numerical relative identifier (RID). This is + slightly different to UNIX which has a range of numbers that are + used to identify users, and the same range in which to identify + groups. It is winbind's job to convert RIDs to UNIX id numbers and + vice versa. When winbind is configured it is given part of the UNIX + user id space and a part of the UNIX group id space in which to + store Windows NT users and groups. If a Windows NT user is + resolved for the first time, it is allocated the next UNIX id from + the range. The same process applies for Windows NT groups. Over + time, winbind will have mapped all Windows NT users and groups + to UNIX user ids and group ids.

The results of this mapping are stored persistently in + an ID mapping database held in a tdb database). This ensures that + RIDs are mapped to UNIX IDs in a consistent way.


11.4.5. Result Caching

An active system can generate a lot of user and group + name lookups. To reduce the network cost of these lookups winbind + uses a caching scheme based on the SAM sequence number supplied + by NT domain controllers. User or group information returned + by a PDC is cached by winbind along with a sequence number also + returned by the PDC. This sequence number is incremented by + Windows NT whenever any user or group information is modified. If + a cached entry has expired, the sequence number is requested from + the PDC and compared against the sequence number of the cached entry. + If the sequence numbers do not match, then the cached information + is discarded and up to date information is requested directly + from the PDC.


11.5. Installation and Configuration

Many thanks to John Trostel jtrostel@snapserver.com +for providing the HOWTO for this section.

This HOWTO describes how to get winbind services up and running +to control access and authenticate users on your Linux box using +the winbind services which come with SAMBA 2.2.2.

There is also some Solaris specific information in +docs/textdocs/Solaris-Winbind-HOWTO.txt. +Future revisions of this document will incorporate that +information.


11.5.1. Introduction

This HOWTO describes the procedures used to get winbind up and +running on my RedHat 7.1 system. Winbind is capable of providing access +and authentication control for Windows Domain users through an NT +or Win2K PDC for 'regular' services, such as telnet a nd ftp, as +well for SAMBA services.

This HOWTO has been written from a 'RedHat-centric' perspective, so if +you are using another distribution, you may have to modify the instructions +somewhat to fit the way your distribution works.

  • Why should I to this? +

    This allows the SAMBA administrator to rely on the + authentication mechanisms on the NT/Win2K PDC for the authentication + of domain members. NT/Win2K users no longer need to have separate + accounts on the SAMBA server. +

  • Who should be reading this document? +

    This HOWTO is designed for system administrators. If you are + implementing SAMBA on a file server and wish to (fairly easily) + integrate existing NT/Win2K users from your PDC onto the + SAMBA server, this HOWTO is for you. That said, I am no NT or PAM + expert, so you may find a better or easier way to accomplish + these tasks. +


11.5.2. Requirements

If you have a samba configuration file that you are currently +using... BACK IT UP! If your system already uses PAM, +back up the /etc/pam.d directory +contents! If you haven't already made a boot disk, +MAKE ONE NOW!

Messing with the pam configuration files can make it nearly impossible +to log in to yourmachine. That's why you want to be able to boot back +into your machine in single user mode and restore your +/etc/pam.d back to the original state they were in if +you get frustrated with the way things are going. ;-)

The latest version of SAMBA (version 2.2.2 as of this writing), now +includes a functioning winbindd daemon. Please refer to the +main SAMBA web page or, +better yet, your closest SAMBA mirror site for instructions on +downloading the source code.

To allow Domain users the ability to access SAMBA shares and +files, as well as potentially other services provided by your +SAMBA machine, PAM (pluggable authentication modules) must +be setup properly on your machine. In order to compile the +winbind modules, you should have at least the pam libraries resident +on your system. For recent RedHat systems (7.1, for instance), that +means pam-0.74-22. For best results, it is helpful to also +install the development packages in pam-devel-0.74-22.


11.5.3. Testing Things Out

Before starting, it is probably best to kill off all the SAMBA +related daemons running on your server. Kill off all smbd, +nmbd, and winbindd processes that may +be running. To use PAM, you will want to make sure that you have the +standard PAM package (for RedHat) which supplies the /etc/pam.d +directory structure, including the pam modules are used by pam-aware +services, several pam libraries, and the /usr/doc +and /usr/man entries for pam. Winbind built better +in SAMBA if the pam-devel package was also installed. This package includes +the header files needed to compile pam-aware applications. For instance, +my RedHat system has both pam-0.74-22 and +pam-devel-0.74-22 RPMs installed.


11.5.3.1. Configure and compile SAMBA

The configuration and compilation of SAMBA is pretty straightforward. +The first three steps may not be necessary depending upon +whether or not you have previously built the Samba binaries.

root# autoconf
+root# make clean
+root# rm config.cache
+root# ./configure --with-winbind
+root# make
+root# make install

This will, by default, install SAMBA in /usr/local/samba. +See the main SAMBA documentation if you want to install SAMBA somewhere else. +It will also build the winbindd executable and libraries.


11.5.3.2. Configure nsswitch.conf and the +winbind libraries

The libraries needed to run the winbindd daemon +through nsswitch need to be copied to their proper locations, so

root# cp ../samba/source/nsswitch/libnss_winbind.so /lib

I also found it necessary to make the following symbolic link:

root# ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2

And, in the case of Sun solaris:

root# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1 +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1 +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2

Now, as root you need to edit /etc/nsswitch.conf to +allow user and group entries to be visible from the winbindd +daemon. My /etc/nsswitch.conf file look like +this after editing:

	passwd:     files winbind
+	shadow:     files 
+	group:      files winbind

+The libraries needed by the winbind daemon will be automatically +entered into the ldconfig cache the next time +your system reboots, but it +is faster (and you don't need to reboot) if you do it manually:

root# /sbin/ldconfig -v | grep winbind

This makes libnss_winbind available to winbindd +and echos back a check to you.


11.5.3.3. Configure smb.conf

Several parameters are needed in the smb.conf file to control +the behavior of winbindd. Configure +smb.conf These are described in more detail in +the winbindd(8) man page. My +smb.conf file was modified to +include the following entries in the [global] section:

[global]
+     <...>
+     # separate domain and username with '+', like DOMAIN+username
+     winbind separator = +
+     # use uids from 10000 to 20000 for domain users
+     winbind uid = 10000-20000
+     # use gids from 10000 to 20000 for domain groups
+     winbind gid = 10000-20000
+     # allow enumeration of winbind users and groups
+     winbind enum users = yes
+     winbind enum groups = yes
+     # give winbind users a real shell (only needed if they have telnet access)
+     template homedir = /home/winnt/%D/%U
+     template shell = /bin/bash


11.5.3.4. Join the SAMBA server to the PDC domain

Enter the following command to make the SAMBA server join the +PDC domain, where DOMAIN is the name of +your Windows domain and Administrator is +a domain user who has administrative privileges in the domain.

root# /usr/local/samba/bin/net rpc join -s PDC -U Administrator

The proper response to the command should be: "Joined the domain +DOMAIN" where DOMAIN +is your DOMAIN name.


11.5.3.5. Start up the winbindd daemon and test it!

Eventually, you will want to modify your smb startup script to +automatically invoke the winbindd daemon when the other parts of +SAMBA start, but it is possible to test out just the winbind +portion first. To start up winbind services, enter the following +command as root:

root# /usr/local/samba/bin/winbindd

I'm always paranoid and like to make sure the daemon +is really running...

root# ps -ae | grep winbindd

This command should produce output like this, if the daemon is running

3025 ? 00:00:00 winbindd

Now... for the real test, try to get some information about the +users on your PDC

root# /usr/local/samba/bin/wbinfo -u

+This should echo back a list of users on your Windows users on +your PDC. For example, I get the following response:

CEO+Administrator
+CEO+burdell
+CEO+Guest
+CEO+jt-ad
+CEO+krbtgt
+CEO+TsInternetUser

Obviously, I have named my domain 'CEO' and my winbind +separator is '+'.

You can do the same sort of thing to get group information from +the PDC:

root# /usr/local/samba/bin/wbinfo -g
+CEO+Domain Admins
+CEO+Domain Users
+CEO+Domain Guests
+CEO+Domain Computers
+CEO+Domain Controllers
+CEO+Cert Publishers
+CEO+Schema Admins
+CEO+Enterprise Admins
+CEO+Group Policy Creator Owners

The function 'getent' can now be used to get unified +lists of both local and PDC users and groups. +Try the following command:

root# getent passwd

You should get a list that looks like your /etc/passwd +list followed by the domain users with their new uids, gids, home +directories and default shells.

The same thing can be done for groups with the command

root# getent group


11.5.3.6. Fix the init.d startup scripts

11.5.3.6.1. Linux

The winbindd daemon needs to start up after the +smbd and nmbd daemons are running. +To accomplish this task, you need to modify the startup scripts of your system. They are located at /etc/init.d/smb in RedHat and +/etc/init.d/samba in Debian. +script to add commands to invoke this daemon in the proper sequence. My +startup script starts up smbd, +nmbd, and winbindd from the +/usr/local/samba/bin directory directly. The 'start' +function in the script looks like this:

start() {
+        KIND="SMB"
+        echo -n $"Starting $KIND services: "
+        daemon /usr/local/samba/bin/smbd $SMBDOPTIONS
+        RETVAL=$?
+        echo
+        KIND="NMB"
+        echo -n $"Starting $KIND services: "
+        daemon /usr/local/samba/bin/nmbd $NMBDOPTIONS
+        RETVAL2=$?
+        echo
+        KIND="Winbind"
+        echo -n $"Starting $KIND services: "
+        daemon /usr/local/samba/bin/winbindd
+        RETVAL3=$?
+        echo
+        [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && touch /var/lock/subsys/smb || \
+           RETVAL=1
+        return $RETVAL
+}

The 'stop' function has a corresponding entry to shut down the +services and look s like this:

stop() {
+        KIND="SMB"
+        echo -n $"Shutting down $KIND services: "
+        killproc smbd
+        RETVAL=$?
+        echo
+        KIND="NMB"
+        echo -n $"Shutting down $KIND services: "
+        killproc nmbd
+        RETVAL2=$?
+        echo
+        KIND="Winbind"
+        echo -n $"Shutting down $KIND services: "
+        killproc winbindd
+        RETVAL3=$?
+        [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && rm -f /var/lock/subsys/smb
+        echo ""
+        return $RETVAL
+}


11.5.3.6.2. Solaris

On solaris, you need to modify the +/etc/init.d/samba.server startup script. It usually +only starts smbd and nmbd but should now start winbindd too. If you +have samba installed in /usr/local/samba/bin, +the file could contains something like this:

##
+## samba.server
+##
+
+if [ ! -d /usr/bin ]
+then                    # /usr not mounted
+        exit
+fi
+
+killproc() {            # kill the named process(es)
+        pid=`/usr/bin/ps -e |
+             /usr/bin/grep -w $1 |
+             /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
+        [ "$pid" != "" ] && kill $pid
+}
+ 
+# Start/stop processes required for samba server
+
+case "$1" in
+
+'start')
+#
+# Edit these lines to suit your installation (paths, workgroup, host)
+#
+echo Starting SMBD
+   /usr/local/samba/bin/smbd -D -s \
+	/usr/local/samba/smb.conf
+
+echo Starting NMBD
+   /usr/local/samba/bin/nmbd -D -l \
+	/usr/local/samba/var/log -s /usr/local/samba/smb.conf
+
+echo Starting Winbind Daemon
+   /usr/local/samba/bin/winbindd
+   ;;
+
+'stop')
+   killproc nmbd
+   killproc smbd
+   killproc winbindd
+   ;;
+
+*)
+   echo "Usage: /etc/init.d/samba.server { start | stop }"
+   ;;
+esac


11.5.3.6.3. Restarting

If you restart the smbd, nmbd, +and winbindd daemons at this point, you +should be able to connect to the samba server as a domain member just as +if you were a local user.


11.5.3.7. Configure Winbind and PAM

If you have made it this far, you know that winbindd and samba are working +together. If you want to use winbind to provide authentication for other +services, keep reading. The pam configuration files need to be altered in +this step. (Did you remember to make backups of your original +/etc/pam.d files? If not, do it now.)

You will need a pam module to use winbindd with these other services. This +module will be compiled in the ../source/nsswitch directory +by invoking the command

root# make nsswitch/pam_winbind.so

from the ../source directory. The +pam_winbind.so file should be copied to the location of +your other pam security modules. On my RedHat system, this was the +/lib/security directory. On Solaris, the pam security +modules reside in /usr/lib/security.

root# cp ../samba/source/nsswitch/pam_winbind.so /lib/security


11.5.3.7.1. Linux/FreeBSD-specific PAM configuration

The /etc/pam.d/samba file does not need to be changed. I +just left this fileas it was:

auth    required        /lib/security/pam_stack.so service=system-auth
+account required        /lib/security/pam_stack.so service=system-auth

The other services that I modified to allow the use of winbind +as an authentication service were the normal login on the console (or a terminal +session), telnet logins, and ftp service. In order to enable these +services, you may first need to change the entries in +/etc/xinetd.d (or /etc/inetd.conf). +RedHat 7.1 uses the new xinetd.d structure, in this case you need +to change the lines in /etc/xinetd.d/telnet +and /etc/xinetd.d/wu-ftp from

enable = no

to

enable = yes

+For ftp services to work properly, you will also need to either +have individual directories for the domain users already present on +the server, or change the home directory template to a general +directory for all domain users. These can be easily set using +the smb.conf global entry +template homedir.

The /etc/pam.d/ftp file can be changed +to allow winbind ftp access in a manner similar to the +samba file. My /etc/pam.d/ftp file was +changed to look like this:

auth       required     /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth       sufficient   /lib/security/pam_winbind.so
+auth       required     /lib/security/pam_stack.so service=system-auth
+auth       required     /lib/security/pam_shells.so
+account    sufficient   /lib/security/pam_winbind.so
+account    required     /lib/security/pam_stack.so service=system-auth
+session    required     /lib/security/pam_stack.so service=system-auth

The /etc/pam.d/login file can be changed nearly the +same way. It now looks like this:

auth       required     /lib/security/pam_securetty.so
+auth       sufficient   /lib/security/pam_winbind.so
+auth       sufficient   /lib/security/pam_unix.so use_first_pass
+auth       required     /lib/security/pam_stack.so service=system-auth
+auth       required     /lib/security/pam_nologin.so
+account    sufficient   /lib/security/pam_winbind.so
+account    required     /lib/security/pam_stack.so service=system-auth
+password   required     /lib/security/pam_stack.so service=system-auth
+session    required     /lib/security/pam_stack.so service=system-auth
+session    optional     /lib/security/pam_console.so

In this case, I added the auth sufficient /lib/security/pam_winbind.so +lines as before, but also added the required pam_securetty.so +above it, to disallow root logins over the network. I also added a +sufficient /lib/security/pam_unix.so use_first_pass +line after the winbind.so line to get rid of annoying +double prompts for passwords.


11.5.3.7.2. Solaris-specific configuration

The /etc/pam.conf needs to be changed. I changed this file so that my Domain +users can logon both locally as well as telnet.The following are the changes +that I made.You can customize the pam.conf file as per your requirements,but +be sure of those changes because in the worst case it will leave your system +nearly impossible to boot.

#
+#ident	"@(#)pam.conf	1.14	99/09/16 SMI"
+#
+# Copyright (c) 1996-1999, Sun Microsystems, Inc.
+# All Rights Reserved.
+#
+# PAM configuration
+#
+# Authentication management
+#
+login   auth required   /usr/lib/security/pam_winbind.so
+login	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass 
+login	auth required 	/usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass 
+#
+rlogin  auth sufficient /usr/lib/security/pam_winbind.so
+rlogin  auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
+rlogin	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
+#
+dtlogin auth sufficient /usr/lib/security/pam_winbind.so
+dtlogin	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
+#
+rsh	auth required	/usr/lib/security/$ISA/pam_rhosts_auth.so.1
+other   auth sufficient /usr/lib/security/pam_winbind.so
+other	auth required	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
+#
+# Account management
+#
+login   account sufficient      /usr/lib/security/pam_winbind.so
+login	account requisite	/usr/lib/security/$ISA/pam_roles.so.1 
+login	account required	/usr/lib/security/$ISA/pam_unix.so.1 
+#
+dtlogin account sufficient      /usr/lib/security/pam_winbind.so
+dtlogin	account requisite	/usr/lib/security/$ISA/pam_roles.so.1 
+dtlogin	account required	/usr/lib/security/$ISA/pam_unix.so.1 
+#
+other   account sufficient      /usr/lib/security/pam_winbind.so
+other	account requisite	/usr/lib/security/$ISA/pam_roles.so.1 
+other	account required	/usr/lib/security/$ISA/pam_unix.so.1 
+#
+# Session management
+#
+other	session required	/usr/lib/security/$ISA/pam_unix.so.1 
+#
+# Password management
+#
+#other   password sufficient     /usr/lib/security/pam_winbind.so
+other	password required	/usr/lib/security/$ISA/pam_unix.so.1 
+dtsession auth required	/usr/lib/security/$ISA/pam_unix.so.1
+#
+# Support for Kerberos V5 authentication (uncomment to use Kerberos)
+#
+#rlogin	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
+#login	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
+#dtlogin	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
+#other	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
+#dtlogin	account optional /usr/lib/security/$ISA/pam_krb5.so.1
+#other	account optional /usr/lib/security/$ISA/pam_krb5.so.1
+#other	session optional /usr/lib/security/$ISA/pam_krb5.so.1
+#other	password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass

I also added a try_first_pass line after the winbind.so line to get rid of +annoying double prompts for passwords.

Now restart your Samba & try connecting through your application that you +configured in the pam.conf.


11.6. Limitations

Winbind has a number of limitations in its current + released version that we hope to overcome in future + releases:

  • Winbind is currently only available for + the Linux operating system, although ports to other operating + systems are certainly possible. For such ports to be feasible, + we require the C library of the target operating system to + support the Name Service Switch and Pluggable Authentication + Modules systems. This is becoming more common as NSS and + PAM gain support among UNIX vendors.

  • The mappings of Windows NT RIDs to UNIX ids + is not made algorithmically and depends on the order in which + unmapped users or groups are seen by winbind. It may be difficult + to recover the mappings of rid to UNIX id mapping if the file + containing this information is corrupted or destroyed.

  • Currently the winbind PAM module does not take + into account possible workstation and logon time restrictions + that may be been set for Windows NT users.


11.7. Conclusion

The winbind system, through the use of the Name Service + Switch, Pluggable Authentication Modules, and appropriate + Microsoft RPC calls have allowed us to provide seamless + integration of Microsoft Windows NT domain users on a + UNIX system. The result is a great reduction in the administrative + cost of running a mixed UNIX and NT network.


Chapter 12. How to Configure Samba 2.2 as a Primary Domain Controller

12.1. Prerequisite Reading

Before you continue reading in this chapter, please make sure @@ -5706,8 +8896,8 @@ CLASS="SECT1" >


8.2. Background12.2. Background


8.3. Configuring the Samba Domain Controller12.3. Configuring the Samba Domain Controller

The first step in creating a working Samba PDC is to @@ -6059,8 +9249,8 @@ CLASS="SECT1" >


8.4. Creating Machine Trust Accounts and Joining Clients to the +NAME="AEN1823" +>12.4. Creating Machine Trust Accounts and Joining Clients to the Domain


8.4.1. Manual Creation of Machine Trust Accounts12.4.1. Manual Creation of Machine Trust Accounts

The first step in manually creating a machine trust account is to @@ -6300,8 +9490,8 @@ CLASS="SECT2" >


8.4.2. "On-the-Fly" Creation of Machine Trust Accounts12.4.2. "On-the-Fly" Creation of Machine Trust Accounts

The second (and recommended) way of creating machine trust accounts is @@ -6346,8 +9536,8 @@ CLASS="SECT2" >


8.4.3. Joining the Client to the Domain12.4.3. Joining the Client to the Domain

The procedure for joining a client to the domain varies with the @@ -6406,8 +9596,8 @@ CLASS="SECT1" >


8.5. Common Problems and Errors12.5. Common Problems and Errors


8.6. System Policies and Profiles12.6. System Policies and Profiles

Much of the information necessary to implement System Policies and @@ -6762,8 +9952,8 @@ CLASS="SECT1" >


8.7. What other help can I get?12.7. What other help can I get?

There are many sources of information available in the form @@ -7158,8 +10348,8 @@ CLASS="SECT1" >


8.8. Domain Control for Windows 9x/ME12.8. Domain Control for Windows 9x/ME


8.8.1. Configuration Instructions: Network Logons12.8.1. Configuration Instructions: Network Logons

The main difference between a PDC and a Windows 9x logon @@ -7366,8 +10556,8 @@ CLASS="SECT2" >


8.8.2. Configuration Instructions: Setting up Roaming User Profiles12.8.2. Configuration Instructions: Setting up Roaming User Profiles


8.8.2.1. Windows NT Configuration12.8.2.1. Windows NT Configuration

To support WinNT clients, in the [global] section of smb.conf set the @@ -7457,8 +10647,8 @@ CLASS="SECT3" >


8.8.2.2. Windows 9X Configuration12.8.2.2. Windows 9X Configuration

To support Win9X clients, you must use the "logon home" parameter. Samba has @@ -7497,8 +10687,8 @@ CLASS="SECT3" >


8.8.2.3. Win9X and WinNT Configuration12.8.2.3. Win9X and WinNT Configuration

You can support profiles for both Win9X and WinNT clients by setting both the @@ -7535,8 +10725,8 @@ CLASS="SECT3" >


8.8.2.4. Windows 9X Profile Setup12.8.2.4. Windows 9X Profile Setup

When a user first logs in on Windows 9X, the file user.DAT is created, @@ -7691,8 +10881,8 @@ CLASS="SECT3" >


8.8.2.5. Windows NT Workstation 4.012.8.2.5. Windows NT Workstation 4.0

When a user first logs in to a Windows NT Workstation, the profile @@ -7773,8 +10963,8 @@ CLASS="SECT3" >


8.8.2.6. Windows NT Server12.8.2.6. Windows NT Server

There is nothing to stop you specifying any path that you like for the @@ -7787,8 +10977,8 @@ CLASS="SECT3" >


8.8.2.7. Sharing Profiles between W95 and NT Workstation 4.012.8.2.7. Sharing Profiles between W95 and NT Workstation 4.0

The default logon path is \\%N\U%. NT Workstation will attempt to create +>The default logon path is \\%N\%U. NT Workstation will attempt to create a directory "\\samba-server\username.PDS" if you specify the logon path as "\\samba-server\username" with the NT User Manager. Therefore, you will need to specify (for example) "\\samba-server\username\profile". @@ -7852,8 +11042,8 @@ CLASS="SECT1" >


8.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba12.9. DOMAIN_CONTROL.txt : Windows NT Domain Control & Samba


Chapter 9. How to Act as a Backup Domain Controller in a Purely Samba Controlled DomainChapter 13. How to Act as a Backup Domain Controller in a Purely Samba Controlled Domain

9.1. Prerequisite Reading13.1. Prerequisite Reading

Before you continue reading in this chapter, please make sure @@ -7998,8 +11188,8 @@ CLASS="SECT1" >


9.2. Background13.2. Background

What is a Domain Controller? It is a machine that is able to answer @@ -8052,8 +11242,8 @@ CLASS="SECT1" >


9.3. What qualifies a Domain Controller on the network?13.3. What qualifies a Domain Controller on the network?

Every machine that is a Domain Controller for the domain SAMBA has to @@ -8069,8 +11259,8 @@ CLASS="SECT2" >


9.3.1. How does a Workstation find its domain controller?13.3.1. How does a Workstation find its domain controller?

A NT workstation in the domain SAMBA that wants a local user to be @@ -8088,8 +11278,8 @@ CLASS="SECT2" >


9.3.2. When is the PDC needed?13.3.2. When is the PDC needed?

Whenever a user wants to change his password, this has to be done on @@ -8104,8 +11294,8 @@ CLASS="SECT1" >


9.4. Can Samba be a Backup Domain Controller?13.4. Can Samba be a Backup Domain Controller?

With version 2.2, no. The native NT SAM replication protocols have @@ -8123,8 +11313,8 @@ CLASS="SECT1" >


9.5. How do I set up a Samba BDC?13.5. How do I set up a Samba BDC?

Several things have to be done:


9.5.1. How do I replicate the smbpasswd file?13.5.1. How do I replicate the smbpasswd file?

Replication of the smbpasswd file is sensitive. It has to be done @@ -8216,15 +11406,15 @@ CLASS="CHAPTER" >


Chapter 10. Storing Samba's User/Machine Account information in an LDAP DirectoryChapter 14. Storing Samba's User/Machine Account information in an LDAP Directory

10.1. Purpose14.1. Purpose

This document describes how to use an LDAP directory for storing Samba user @@ -8291,8 +11481,8 @@ CLASS="SECT1" >


10.2. Introduction14.2. Introduction

Traditionally, when configuring


10.3. Supported LDAP Servers14.3. Supported LDAP Servers

The LDAP samdb code in 2.2.3 has been developed and tested using the OpenLDAP @@ -8433,8 +11623,8 @@ CLASS="SECT1" >


10.4. Schema and Relationship to the RFC 2307 posixAccount14.4. Schema and Relationship to the RFC 2307 posixAccount

Samba 2.2.3 includes the necessary schema file for OpenLDAP 2.0 in @@ -8501,16 +11691,16 @@ CLASS="SECT1" >


10.5. Configuring Samba with LDAP14.5. Configuring Samba with LDAP

10.5.1. OpenLDAP configuration14.5.1. OpenLDAP configuration

To include support for the sambaAccount object in an OpenLDAP directory @@ -8609,8 +11799,8 @@ CLASS="SECT2" >


10.5.2. Configuring Samba14.5.2. Configuring Samba

The following parameters are available in smb.conf only with


10.6. Accounts and Groups management14.6. Accounts and Groups management

As users accounts are managed thru the sambaAccount objectclass, you should @@ -8763,8 +11953,8 @@ CLASS="SECT1" >


10.7. Security and sambaAccount14.7. Security and sambaAccount

There are two important points to remember when discussing the security @@ -8843,8 +12033,8 @@ CLASS="SECT1" >


10.8. LDAP specials attributes for sambaAccounts14.8. LDAP specials attributes for sambaAccounts

The sambaAccount objectclass is composed of the following attributes:


10.9. Example LDIF Entries for a sambaAccount14.9. Example LDIF Entries for a sambaAccount

The following is a working LDIF with the inclusion of the posixAccount objectclass:


10.10. Comments14.10. Comments

Please mail all comments regarding this HOWTO to


Chapter 11. Unified Logons between Windows NT and UNIX using WinbindChapter 15. Improved browsing in samba

11.1. Abstract15.1. Overview of browsing

Integration of UNIX and Microsoft Windows NT through - a unified logon has been considered a "holy grail" in heterogeneous - computing environments for a long time. We present - winbind, a component of the Samba suite - of programs as a solution to the unified logon problem. Winbind - uses a UNIX implementation - of Microsoft RPC calls, Pluggable Authentication Modules, and the Name - Service Switch to allow Windows NT domain users to appear and operate - as UNIX users on a UNIX machine. This paper describes the winbind - system, explaining the functionality it provides, how it is configured, - and how it works internally.

SMB networking provides a mechanism by which clients can access a list +of machines in a network, a so-called "browse list". This list +contains machines that are ready to offer file and/or print services +to other machines within the network. Thus it does not include +machines which aren't currently able to do server tasks. The browse +list is heavily used by all SMB clients. Configuration of SMB +browsing has been problematic for some Samba users, hence this +document.

Browsing will NOT work if name resolution from NetBIOS names to IP +addresses does not function correctly. Use of a WINS server is highly +recommended to aid the resolution of NetBIOS (SMB) names to IP addresses. +WINS allows remote segment clients to obtain NetBIOS name_type information +that can NOT be provided by any other means of name resolution.


11.2. Introduction15.2. Browsing support in samba

It is well known that UNIX and Microsoft Windows NT have - different models for representing user and group information and - use different technologies for implementing them. This fact has - made it difficult to integrate the two systems in a satisfactory - manner.

Samba now fully supports browsing. The browsing is supported by nmbd +and is also controlled by options in the smb.conf file (see smb.conf(5)).

One common solution in use today has been to create - identically named user accounts on both the UNIX and Windows systems - and use the Samba suite of programs to provide file and print services - between the two. This solution is far from perfect however, as - adding and deleting users on both sets of machines becomes a chore - and two sets of passwords are required both of which - can lead to synchronization problems between the UNIX and Windows - systems and confusion for users.

Samba can act as a local browse master for a workgroup and the ability +for samba to support domain logons and scripts is now available. See +DOMAIN.txt for more information on domain logons.

We divide the unified logon problem for UNIX machines into - three smaller problems:

Samba can also act as a domain master browser for a workgroup. This +means that it will collate lists from local browse masters into a +wide area network server list. In order for browse clients to +resolve the names they may find in this list, it is recommended that +both samba and your clients use a WINS server.

Note that you should NOT set Samba to be the domain master for a +workgroup that has the same name as an NT Domain: on each wide area +network, you must only ever have one domain master browser per workgroup, +regardless of whether it is NT, Samba or any other type of domain master +that is providing this service.

[Note that nmbd can be configured as a WINS server, but it is not +necessary to specifically use samba as your WINS server. NTAS can +be configured as your WINS server. In a mixed NT server and +samba environment on a Wide Area Network, it is recommended that +you use the NT server's WINS server capabilities. In a samba-only +environment, it is recommended that you use one and only one nmbd +as your WINS server].

To get browsing to work you need to run nmbd as usual, but will need +to use the "workgroup" option in smb.conf to control what workgroup +Samba becomes a part of.

Samba also has a useful option for a Samba server to offer itself for +browsing on another subnet. It is recommended that this option is only +used for 'unusual' purposes: announcements over the internet, for +example. See "remote announce" in the smb.conf man page.


15.3. Problem resolution

If something doesn't work then hopefully the log.nmb file will help +you track down the problem. Try a debug level of 2 or 3 for finding +problems. Also note that the current browse list usually gets stored +in text form in a file called browse.dat.

Note that if it doesn't work for you, then you should still be able to +type the server name as \\SERVER in filemanager then hit enter and +filemanager should display the list of available shares.

Some people find browsing fails because they don't have the global +"guest account" set to a valid account. Remember that the IPC$ +connection that lists the shares is done as guest, and thus you must +have a valid guest account.

Also, a lot of people are getting bitten by the problem of too many +parameters on the command line of nmbd in inetd.conf. This trick is to +not use spaces between the option and the parameter (eg: -d2 instead +of -d 2), and to not use the -B and -N options. New versions of nmbd +are now far more likely to correctly find your broadcast and network +address, so in most cases these aren't needed.

The other big problem people have is that their broadcast address, +netmask or IP address is wrong (specified with the "interfaces" option +in smb.conf)


15.4. Browsing across subnets

With the release of Samba 1.9.17(alpha1 and above) Samba has been +updated to enable it to support the replication of browse lists +across subnet boundaries. New code and options have been added to +achieve this. This section describes how to set this feature up +in different settings.

To see browse lists that span TCP/IP subnets (ie. networks separated +by routers that don't pass broadcast traffic) you must set up at least +one WINS server. The WINS server acts as a DNS for NetBIOS names, allowing +NetBIOS name to IP address translation to be done by doing a direct +query of the WINS server. This is done via a directed UDP packet on +port 137 to the WINS server machine. The reason for a WINS server is +that by default, all NetBIOS name to IP address translation is done +by broadcasts from the querying machine. This means that machines +on one subnet will not be able to resolve the names of machines on +another subnet without using a WINS server.

Remember, for browsing across subnets to work correctly, all machines, +be they Windows 95, Windows NT, or Samba servers must have the IP address +of a WINS server given to them by a DHCP server, or by manual configuration +(for Win95 and WinNT, this is in the TCP/IP Properties, under Network +settings) for Samba this is in the smb.conf file.


15.4.1. How does cross subnet browsing work ?

Cross subnet browsing is a complicated dance, containing multiple +moving parts. It has taken Microsoft several years to get the code +that achieves this correct, and Samba lags behind in some areas. +However, with the 1.9.17 release, Samba is capable of cross subnet +browsing when configured correctly.

Consider a network set up as follows :

                                   (DMB)
+             N1_A      N1_B        N1_C       N1_D        N1_E
+              |          |           |          |           |
+          -------------------------------------------------------
+            |          subnet 1                       |
+          +---+                                      +---+
+          |R1 | Router 1                  Router 2   |R2 |
+          +---+                                      +---+
+            |                                          |
+            |  subnet 2              subnet 3          |
+  --------------------------       ------------------------------------
+  |     |     |      |               |        |         |           |
+ N2_A  N2_B  N2_C   N2_D           N3_A     N3_B      N3_C        N3_D 
+                    (WINS)

Consisting of 3 subnets (1, 2, 3) connected by two routers +(R1, R2) - these do not pass broadcasts. Subnet 1 has 5 machines +on it, subnet 2 has 4 machines, subnet 3 has 4 machines. Assume +for the moment that all these machines are configured to be in the +same workgroup (for simplicities sake). Machine N1_C on subnet 1 +is configured as Domain Master Browser (ie. it will collate the +browse lists for the workgroup). Machine N2_D is configured as +WINS server and all the other machines are configured to register +their NetBIOS names with it.

As all these machines are booted up, elections for master browsers +will take place on each of the three subnets. Assume that machine +N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on +subnet 3 - these machines are known as local master browsers for +their particular subnet. N1_C has an advantage in winning as the +local master browser on subnet 1 as it is set up as Domain Master +Browser.

On each of the three networks, machines that are configured to +offer sharing services will broadcast that they are offering +these services. The local master browser on each subnet will +receive these broadcasts and keep a record of the fact that +the machine is offering a service. This list of records is +the basis of the browse list. For this case, assume that +all the machines are configured to offer services so all machines +will be on the browse list.

For each network, the local master browser on that network is +considered 'authoritative' for all the names it receives via +local broadcast. This is because a machine seen by the local +master browser via a local broadcast must be on the same +network as the local master browser and thus is a 'trusted' +and 'verifiable' resource. Machines on other networks that +the local master browsers learn about when collating their +browse lists have not been directly seen - these records are +called 'non-authoritative'.

At this point the browse lists look as follows (these are +the machines you would see in your network neighborhood if +you looked in it on a particular network right now).

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D

Note that at this point all the subnets are separate, no +machine is seen across any of the subnets.

Now examine subnet 2. As soon as N2_B has become the local +master browser it looks for a Domain master browser to synchronize +its browse list with. It does this by querying the WINS server +(N2_D) for the IP address associated with the NetBIOS name +WORKGROUP>1B<. This name was registerd by the Domain master +browser (N1_C) with the WINS server as soon as it was booted.

Once N2_B knows the address of the Domain master browser it +tells it that is the local master browser for subnet 2 by +sending a MasterAnnouncement packet as a UDP port 138 packet. +It then synchronizes with it by doing a NetServerEnum2 call. This +tells the Domain Master Browser to send it all the server +names it knows about. Once the domain master browser receives +the MasterAnnouncement packet it schedules a synchronization +request to the sender of that packet. After both synchronizations +are done the browse lists look like :

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
+
+Servers with a (*) after them are non-authoritative names.

At this point users looking in their network neighborhood on +subnets 1 or 2 will see all the servers on both, users on +subnet 3 will still only see the servers on their own subnet.

The same sequence of events that occured for N2_B now occurs +for the local master browser on subnet 3 (N3_D). When it +synchronizes browse lists with the domain master browser (N1_A) +it gets both the server entries on subnet 1, and those on +subnet 2. After N3_D has synchronized with N1_C and vica-versa +the browse lists look like.

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*),
+                                 N3_A(*), N3_B(*), N3_C(*), N3_D(*)
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+
+Servers with a (*) after them are non-authoritative names.

At this point users looking in their network neighborhood on +subnets 1 or 3 will see all the servers on all sunbets, users on +subnet 2 will still only see the servers on subnets 1 and 2, but not 3.

Finally, the local master browser for subnet 2 (N2_B) will sync again +with the domain master browser (N1_C) and will recieve the missing +server entries. Finally - and as a steady state (if no machines +are removed or shut off) the browse lists will look like :

Subnet           Browse Master   List
+------           -------------   ----
+Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*),
+                                 N3_A(*), N3_B(*), N3_C(*), N3_D(*)
+
+Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
+                                 N3_A(*), N3_B(*), N3_C(*), N3_D(*)
+
+Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
+                                 N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
+                                 N2_A(*), N2_B(*), N2_C(*), N2_D(*)
+	
+Servers with a (*) after them are non-authoritative names.

Synchronizations between the domain master browser and local +master browsers will continue to occur, but this should be a +steady state situation.

If either router R1 or R2 fails the following will occur:

    1. Obtaining Windows NT user and group information -

      Names of computers on each side of the inaccessible network fragments + will be maintained for as long as 36 minutes, in the network neighbourhood + lists. +

    2. Authenticating Windows NT users -

      Attempts to connect to these inaccessible computers will fail, but the + names will not be removed from the network neighbourhood lists. +

    3. Password changing for Windows NT users -

      If one of the fragments is cut off from the WINS server, it will only + be able to access servers on its local subnet, by using subnet-isolated + broadcast NetBIOS name resolution. The effects are similar to that of + losing access to a DNS server. +

Ideally, a prospective solution to the unified logon problem - would satisfy all the above components without duplication of - information on the UNIX machines and without creating additional - tasks for the system administrator when maintaining users and - groups on either system. The winbind system provides a simple - and elegant solution to all three components of the unified logon - problem.


11.3. What Winbind Provides

Winbind unifies UNIX and Windows NT account management by - allowing a UNIX box to become a full member of a NT domain. Once - this is done the UNIX box will see NT users and groups as if - they were native UNIX users and groups, allowing the NT domain - to be used in much the same manner that NIS+ is used within - UNIX-only environments.

The end result is that whenever any - program on the UNIX machine asks the operating system to lookup - a user or group name, the query will be resolved by asking the - NT domain controller for the specified domain to do the lookup. - Because Winbind hooks into the operating system at a low level - (via the NSS name resolution modules in the C library) this - redirection to the NT domain controller is completely - transparent.

Users on the UNIX machine can then use NT user and group - names as they would use "native" UNIX names. They can chown files - so that they are owned by NT domain users or even login to the - UNIX machine and run a UNIX X-Window session as a domain user.

The only obvious indication that Winbind is being used is - that user and group names take the form DOMAIN\user and - DOMAIN\group. This is necessary as it allows Winbind to determine - that redirection to a domain controller is wanted for a particular - lookup and which trusted domain is being referenced.

Additionally, Winbind provides an authentication service - that hooks into the Pluggable Authentication Modules (PAM) system - to provide authentication via a NT domain to any PAM enabled - applications. This capability solves the problem of synchronizing - passwords between systems since all passwords are stored in a single - location (on the domain controller).


11.3.1. Target Uses

Winbind is targeted at organizations that have an - existing NT based domain infrastructure into which they wish - to put UNIX workstations or servers. Winbind will allow these - organizations to deploy UNIX workstations without having to - maintain a separate account infrastructure. This greatly - simplifies the administrative overhead of deploying UNIX - workstations into a NT based organization.

Another interesting way in which we expect Winbind to - be used is as a central part of UNIX based appliances. Appliances - that provide file and print services to Microsoft based networks - will be able to use Winbind to provide seamless integration of - the appliance into the domain.


11.4. How Winbind Works15.5. Setting up a WINS server

The winbind system is designed around a client/server - architecture. A long running winbindd daemon - listens on a UNIX domain socket waiting for requests - to arrive. These requests are generated by the NSS and PAM - clients and processed sequentially.

The technologies used to implement winbind are described - in detail below.


11.4.1. Microsoft Remote Procedure Calls

Over the last two years, efforts have been underway - by various Samba Team members to decode various aspects of - the Microsoft Remote Procedure Call (MSRPC) system. This - system is used for most network related operations between - Windows NT machines including remote management, user authentication - and print spooling. Although initially this work was done - to aid the implementation of Primary Domain Controller (PDC) - functionality in Samba, it has also yielded a body of code which - can be used for other purposes.

Winbind uses various MSRPC calls to enumerate domain users - and groups and to obtain detailed information about individual - users or groups. Other MSRPC calls can be used to authenticate - NT domain users and to change user passwords. By directly querying - a Windows PDC for user and group information, winbind maps the - NT account information onto UNIX user and group names.


11.4.2. Name Service Switch

The Name Service Switch, or NSS, is a feature that is - present in many UNIX operating systems. It allows system - information such as hostnames, mail aliases and user information - to be resolved from different sources. For example, a standalone - UNIX workstation may resolve system information from a series of - flat files stored on the local filesystem. A networked workstation - may first attempt to resolve system information from local files, - and then consult a NIS database for user information or a DNS server - for hostname information.

The NSS application programming interface allows winbind - to present itself as a source of system information when - resolving UNIX usernames and groups. Winbind uses this interface, - and information obtained from a Windows NT server using MSRPC - calls to provide a new source of account enumeration. Using standard - UNIX library calls, one can enumerate the users and groups on - a UNIX machine running winbind and see all users and groups in - a NT domain plus any trusted domain as though they were local - users and groups.

The primary control file for NSS is - /etc/nsswitch.conf. - When a UNIX application makes a request to do a lookup - the C library looks in /etc/nsswitch.conf - for a line which matches the service type being requested, for - example the "passwd" service type is used when user or group names - are looked up. This config line species which implementations - of that service should be tried and in what order. If the passwd - config line is:

Either a Samba machine or a Windows NT Server machine may be set up +as a WINS server. To set a Samba machine to be a WINS server you must +add the following option to the smb.conf file on the selected machine : +in the [globals] section add the line

passwd: files example wins support = yes

then the C library will first load a module called - /lib/libnss_files.so followed by - the module /lib/libnss_example.so. The - C library will dynamically load each of these modules in turn - and call resolver functions within the modules to try to resolve - the request. Once the request is resolved the C library returns the - result to the application.

Versions of Samba previous to 1.9.17 had this parameter default to +yes. If you have any older versions of Samba on your network it is +strongly suggested you upgrade to 1.9.17 or above, or at the very +least set the parameter to 'no' on all these machines.

This NSS interface provides a very easy way for Winbind - to hook into the operating system. All that needs to be done - is to put libnss_winbind.so in /lib/ - then add "winbind" into /etc/nsswitch.conf at - the appropriate place. The C library will then call Winbind to - resolve user and group names.

Machines with "wins support = yes" will keep a list of +all NetBIOS names registered with them, acting as a DNS for NetBIOS names.

You should set up only ONE wins server. Do NOT set the +"wins support = yes" option on more than one Samba +server.

To set up a Windows NT Server as a WINS server you need to set up +the WINS service - see your NT documentation for details. Note that +Windows NT WINS Servers can replicate to each other, allowing more +than one to be set up in a complex subnet environment. As Microsoft +refuse to document these replication protocols Samba cannot currently +participate in these replications. It is possible in the future that +a Samba->Samba WINS replication protocol may be defined, in which +case more than one Samba machine could be set up as a WINS server +but currently only one Samba server should have the "wins support = yes" +parameter set.

After the WINS server has been configured you must ensure that all +machines participating on the network are configured with the address +of this WINS server. If your WINS server is a Samba machine, fill in +the Samba machine IP address in the "Primary WINS Server" field of +the "Control Panel->Network->Protocols->TCP->WINS Server" dialogs +in Windows 95 or Windows NT. To tell a Samba server the IP address +of the WINS server add the following line to the [global] section of +all smb.conf files :

wins server = >name or IP address<

where >name or IP address< is either the DNS name of the WINS server +machine or its IP address.

Note that this line MUST NOT BE SET in the smb.conf file of the Samba +server acting as the WINS server itself. If you set both the +"wins support = yes" option and the +"wins server = >name<" option then +nmbd will fail to start.

There are two possible scenarios for setting up cross subnet browsing. +The first details setting up cross subnet browsing on a network containing +Windows 95, Samba and Windows NT machines that are not configured as +part of a Windows NT Domain. The second details setting up cross subnet +browsing on networks that contain NT Domains.


15.6. Setting up Browsing in a WORKGROUP

To set up cross subnet browsing on a network containing machines +in up to be in a WORKGROUP, not an NT Domain you need to set up one +Samba server to be the Domain Master Browser (note that this is *NOT* +the same as a Primary Domain Controller, although in an NT Domain the +same machine plays both roles). The role of a Domain master browser is +to collate the browse lists from local master browsers on all the +subnets that have a machine participating in the workgroup. Without +one machine configured as a domain master browser each subnet would +be an isolated workgroup, unable to see any machines on any other +subnet. It is the presense of a domain master browser that makes +cross subnet browsing possible for a workgroup.

In an WORKGROUP environment the domain master browser must be a +Samba server, and there must only be one domain master browser per +workgroup name. To set up a Samba server as a domain master browser, +set the following option in the [global] section of the smb.conf file :

domain master = yes

The domain master browser should also preferrably be the local master +browser for its own subnet. In order to achieve this set the following +options in the [global] section of the smb.conf file :

        domain master = yes
+        local master = yes
+        preferred master = yes
+        os level = 65

The domain master browser may be the same machine as the WINS +server, if you require.

Next, you should ensure that each of the subnets contains a +machine that can act as a local master browser for the +workgroup. Any NT machine should be able to do this, as will +Windows 95 machines (although these tend to get rebooted more +often, so it's not such a good idea to use these). To make a +Samba server a local master browser set the following +options in the [global] section of the smb.conf file :

        domain master = no
+        local master = yes
+        preferred master = yes
+        os level = 65

Do not do this for more than one Samba server on each subnet, +or they will war with each other over which is to be the local +master browser.

The "local master" parameter allows Samba to act as a local master +browser. The "preferred master" causes nmbd to force a browser +election on startup and the "os level" parameter sets Samba high +enough so that it should win any browser elections.

If you have an NT machine on the subnet that you wish to +be the local master browser then you can disable Samba from +becoming a local master browser by setting the following +options in the [global] section of the smb.conf file :

        domain master = no
+        local master = no
+        preferred master = no
+        os level = 0


15.7. Setting up Browsing in a DOMAIN

If you are adding Samba servers to a Windows NT Domain then +you must not set up a Samba server as a domain master browser. +By default, a Windows NT Primary Domain Controller for a Domain +name is also the Domain master browser for that name, and many +things will break if a Samba server registers the Domain master +browser NetBIOS name (DOMAIN>1B<) with WINS instead of the PDC.

For subnets other than the one containing the Windows NT PDC +you may set up Samba servers as local master browsers as +described. To make a Samba server a local master browser set +the following options in the [global] section of the smb.conf +file :

        domain master = no
+        local master = yes
+        preferred master = yes
+        os level = 65

If you wish to have a Samba server fight the election with machines +on the same subnet you may set the "os level" parameter to lower +levels. By doing this you can tune the order of machines that +will become local master browsers if they are running. For +more details on this see the section "FORCING SAMBA TO BE THE MASTER" +below.

If you have Windows NT machines that are members of the domain +on all subnets, and you are sure they will always be running then +you can disable Samba from taking part in browser elections and +ever becoming a local master browser by setting following options +in the [global] section of the smb.conf file :

domain master = no + local master = no + preferred master = no + os level = 0


15.8. Forcing samba to be the master

Who becomes the "master browser" is determined by an election process +using broadcasts. Each election packet contains a number of parameters +which determine what precedence (bias) a host should have in the +election. By default Samba uses a very low precedence and thus loses +elections to just about anyone else.

If you want Samba to win elections then just set the "os level" global +option in smb.conf to a higher number. It defaults to 0. Using 34 +would make it win all elections over every other system (except other +samba systems!)

A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A +NTAS domain controller uses level 32.

The maximum os level is 255

If you want samba to force an election on startup, then set the +"preferred master" global option in smb.conf to "yes". Samba will +then have a slight advantage over other potential master browsers +that are not preferred master browsers. Use this parameter with +care, as if you have two hosts (whether they are windows 95 or NT or +samba) on the same local subnet both set with "preferred master" to +"yes", then periodically and continually they will force an election +in order to become the local master browser.

If you want samba to be a "domain master browser", then it is +recommended that you also set "preferred master" to "yes", because +samba will not become a domain master browser for the whole of your +LAN or WAN if it is not also a local master browser on its own +broadcast isolated subnet.

It is possible to configure two samba servers to attempt to become +the domain master browser for a domain. The first server that comes +up will be the domain master browser. All other samba servers will +attempt to become the domain master browser every 5 minutes. They +will find that another samba server is already the domain master +browser and will fail. This provides automatic redundancy, should +the current domain master browser fail.


15.9. Making samba the domain master

The domain master is responsible for collating the browse lists of +multiple subnets so that browsing can occur between subnets. You can +make samba act as the domain master by setting "domain master = yes" +in smb.conf. By default it will not be a domain master.

Note that you should NOT set Samba to be the domain master for a +workgroup that has the same name as an NT Domain.

When samba is the domain master and the master browser it will listen +for master announcements (made roughly every twelve minutes) from local +master browsers on other subnets and then contact them to synchronise +browse lists.

If you want samba to be the domain master then I suggest you also set +the "os level" high enough to make sure it wins elections, and set +"preferred master" to "yes", to get samba to force an election on +startup.

Note that all your servers (including samba) and clients should be +using a WINS server to resolve NetBIOS names. If your clients are only +using broadcasting to resolve NetBIOS names, then two things will occur:

  1. your local master browsers will be unable to find a domain master + browser, as it will only be looking on the local subnet. +

  2. if a client happens to get hold of a domain-wide browse list, and + a user attempts to access a host in that list, it will be unable to + resolve the NetBIOS name of that host. +

If, however, both samba and your clients are using a WINS server, then:

  1. your local master browsers will contact the WINS server and, as long as + samba has registered that it is a domain master browser with the WINS + server, your local master browser will receive samba's ip address + as its domain master browser. +

  2. when a client receives a domain-wide browse list, and a user attempts + to access a host in that list, it will contact the WINS server to + resolve the NetBIOS name of that host. as long as that host has + registered its NetBIOS name with the same WINS server, the user will + be able to see that host. +


15.10. Note about broadcast addresses

If your network uses a "0" based broadcast address (for example if it +ends in a 0) then you will strike problems. Windows for Workgroups +does not seem to support a 0's broadcast and you will probably find +that browsing and name lookups won't work.


15.11. Multiple interfaces

Samba now supports machines with multiple network interfaces. If you +have multiple interfaces then you will need to use the "interfaces" +option in smb.conf to configure them. See smb.conf(5) for details.


Chapter 16. Samba performance issues

16.1. Comparisons

The Samba server uses TCP to talk to the client. Thus if you are +trying to see if it performs well you should really compare it to +programs that use the same protocol. The most readily available +programs for file transfer that use TCP are ftp or another TCP based +SMB server.

If you want to test against something like a NT or WfWg server then +you will have to disable all but TCP on either the client or +server. Otherwise you may well be using a totally different protocol +(such as Netbeui) and comparisons may not be valid.

Generally you should find that Samba performs similarly to ftp at raw +transfer speed. It should perform quite a bit faster than NFS, +although this very much depends on your system.

Several people have done comparisons between Samba and Novell, NFS or +WinNT. In some cases Samba performed the best, in others the worst. I +suspect the biggest factor is not Samba vs some other system but the +hardware and drivers used on the various systems. Given similar +hardware Samba should certainly be competitive in speed with other +systems.


16.2. Oplocks

16.2.1. Overview

Oplocks are the way that SMB clients get permission from a server to +locally cache file operations. If a server grants an oplock +(opportunistic lock) then the client is free to assume that it is the +only one accessing the file and it will agressively cache file +data. With some oplock types the client may even cache file open/close +operations. This can give enormous performance benefits.

With the release of Samba 1.9.18 we now correctly support opportunistic +locks. This is turned on by default, and can be turned off on a share- +by-share basis by setting the parameter :

oplocks = False

We recommend that you leave oplocks on however, as current benchmark +tests with NetBench seem to give approximately a 30% improvement in +speed with them on. This is on average however, and the actual +improvement seen can be orders of magnitude greater, depending on +what the client redirector is doing.

Previous to Samba 1.9.18 there was a 'fake oplocks' option. This +option has been left in the code for backwards compatibility reasons +but it's use is now deprecated. A short summary of what the old +code did follows.


11.4.3. Pluggable Authentication Modules16.2.2. Level2 Oplocks

Pluggable Authentication Modules, also known as PAM, - is a system for abstracting authentication and authorization - technologies. With a PAM module it is possible to specify different - authentication methods for different system applications without - having to recompile these applications. PAM is also useful - for implementing a particular policy for authorization. For example, - a system administrator may only allow console logins from users - stored in the local password file but only allow users resolved from - a NIS database to log in over the network.

With Samba 2.0.5 a new capability - level2 (read only) oplocks is +supported (although the option is off by default - see the smb.conf +man page for details). Turning on level2 oplocks (on a share-by-share basis) +by setting the parameter :

Winbind uses the authentication management and password - management PAM interface to integrate Windows NT users into a - UNIX system. This allows Windows NT users to log in to a UNIX - machine and be authenticated against a suitable Primary Domain - Controller. These users can also change their passwords and have - this change take effect directly on the Primary Domain Controller. -

level2 oplocks = true

PAM is configured by providing control files in the directory - /etc/pam.d/ for each of the services that - require authentication. When an authentication request is made - by an application the PAM code in the C library looks up this - control file to determine what modules to load to do the - authentication check and in what order. This interface makes adding - a new authentication service for Winbind very easy, all that needs - to be done is that the pam_winbind.so module - is copied to /lib/security/ and the PAM - control files for relevant services are updated to allow - authentication via winbind. See the PAM documentation - for more details.

should speed concurrent access to files that are not commonly written +to, such as application serving shares (ie. shares that contain common +.EXE files - such as a Microsoft Office share) as it allows clients to +read-ahread cache copies of these files.


11.4.4. User and Group ID Allocation16.2.3. Old 'fake oplocks' option - deprecated

When a user or group is created under Windows NT - is it allocated a numerical relative identifier (RID). This is - slightly different to UNIX which has a range of numbers that are - used to identify users, and the same range in which to identify - groups. It is winbind's job to convert RIDs to UNIX id numbers and - vice versa. When winbind is configured it is given part of the UNIX - user id space and a part of the UNIX group id space in which to - store Windows NT users and groups. If a Windows NT user is - resolved for the first time, it is allocated the next UNIX id from - the range. The same process applies for Windows NT groups. Over - time, winbind will have mapped all Windows NT users and groups - to UNIX user ids and group ids.

Samba can also fake oplocks, by granting a oplock whenever a client +asks for one. This is controlled using the smb.conf option "fake +oplocks". If you set "fake oplocks = yes" then you are telling the +client that it may agressively cache the file data for all opens.

The results of this mapping are stored persistently in - an ID mapping database held in a tdb database). This ensures that - RIDs are mapped to UNIX IDs in a consistent way.


11.4.5. Result Caching

An active system can generate a lot of user and group - name lookups. To reduce the network cost of these lookups winbind - uses a caching scheme based on the SAM sequence number supplied - by NT domain controllers. User or group information returned - by a PDC is cached by winbind along with a sequence number also - returned by the PDC. This sequence number is incremented by - Windows NT whenever any user or group information is modified. If - a cached entry has expired, the sequence number is requested from - the PDC and compared against the sequence number of the cached entry. - If the sequence numbers do not match, then the cached information - is discarded and up to date information is requested directly - from the PDC.

Enabling 'fake oplocks' on all read-only shares or shares that you know +will only be accessed from one client at a time you will see a big +performance improvement on many operations. If you enable this option +on shares where multiple clients may be accessing the files read-write +at the same time you can get data corruption.


11.5. Installation and Configuration16.3. Socket options

Many thanks to John Trostel jtrostel@snapserver.com -for providing the HOWTO for this section.

There are a number of socket options that can greatly affect the +performance of a TCP based server like Samba.

This HOWTO describes how to get winbind services up and running -to control access and authenticate users on your Linux box using -the winbind services which come with SAMBA 2.2.2.

The socket options that Samba uses are settable both on the command +line with the -O option, or in the smb.conf file.

There is also some Solaris specific information in -docs/textdocs/Solaris-Winbind-HOWTO.txt. -Future revisions of this document will incorporate that -information.


11.5.1. Introduction

The "socket options" section of the smb.conf manual page describes how +to set these and gives recommendations.

This HOWTO describes the procedures used to get winbind up and -running on my RedHat 7.1 system. Winbind is capable of providing access -and authentication control for Windows Domain users through an NT -or Win2K PDC for 'regular' services, such as telnet a nd ftp, as -well for SAMBA services.

Getting the socket options right can make a big difference to your +performance, but getting them wrong can degrade it by just as +much. The correct settings are very dependent on your local network.

This HOWTO has been written from a 'RedHat-centric' perspective, so if -you are using another distribution, you may have to modify the instructions -somewhat to fit the way your distribution works.

  • Why should I to this? -

    This allows the SAMBA administrator to rely on the - authentication mechanisms on the NT/Win2K PDC for the authentication - of domain members. NT/Win2K users no longer need to have separate - accounts on the SAMBA server. -

  • Who should be reading this document? -

    This HOWTO is designed for system administrators. If you are - implementing SAMBA on a file server and wish to (fairly easily) - integrate existing NT/Win2K users from your PDC onto the - SAMBA server, this HOWTO is for you. That said, I am no NT or PAM - expert, so you may find a better or easier way to accomplish - these tasks. -


11.5.2. Requirements

If you have a samba configuration file that you are currently -using... BACK IT UP! If your system already uses PAM, -back up the /etc/pam.d directory -contents! If you haven't already made a boot disk, -MAKE ONE NOW!

Messing with the pam configuration files can make it nearly impossible -to log in to yourmachine. That's why you want to be able to boot back -into your machine in single user mode and restore your -/etc/pam.d back to the original state they were in if -you get frustrated with the way things are going. ;-)

The latest version of SAMBA (version 2.2.2 as of this writing), now -includes a functioning winbindd daemon. Please refer to the -main SAMBA web page or, -better yet, your closest SAMBA mirror site for instructions on -downloading the source code.

To allow Domain users the ability to access SAMBA shares and -files, as well as potentially other services provided by your -SAMBA machine, PAM (pluggable authentication modules) must -be setup properly on your machine. In order to compile the -winbind modules, you should have at least the pam libraries resident -on your system. For recent RedHat systems (7.1, for instance), that -means pam-0.74-22. For best results, it is helpful to also -install the development packages in pam-devel-0.74-22.


11.5.3. Testing Things Out

Before starting, it is probably best to kill off all the SAMBA -related daemons running on your server. Kill off all smbd, -nmbd, and winbindd processes that may -be running. To use PAM, you will want to make sure that you have the -standard PAM package (for RedHat) which supplies the /etc/pam.d -directory structure, including the pam modules are used by pam-aware -services, several pam libraries, and the /usr/doc -and /usr/man entries for pam. Winbind built better -in SAMBA if the pam-devel package was also installed. This package includes -the header files needed to compile pam-aware applications. For instance, -my RedHat system has both pam-0.74-22 and -pam-devel-0.74-22 RPMs installed.


11.5.3.1. Configure and compile SAMBA

The configuration and compilation of SAMBA is pretty straightforward. -The first three steps may not be necessary depending upon -whether or not you have previously built the Samba binaries.

root# autoconf
-root# make clean
-root# rm config.cache
-root# ./configure --with-winbind
-root# make
-root# make install

This will, by default, install SAMBA in /usr/local/samba. -See the main SAMBA documentation if you want to install SAMBA somewhere else. -It will also build the winbindd executable and libraries.


11.5.3.2. Configure nsswitch.conf and the -winbind libraries

The libraries needed to run the winbindd daemon -through nsswitch need to be copied to their proper locations, so

root# cp ../samba/source/nsswitch/libnss_winbind.so /lib

I also found it necessary to make the following symbolic link:

root# ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2

Now, as root you need to edit /etc/nsswitch.conf to -allow user and group entries to be visible from the winbindd -daemon. My /etc/nsswitch.conf file look like -this after editing:

	passwd:     files winbind
-	shadow:     files 
-	group:      files winbind

-The libraries needed by the winbind daemon will be automatically -entered into the ldconfig cache the next time -your system reboots, but it -is faster (and you don't need to reboot) if you do it manually:

root# /sbin/ldconfig -v | grep winbind

This makes libnss_winbind available to winbindd -and echos back a check to you.


11.5.3.3. Configure smb.conf

Several parameters are needed in the smb.conf file to control -the behavior of winbindd. Configure -smb.conf These are described in more detail in -the winbindd(8) man page. My -smb.conf file was modified to -include the following entries in the [global] section:

[global]
-     <...>
-     # separate domain and username with '+', like DOMAIN+username
-     winbind separator = +
-     # use uids from 10000 to 20000 for domain users
-     winbind uid = 10000-20000
-     # use gids from 10000 to 20000 for domain groups
-     winbind gid = 10000-20000
-     # allow enumeration of winbind users and groups
-     winbind enum users = yes
-     winbind enum groups = yes
-     # give winbind users a real shell (only needed if they have telnet access)
-     template homedir = /home/winnt/%D/%U
-     template shell = /bin/bash


11.5.3.4. Join the SAMBA server to the PDC domain

Enter the following command to make the SAMBA server join the -PDC domain, where DOMAIN is the name of -your Windows domain and Administrator is -a domain user who has administrative privileges in the domain.

root# /usr/local/samba/bin/net rpc join -s PDC -U Administrator

The proper response to the command should be: "Joined the domain -DOMAIN" where DOMAIN -is your DOMAIN name.


11.5.3.5. Start up the winbindd daemon and test it!

Eventually, you will want to modify your smb startup script to -automatically invoke the winbindd daemon when the other parts of -SAMBA start, but it is possible to test out just the winbind -portion first. To start up winbind services, enter the following -command as root:

root# /usr/local/samba/bin/winbindd

I'm always paranoid and like to make sure the daemon -is really running...

root# ps -ae | grep winbindd

This command should produce output like this, if the daemon is running

3025 ? 00:00:00 winbindd

Now... for the real test, try to get some information about the -users on your PDC

root# /usr/local/samba/bin/wbinfo -u

-This should echo back a list of users on your Windows users on -your PDC. For example, I get the following response:

CEO+Administrator
-CEO+burdell
-CEO+Guest
-CEO+jt-ad
-CEO+krbtgt
-CEO+TsInternetUser

Obviously, I have named my domain 'CEO' and my winbind -separator is '+'.

You can do the same sort of thing to get group information from -the PDC:

root# /usr/local/samba/bin/wbinfo -g
-CEO+Domain Admins
-CEO+Domain Users
-CEO+Domain Guests
-CEO+Domain Computers
-CEO+Domain Controllers
-CEO+Cert Publishers
-CEO+Schema Admins
-CEO+Enterprise Admins
-CEO+Group Policy Creator Owners

The function 'getent' can now be used to get unified -lists of both local and PDC users and groups. -Try the following command:

root# getent passwd

You should get a list that looks like your /etc/passwd -list followed by the domain users with their new uids, gids, home -directories and default shells.

The same thing can be done for groups with the command

root# getent group


11.5.3.6. Fix the /etc/rc.d/init.d/smb startup files

The winbindd daemon needs to start up after the -smbd and nmbd daemons are running. -To accomplish this task, you need to modify the /etc/init.d/smb -script to add commands to invoke this daemon in the proper sequence. My -/etc/init.d/smb file starts up smbd, -nmbd, and winbindd from the -/usr/local/samba/bin directory directly. The 'start' -function in the script looks like this:

start() {
-        KIND="SMB"
-        echo -n $"Starting $KIND services: "
-        daemon /usr/local/samba/bin/smbd $SMBDOPTIONS
-        RETVAL=$?
-        echo
-        KIND="NMB"
-        echo -n $"Starting $KIND services: "
-        daemon /usr/local/samba/bin/nmbd $NMBDOPTIONS
-        RETVAL2=$?
-        echo
-        KIND="Winbind"
-        echo -n $"Starting $KIND services: "
-        daemon /usr/local/samba/bin/winbindd
-        RETVAL3=$?
-        echo
-        [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && touch /var/lock/subsys/smb || \
-           RETVAL=1
-        return $RETVAL
-}

The 'stop' function has a corresponding entry to shut down the -services and look s like this:

stop() {
-        KIND="SMB"
-        echo -n $"Shutting down $KIND services: "
-        killproc smbd
-        RETVAL=$?
-        echo
-        KIND="NMB"
-        echo -n $"Shutting down $KIND services: "
-        killproc nmbd
-        RETVAL2=$?
-        echo
-        KIND="Winbind"
-        echo -n $"Shutting down $KIND services: "
-        killproc winbindd
-        RETVAL3=$?
-        [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 -a $RETVAL3 -eq 0 ] && rm -f /var/lock/subsys/smb
-        echo ""
-        return $RETVAL
-}

If you restart the smbd, nmbd, -and winbindd daemons at this point, you -should be able to connect to the samba server as a domain member just as -if you were a local user.


11.5.3.7. Configure Winbind and PAM

If you have made it this far, you know that winbindd and samba are working -together. If you want to use winbind to provide authentication for other -services, keep reading. The pam configuration files need to be altered in -this step. (Did you remember to make backups of your original -/etc/pam.d files? If not, do it now.)

You will need a pam module to use winbindd with these other services. This -module will be compiled in the ../source/nsswitch directory -by invoking the command

root# make nsswitch/pam_winbind.so

from the ../source directory. The -pam_winbind.so file should be copied to the location of -your other pam security modules. On my RedHat system, this was the -/lib/security directory.

root# cp ../samba/source/nsswitch/pam_winbind.so /lib/security

The /etc/pam.d/samba file does not need to be changed. I -just left this fileas it was:

auth    required        /lib/security/pam_stack.so service=system-auth
-account required        /lib/security/pam_stack.so service=system-auth

The other services that I modified to allow the use of winbind -as an authentication service were the normal login on the console (or a terminal -session), telnet logins, and ftp service. In order to enable these -services, you may first need to change the entries in -/etc/xinetd.d (or /etc/inetd.conf). -RedHat 7.1 uses the new xinetd.d structure, in this case you need -to change the lines in /etc/xinetd.d/telnet -and /etc/xinetd.d/wu-ftp from

enable = no

to

enable = yes

-For ftp services to work properly, you will also need to either -have individual directories for the domain users already present on -the server, or change the home directory template to a general -directory for all domain users. These can be easily set using -the smb.conf global entry -template homedir.

The /etc/pam.d/ftp file can be changed -to allow winbind ftp access in a manner similar to the -samba file. My /etc/pam.d/ftp file was -changed to look like this:

auth       required     /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
-auth       sufficient   /lib/security/pam_winbind.so
-auth       required     /lib/security/pam_stack.so service=system-auth
-auth       required     /lib/security/pam_shells.so
-account    sufficient   /lib/security/pam_winbind.so
-account    required     /lib/security/pam_stack.so service=system-auth
-session    required     /lib/security/pam_stack.so service=system-auth

The /etc/pam.d/login file can be changed nearly the -same way. It now looks like this:

auth       required     /lib/security/pam_securetty.so
-auth       sufficient   /lib/security/pam_winbind.so
-auth       sufficient   /lib/security/pam_unix.so use_first_pass
-auth       required     /lib/security/pam_stack.so service=system-auth
-auth       required     /lib/security/pam_nologin.so
-account    sufficient   /lib/security/pam_winbind.so
-account    required     /lib/security/pam_stack.so service=system-auth
-password   required     /lib/security/pam_stack.so service=system-auth
-session    required     /lib/security/pam_stack.so service=system-auth
-session    optional     /lib/security/pam_console.so

In this case, I added the auth sufficient /lib/security/pam_winbind.so -lines as before, but also added the required pam_securetty.so -above it, to disallow root logins over the network. I also added a -sufficient /lib/security/pam_unix.so use_first_pass -line after the winbind.so line to get rid of annoying -double prompts for passwords.

The socket option TCP_NODELAY is the one that seems to make the +biggest single difference for most networks. Many people report that +adding "socket options = TCP_NODELAY" doubles the read performance of +a Samba drive. The best explanation I have seen for this is that the +Microsoft TCP/IP stack is slow in sending tcp ACKs.


11.6. Limitations16.4. Read size

Winbind has a number of limitations in its current - released version that we hope to overcome in future - releases:

The option "read size" affects the overlap of disk reads/writes with +network reads/writes. If the amount of data being transferred in +several of the SMB commands (currently SMBwrite, SMBwriteX and +SMBreadbraw) is larger than this value then the server begins writing +the data before it has received the whole packet from the network, or +in the case of SMBreadbraw, it begins writing to the network before +all the data has been read from disk.

  • This overlapping works best when the speeds of disk and network access +are similar, having very little effect when the speed of one is much +greater than the other.

    Winbind is currently only available for - the Linux operating system, although ports to other operating - systems are certainly possible. For such ports to be feasible, - we require the C library of the target operating system to - support the Name Service Switch and Pluggable Authentication - Modules systems. This is becoming more common as NSS and - PAM gain support among UNIX vendors.

  • The mappings of Windows NT RIDs to UNIX ids - is not made algorithmically and depends on the order in which - unmapped users or groups are seen by winbind. It may be difficult - to recover the mappings of rid to UNIX id mapping if the file - containing this information is corrupted or destroyed.

  • Currently the winbind PAM module does not take - into account possible workstation and logon time restrictions - that may be been set for Windows NT users.

The default value is 16384, but very little experimentation has been +done yet to determine the optimal value, and it is likely that the best +value will vary greatly between systems anyway. A value over 65536 is +pointless and will cause you to allocate memory unnecessarily.


11.7. Conclusion16.5. Max xmit

The winbind system, through the use of the Name Service - Switch, Pluggable Authentication Modules, and appropriate - Microsoft RPC calls have allowed us to provide seamless - integration of Microsoft Windows NT domain users on a - UNIX system. The result is a great reduction in the administrative - cost of running a mixed UNIX and NT network.

At startup the client and server negotiate a "maximum transmit" size, +which limits the size of nearly all SMB commands. You can set the +maximum size that Samba will negotiate using the "max xmit = " option +in smb.conf. Note that this is the maximum size of SMB request that +Samba will accept, but not the maximum size that the *client* will accept. +The client maximum receive size is sent to Samba by the client and Samba +honours this limit.

It defaults to 65536 bytes (the maximum), but it is possible that some +clients may perform better with a smaller transmit unit. Trying values +of less than 2048 is likely to cause severe problems.

In most cases the default is the best option.


16.6. Locking

By default Samba does not implement strict locking on each read/write +call (although it did in previous versions). If you enable strict +locking (using "strict locking = yes") then you may find that you +suffer a severe performance hit on some systems.

The performance hit will probably be greater on NFS mounted +filesystems, but could be quite high even on local disks.


16.7. Share modes

Some people find that opening files is very slow. This is often +because of the "share modes" code needed to fully implement the dos +share modes stuff. You can disable this code using "share modes = +no". This will gain you a lot in opening and closing files but will +mean that (in some cases) the system won't force a second user of a +file to open the file read-only if the first has it open +read-write. For many applications that do their own locking this +doesn't matter, but for some it may. Most Windows applications +depend heavily on "share modes" working correctly and it is +recommended that the Samba share mode support be left at the +default of "on".

The share mode code in Samba has been re-written in the 1.9.17 +release following tests with the Ziff-Davis NetBench PC Benchmarking +tool. It is now believed that Samba 1.9.17 implements share modes +similarly to Windows NT.

NOTE: In the most recent versions of Samba there is an option to use +shared memory via mmap() to implement the share modes. This makes +things much faster. See the Makefile for how to enable this.


16.8. Log level

If you set the log level (also known as "debug level") higher than 2 +then you may suffer a large drop in performance. This is because the +server flushes the log file after each operation, which can be very +expensive.


16.9. Wide lines

The "wide links" option is now enabled by default, but if you disable +it (for better security) then you may suffer a performance hit in +resolving filenames. The performance loss is lessened if you have +"getwd cache = yes", which is now the default.


16.10. Read raw

The "read raw" operation is designed to be an optimised, low-latency +file read operation. A server may choose to not support it, +however. and Samba makes support for "read raw" optional, with it +being enabled by default.

In some cases clients don't handle "read raw" very well and actually +get lower performance using it than they get using the conventional +read operations.

So you might like to try "read raw = no" and see what happens on your +network. It might lower, raise or not affect your performance. Only +testing can really tell.


16.11. Write raw

The "write raw" operation is designed to be an optimised, low-latency +file write operation. A server may choose to not support it, +however. and Samba makes support for "write raw" optional, with it +being enabled by default.

Some machines may find "write raw" slower than normal write, in which +case you may wish to change this option.


16.12. Read prediction

Samba can do read prediction on some of the SMB commands. Read +prediction means that Samba reads some extra data on the last file it +read while waiting for the next SMB command to arrive. It can then +respond more quickly when the next read request arrives.

This is disabled by default. You can enable it by using "read +prediction = yes".

Note that read prediction is only used on files that were opened read +only.

Read prediction should particularly help for those silly clients (such +as "Write" under NT) which do lots of very small reads on a file.

Samba will not read ahead more data than the amount specified in the +"read size" option. It always reads ahead on 1k block boundaries.


16.13. Memory mapping

Samba supports reading files via memory mapping them. One some +machines this can give a large boost to performance, on others it +makes not difference at all, and on some it may reduce performance.

To enable you you have to recompile Samba with the -DUSE_MMAP option +on the FLAGS line of the Makefile.

Note that memory mapping is only used on files opened read only, and +is not used by the "read raw" operation. Thus you may find memory +mapping is more effective if you disable "read raw" using "read raw = +no".


16.14. Slow Clients

One person has reported that setting the protocol to COREPLUS rather +than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s).

I suspect that his PC's (386sx16 based) were asking for more data than +they could chew. I suspect a similar speed could be had by setting +"read raw = no" and "max xmit = 2048", instead of changing the +protocol. Lowering the "read size" might also help.


16.15. Slow Logins

Slow logins are almost always due to the password checking time. Using +the lowest practical "password level" will improve things a lot. You +could also enable the "UFC crypt" option in the Makefile.


16.16. Client tuning

Often a speed problem can be traced to the client. The client (for +example Windows for Workgroups) can often be tuned for better TCP +performance.

See your client docs for details. In particular, I have heard rumours +that the WfWg options TCPWINDOWSIZE and TCPSEGMENTSIZE can have a +large impact on performance.

Also note that some people have found that setting DefaultRcvWindow in +the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a +big improvement. I don't know why.

My own experience wth DefaultRcvWindow is that I get much better +performance with a large value (16384 or larger). Other people have +reported that anything over 3072 slows things down enourmously. One +person even reported a speed drop of a factor of 30 when he went from +3072 to 8192. I don't know why.

It probably depends a lot on your hardware, and the type of unix box +you have at the other end of the link.

Paul Cochrane has done some testing on client side tuning and come +to the following conclusions:

Install the W2setup.exe file from www.microsoft.com. This is an +update for the winsock stack and utilities which improve performance.

Configure the win95 TCPIP registry settings to give better +perfomance. I use a program called MTUSPEED.exe which I got off the +net. There are various other utilities of this type freely available. +The setting which give the best performance for me are:

  1. MaxMTU Remove

  2. RWIN Remove

  3. MTUAutoDiscover Disable

  4. MTUBlackHoleDetect Disable

  5. Time To Live Enabled

  6. Time To Live - HOPS 32

  7. NDI Cache Size 0

I tried virtually all of the items mentioned in the document and +the only one which made a difference to me was the socket options. It +turned out I was better off without any!!!!!

In terms of overall speed of transfer, between various win95 clients +and a DX2-66 20MB server with a crappy NE2000 compatible and old IDE +drive (Kernel 2.0.30). The transfer rate was reasonable for 10 baseT.

FIXME +The figures are: Put Get +P166 client 3Com card: 420-440kB/s 500-520kB/s +P100 client 3Com card: 390-410kB/s 490-510kB/s +DX4-75 client NE2000: 370-380kB/s 330-350kB/s

I based these test on transfer two files a 4.5MB text file and a 15MB +textfile. The results arn't bad considering the hardware Samba is +running on. It's a crap machine!!!!

The updates mentioned in 1 and 2 brought up the transfer rates from +just over 100kB/s in some clients.

A new client is a P333 connected via a 100MB/s card and hub. The +transfer rates from this were good: 450-500kB/s on put and 600+kB/s +on get.

Looking at standard FTP throughput, Samba is a bit slower (100kB/s +upwards). I suppose there is more going on in the samba protocol, but +if it could get up to the rate of FTP the perfomance would be quite +staggering.


16.17. My Results

Some people want to see real numbers in a document like this, so here +they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b +tcp/ip stack. It has a slow IDE drive and 20Mb of ram. It has a SMC +Elite-16 ISA bus ethernet card. The only WfWg tuning I've done is to +set DefaultRcvWindow in the [MSTCP] section of system.ini to 16384. My +server is a 486dx3-66 running Linux. It also has 20Mb of ram and a SMC +Elite-16 card. You can see my server config in the examples/tridge/ +subdirectory of the distribution.

I get 490k/s on reading a 8Mb file with copy. +I get 441k/s writing the same file to the samba server.

Of course, there's a lot more to benchmarks than 2 raw throughput +figures, but it gives you a ballpark figure.

I've also tested Win95 and WinNT, and found WinNT gave me the best +speed as a samba client. The fastest client of all (for me) is +smbclient running on another linux box. Maybe I'll add those results +here someday ...


Chapter 12. OS2 Client HOWTOChapter 17. OS2 Client HOWTO

12.1. FAQs17.1. FAQs

12.1.1. How can I configure OS/2 Warp Connect or +NAME="AEN2862" +>17.1.1. How can I configure OS/2 Warp Connect or OS/2 Warp 4 as a client for Samba?


12.1.2. How can I configure OS/2 Warp 3 (not Connect), +NAME="AEN2877" +>17.1.2. How can I configure OS/2 Warp 3 (not Connect), OS/2 1.2, 1.3 or 2.x for Samba?


12.1.3. Are there any other issues when OS/2 (any version) +NAME="AEN2886" +>17.1.3. Are there any other issues when OS/2 (any version) is used as a client?


12.1.4. How do I get printer driver download working +NAME="AEN2890" +>17.1.4. How do I get printer driver download working for OS/2 clients?


Chapter 13. HOWTO Access Samba source code via CVSChapter 18. HOWTO Access Samba source code via CVS

13.1. Introduction18.1. Introduction

Samba is developed in an open environment. Developers use CVS @@ -10775,8 +13894,8 @@ CLASS="SECT1" >


13.2. CVS Access to samba.org18.2. CVS Access to samba.org

The machine samba.org runs a publicly accessible CVS @@ -10788,8 +13907,8 @@ CLASS="SECT2" >


13.2.1. Access via CVSweb18.2.1. Access via CVSweb

You can access the source code via your @@ -10809,8 +13928,8 @@ CLASS="SECT2" >


13.2.2. Access via cvs18.2.2. Access via cvs

You can also access the source code via a @@ -10913,16 +14032,242 @@ CLASS="COMMAND" >


Chapter 19. Reporting Bugs

19.1. Introduction

The email address for bug reports is samba@samba.org

Please take the time to read this file before you submit a bug +report. Also, please see if it has changed between releases, as we +may be changing the bug reporting mechanism at some time.

Please also do as much as you can yourself to help track down the +bug. Samba is maintained by a dedicated group of people who volunteer +their time, skills and efforts. We receive far more mail about it than +we can possibly answer, so you have a much higher chance of an answer +and a fix if you send us a "developer friendly" bug report that lets +us fix it fast.

Do not assume that if you post the bug to the comp.protocols.smb +newsgroup or the mailing list that we will read it. If you suspect that your +problem is not a bug but a configuration problem then it is better to send +it to the Samba mailing list, as there are (at last count) 5000 other users on +that list that may be able to help you.

You may also like to look though the recent mailing list archives, +which are conveniently accessible on the Samba web pages +at http://samba.org/samba/


19.2. General info

Before submitting a bug report check your config for silly +errors. Look in your log files for obvious messages that tell you that +you've misconfigured something and run testparm to test your config +file for correct syntax.

Have you run through the diagnosis? +This is very important.

If you include part of a log file with your bug report then be sure to +annotate it with exactly what you were doing on the client at the +time, and exactly what the results were.


19.3. Debug levels

If the bug has anything to do with Samba behaving incorrectly as a +server (like refusing to open a file) then the log files will probably +be very useful. Depending on the problem a log level of between 3 and +10 showing the problem may be appropriate. A higher level givesmore +detail, but may use too much disk space.

To set the debug level use log level = in your +smb.conf. You may also find it useful to set the log +level higher for just one machine and keep separate logs for each machine. +To do this use:

log level = 10
+log file = /usr/local/samba/lib/log.%m
+include = /usr/local/samba/lib/smb.conf.%m

then create a file +/usr/local/samba/lib/smb.conf.machine where +"machine" is the name of the client you wish to debug. In that file +put any smb.conf commands you want, for example +log level= may be useful. This also allows you to +experiment with different security systems, protocol levels etc on just +one machine.

The smb.conf entry log level = +is synonymous with the entry debuglevel = that has been +used in older versions of Samba and is being retained for backwards +compatibility of smb.conf files.

As the log level = value is increased you will record +a significantly increasing level of debugging information. For most +debugging operations you may not need a setting higher than 3. Nearly +all bugs can be tracked at a setting of 10, but be prepared for a VERY +large volume of log data.


19.4. Internal errors

If you get a "INTERNAL ERROR" message in your log files it means that +Samba got an unexpected signal while running. It is probably a +segmentation fault and almost certainly means a bug in Samba (unless +you have faulty hardware or system software)

If the message came from smbd then it will probably be accompanied by +a message which details the last SMB message received by smbd. This +info is often very useful in tracking down the problem so please +include it in your bug report.

You should also detail how to reproduce the problem, if +possible. Please make this reasonably detailed.

You may also find that a core file appeared in a "corefiles" +subdirectory of the directory where you keep your samba log +files. This file is the most useful tool for tracking down the bug. To +use it you do this:

gdb smbd core

adding appropriate paths to smbd and core so gdb can find them. If you +don't have gdb then try "dbx". Then within the debugger use the +command "where" to give a stack trace of where the problem +occurred. Include this in your mail.

If you known any assembly language then do a "disass" of the routine +where the problem occurred (if its in a library routine then +disassemble the routine that called it) and try to work out exactly +where the problem is by looking at the surrounding code. Even if you +don't know assembly then incuding this info in the bug report can be +useful.


19.5. Attaching to a running process

Unfortunately some unixes (in particular some recent linux kernels) +refuse to dump a core file if the task has changed uid (which smbd +does often). To debug with this sort of system you could try to attach +to the running process using "gdb smbd PID" where you get PID from +smbstatus. Then use "c" to continue and try to cause the core dump +using the client. The debugger should catch the fault and tell you +where it occurred.


19.6. Patches

The best sort of bug report is one that includes a fix! If you send us +patches please use diff -u format if your version of +diff supports it, otherwise use diff -c4. Make sure +your do the diff against a clean version of the source and let me know +exactly what version you used.


Index

Primary Domain Controller, Background
As a result of these defeciencies, a more robust means of storing user attributes used by smbd was developed. The API which defines access to user accounts is commonly referred to as the samdb interface (previously this was called the passdb -API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support +API, and is still so named in the CVS trees). In Samba 2.2.3, enabling support for a samdb backend (e.g.

The default logon path is \\%N\U%. NT Workstation will attempt to create +>The default logon path is \\%N\%U. NT Workstation will attempt to create a directory "\\samba-server\username.PDS" if you specify the logon path as "\\samba-server\username" with the NT User Manager. Therefore, you will need to specify (for example) "\\samba-server\username\profile". diff --git a/docs/htmldocs/Speed.html b/docs/htmldocs/Speed.html new file mode 100644 index 00000000000..47a8c885b61 --- /dev/null +++ b/docs/htmldocs/Speed.html @@ -0,0 +1,550 @@ +Samba performance issues

Comparisons

The Samba server uses TCP to talk to the client. Thus if you are +trying to see if it performs well you should really compare it to +programs that use the same protocol. The most readily available +programs for file transfer that use TCP are ftp or another TCP based +SMB server.

If you want to test against something like a NT or WfWg server then +you will have to disable all but TCP on either the client or +server. Otherwise you may well be using a totally different protocol +(such as Netbeui) and comparisons may not be valid.

Generally you should find that Samba performs similarly to ftp at raw +transfer speed. It should perform quite a bit faster than NFS, +although this very much depends on your system.

Several people have done comparisons between Samba and Novell, NFS or +WinNT. In some cases Samba performed the best, in others the worst. I +suspect the biggest factor is not Samba vs some other system but the +hardware and drivers used on the various systems. Given similar +hardware Samba should certainly be competitive in speed with other +systems.


Oplocks

Overview

Oplocks are the way that SMB clients get permission from a server to +locally cache file operations. If a server grants an oplock +(opportunistic lock) then the client is free to assume that it is the +only one accessing the file and it will agressively cache file +data. With some oplock types the client may even cache file open/close +operations. This can give enormous performance benefits.

With the release of Samba 1.9.18 we now correctly support opportunistic +locks. This is turned on by default, and can be turned off on a share- +by-share basis by setting the parameter :

oplocks = False

We recommend that you leave oplocks on however, as current benchmark +tests with NetBench seem to give approximately a 30% improvement in +speed with them on. This is on average however, and the actual +improvement seen can be orders of magnitude greater, depending on +what the client redirector is doing.

Previous to Samba 1.9.18 there was a 'fake oplocks' option. This +option has been left in the code for backwards compatibility reasons +but it's use is now deprecated. A short summary of what the old +code did follows.


Level2 Oplocks

With Samba 2.0.5 a new capability - level2 (read only) oplocks is +supported (although the option is off by default - see the smb.conf +man page for details). Turning on level2 oplocks (on a share-by-share basis) +by setting the parameter :

level2 oplocks = true

should speed concurrent access to files that are not commonly written +to, such as application serving shares (ie. shares that contain common +.EXE files - such as a Microsoft Office share) as it allows clients to +read-ahread cache copies of these files.


Old 'fake oplocks' option - deprecated

Samba can also fake oplocks, by granting a oplock whenever a client +asks for one. This is controlled using the smb.conf option "fake +oplocks". If you set "fake oplocks = yes" then you are telling the +client that it may agressively cache the file data for all opens.

Enabling 'fake oplocks' on all read-only shares or shares that you know +will only be accessed from one client at a time you will see a big +performance improvement on many operations. If you enable this option +on shares where multiple clients may be accessing the files read-write +at the same time you can get data corruption.


Socket options

There are a number of socket options that can greatly affect the +performance of a TCP based server like Samba.

The socket options that Samba uses are settable both on the command +line with the -O option, or in the smb.conf file.

The "socket options" section of the smb.conf manual page describes how +to set these and gives recommendations.

Getting the socket options right can make a big difference to your +performance, but getting them wrong can degrade it by just as +much. The correct settings are very dependent on your local network.

The socket option TCP_NODELAY is the one that seems to make the +biggest single difference for most networks. Many people report that +adding "socket options = TCP_NODELAY" doubles the read performance of +a Samba drive. The best explanation I have seen for this is that the +Microsoft TCP/IP stack is slow in sending tcp ACKs.


Read size

The option "read size" affects the overlap of disk reads/writes with +network reads/writes. If the amount of data being transferred in +several of the SMB commands (currently SMBwrite, SMBwriteX and +SMBreadbraw) is larger than this value then the server begins writing +the data before it has received the whole packet from the network, or +in the case of SMBreadbraw, it begins writing to the network before +all the data has been read from disk.

This overlapping works best when the speeds of disk and network access +are similar, having very little effect when the speed of one is much +greater than the other.

The default value is 16384, but very little experimentation has been +done yet to determine the optimal value, and it is likely that the best +value will vary greatly between systems anyway. A value over 65536 is +pointless and will cause you to allocate memory unnecessarily.


Max xmit

At startup the client and server negotiate a "maximum transmit" size, +which limits the size of nearly all SMB commands. You can set the +maximum size that Samba will negotiate using the "max xmit = " option +in smb.conf. Note that this is the maximum size of SMB request that +Samba will accept, but not the maximum size that the *client* will accept. +The client maximum receive size is sent to Samba by the client and Samba +honours this limit.

It defaults to 65536 bytes (the maximum), but it is possible that some +clients may perform better with a smaller transmit unit. Trying values +of less than 2048 is likely to cause severe problems.

In most cases the default is the best option.


Locking

By default Samba does not implement strict locking on each read/write +call (although it did in previous versions). If you enable strict +locking (using "strict locking = yes") then you may find that you +suffer a severe performance hit on some systems.

The performance hit will probably be greater on NFS mounted +filesystems, but could be quite high even on local disks.


Share modes

Some people find that opening files is very slow. This is often +because of the "share modes" code needed to fully implement the dos +share modes stuff. You can disable this code using "share modes = +no". This will gain you a lot in opening and closing files but will +mean that (in some cases) the system won't force a second user of a +file to open the file read-only if the first has it open +read-write. For many applications that do their own locking this +doesn't matter, but for some it may. Most Windows applications +depend heavily on "share modes" working correctly and it is +recommended that the Samba share mode support be left at the +default of "on".

The share mode code in Samba has been re-written in the 1.9.17 +release following tests with the Ziff-Davis NetBench PC Benchmarking +tool. It is now believed that Samba 1.9.17 implements share modes +similarly to Windows NT.

NOTE: In the most recent versions of Samba there is an option to use +shared memory via mmap() to implement the share modes. This makes +things much faster. See the Makefile for how to enable this.


Log level

If you set the log level (also known as "debug level") higher than 2 +then you may suffer a large drop in performance. This is because the +server flushes the log file after each operation, which can be very +expensive.


Wide lines

The "wide links" option is now enabled by default, but if you disable +it (for better security) then you may suffer a performance hit in +resolving filenames. The performance loss is lessened if you have +"getwd cache = yes", which is now the default.


Read raw

The "read raw" operation is designed to be an optimised, low-latency +file read operation. A server may choose to not support it, +however. and Samba makes support for "read raw" optional, with it +being enabled by default.

In some cases clients don't handle "read raw" very well and actually +get lower performance using it than they get using the conventional +read operations.

So you might like to try "read raw = no" and see what happens on your +network. It might lower, raise or not affect your performance. Only +testing can really tell.


Write raw

The "write raw" operation is designed to be an optimised, low-latency +file write operation. A server may choose to not support it, +however. and Samba makes support for "write raw" optional, with it +being enabled by default.

Some machines may find "write raw" slower than normal write, in which +case you may wish to change this option.


Read prediction

Samba can do read prediction on some of the SMB commands. Read +prediction means that Samba reads some extra data on the last file it +read while waiting for the next SMB command to arrive. It can then +respond more quickly when the next read request arrives.

This is disabled by default. You can enable it by using "read +prediction = yes".

Note that read prediction is only used on files that were opened read +only.

Read prediction should particularly help for those silly clients (such +as "Write" under NT) which do lots of very small reads on a file.

Samba will not read ahead more data than the amount specified in the +"read size" option. It always reads ahead on 1k block boundaries.


Memory mapping

Samba supports reading files via memory mapping them. One some +machines this can give a large boost to performance, on others it +makes not difference at all, and on some it may reduce performance.

To enable you you have to recompile Samba with the -DUSE_MMAP option +on the FLAGS line of the Makefile.

Note that memory mapping is only used on files opened read only, and +is not used by the "read raw" operation. Thus you may find memory +mapping is more effective if you disable "read raw" using "read raw = +no".


Slow Clients

One person has reported that setting the protocol to COREPLUS rather +than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s).

I suspect that his PC's (386sx16 based) were asking for more data than +they could chew. I suspect a similar speed could be had by setting +"read raw = no" and "max xmit = 2048", instead of changing the +protocol. Lowering the "read size" might also help.


Slow Logins

Slow logins are almost always due to the password checking time. Using +the lowest practical "password level" will improve things a lot. You +could also enable the "UFC crypt" option in the Makefile.


Client tuning

Often a speed problem can be traced to the client. The client (for +example Windows for Workgroups) can often be tuned for better TCP +performance.

See your client docs for details. In particular, I have heard rumours +that the WfWg options TCPWINDOWSIZE and TCPSEGMENTSIZE can have a +large impact on performance.

Also note that some people have found that setting DefaultRcvWindow in +the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a +big improvement. I don't know why.

My own experience wth DefaultRcvWindow is that I get much better +performance with a large value (16384 or larger). Other people have +reported that anything over 3072 slows things down enourmously. One +person even reported a speed drop of a factor of 30 when he went from +3072 to 8192. I don't know why.

It probably depends a lot on your hardware, and the type of unix box +you have at the other end of the link.

Paul Cochrane has done some testing on client side tuning and come +to the following conclusions:

Install the W2setup.exe file from www.microsoft.com. This is an +update for the winsock stack and utilities which improve performance.

Configure the win95 TCPIP registry settings to give better +perfomance. I use a program called MTUSPEED.exe which I got off the +net. There are various other utilities of this type freely available. +The setting which give the best performance for me are:

  1. MaxMTU Remove

  2. RWIN Remove

  3. MTUAutoDiscover Disable

  4. MTUBlackHoleDetect Disable

  5. Time To Live Enabled

  6. Time To Live - HOPS 32

  7. NDI Cache Size 0

I tried virtually all of the items mentioned in the document and +the only one which made a difference to me was the socket options. It +turned out I was better off without any!!!!!

In terms of overall speed of transfer, between various win95 clients +and a DX2-66 20MB server with a crappy NE2000 compatible and old IDE +drive (Kernel 2.0.30). The transfer rate was reasonable for 10 baseT.

FIXME +The figures are: Put Get +P166 client 3Com card: 420-440kB/s 500-520kB/s +P100 client 3Com card: 390-410kB/s 490-510kB/s +DX4-75 client NE2000: 370-380kB/s 330-350kB/s

I based these test on transfer two files a 4.5MB text file and a 15MB +textfile. The results arn't bad considering the hardware Samba is +running on. It's a crap machine!!!!

The updates mentioned in 1 and 2 brought up the transfer rates from +just over 100kB/s in some clients.

A new client is a P333 connected via a 100MB/s card and hub. The +transfer rates from this were good: 450-500kB/s on put and 600+kB/s +on get.

Looking at standard FTP throughput, Samba is a bit slower (100kB/s +upwards). I suppose there is more going on in the samba protocol, but +if it could get up to the rate of FTP the perfomance would be quite +staggering.


My Results

Some people want to see real numbers in a document like this, so here +they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b +tcp/ip stack. It has a slow IDE drive and 20Mb of ram. It has a SMC +Elite-16 ISA bus ethernet card. The only WfWg tuning I've done is to +set DefaultRcvWindow in the [MSTCP] section of system.ini to 16384. My +server is a 486dx3-66 running Linux. It also has 20Mb of ram and a SMC +Elite-16 card. You can see my server config in the examples/tridge/ +subdirectory of the distribution.

I get 490k/s on reading a 8Mb file with copy. +I get 441k/s writing the same file to the samba server.

Of course, there's a lot more to benchmarks than 2 raw throughput +figures, but it gives you a ballpark figure.

I've also tested Win95 and WinNT, and found WinNT gave me the best +speed as a samba client. The fastest client of all (for me) is +smbclient running on another linux box. Maybe I'll add those results +here someday ...

\ No newline at end of file diff --git a/docs/htmldocs/UNIX_INSTALL.html b/docs/htmldocs/UNIX_INSTALL.html index 35b1d9b01bc..9946e7e64e1 100644 --- a/docs/htmldocs/UNIX_INSTALL.html +++ b/docs/htmldocs/UNIX_INSTALL.html @@ -478,7 +478,7 @@ CLASS="REPLACEABLE" >

Your should get back a list of shares available on +>You should get back a list of shares available on your server. If you don't then something is incorrectly setup. Note that this method can also be used to see what shares are available on other LanManager clients (such as WfWg).

By default Samba uses a blank scope ID. This means all your windows boxes must also have a blank scope ID. If you really want to use a non-blank scope ID then you will - need to use the -i <scope> option to nmbd, smbd, and - smbclient. All your PCs will need to have the same setting for + need to use the 'netbios scope' smb.conf option. + All your PCs will need to have the same setting for this to work. I do not recommend scope IDs.

You can disable share modes using "share modes = no". - This may be useful on a heavily loaded server as the share - modes code is very slow. See also the FAST_SHARE_MODES - option in the Makefile for a way to do full share modes - very fast using shared memory (if your OS supports it).


Other Character Sets

If you have problems using filenames with accented - characters in them (like the German, French or Scandinavian - character sets) then I recommend you look at the "valid chars" - option in smb.conf and also take a look at the validchars - package in the examples directory.

rpcclient [-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N] {server}

[-A authfile] [-c <command string>] [-d debuglevel] [-h] [-l logfile] [-N] [-s <smb config file>] [-U username[%password]] [-W workgroup] [-N] [-I destinationIP] {server}

DESCRIPTION

OPTIONS

-I IP-address

IP address is the address of the server to connect to. + It should be specified in standard "a.b.c.d" notation.

Normally the client would attempt to locate a named + SMB/CIFS server by looking it up via the NetBIOS name resolution + mechanism described above in the name resolve order + parameter above. Using this parameter will force the client + to assume that the server is on the machine with the specified IP + address and the NetBIOS name component of the resource being + connected to will be ignored.

There is no default for this parameter. If not supplied, + it will be determined automatically by the client as described + above.

-l|--logfile=logbasename

COMMANDS

BUGS

VERSION

AUTHOR

Security levels

Introduction

Samba supports the following options to the global smb.conf parameter

[global]
+security = [share|user(default)|domain|ads]

Please refer to the smb.conf man page for usage information and to the document +DOMAIN_MEMBER.html for further background details +on domain mode security. The Windows 2000 Kerberos domain security model +(security = ads) is described in the ADS-HOWTO.html.

Of the above, "security = server" means that Samba reports to clients that +it is running in "user mode" but actually passes off all authentication +requests to another "user mode" server. This requires an additional +parameter "password server =" that points to the real authentication server. +That real authentication server can be another Samba server or can be a +Windows NT server, the later natively capable of encrypted password support.


More complete description of security levels

A SMB server tells the client at startup what "security level" it is +running. There are two options "share level" and "user level". Which +of these two the client receives affects the way the client then tries +to authenticate itself. It does not directly affect (to any great +extent) the way the Samba server does security. I know this is +strange, but it fits in with the client/server approach of SMB. In SMB +everything is initiated and controlled by the client, and the server +can only tell the client what is available and whether an action is +allowed.

I'll describe user level security first, as its simpler. In user level +security the client will send a "session setup" command directly after +the protocol negotiation. This contains a username and password. The +server can either accept or reject that username/password +combination. Note that at this stage the server has no idea what +share the client will eventually try to connect to, so it can't base +the "accept/reject" on anything other than:

  1. the username/password

  2. the machine that the client is coming from

If the server accepts the username/password then the client expects to +be able to mount any share (using a "tree connection") without +specifying a password. It expects that all access rights will be as +the username/password specified in the "session setup".

It is also possible for a client to send multiple "session setup" +requests. When the server responds it gives the client a "uid" to use +as an authentication tag for that username/password. The client can +maintain multiple authentication contexts in this way (WinDD is an +example of an application that does this)

Ok, now for share level security. In share level security the client +authenticates itself separately for each share. It will send a +password along with each "tree connection" (share mount). It does not +explicitly send a username with this operation. The client is +expecting a password to be associated with each share, independent of +the user. This means that samba has to work out what username the +client probably wants to use. It is never explicitly sent the +username. Some commercial SMB servers such as NT actually associate +passwords directly with shares in share level security, but samba +always uses the unix authentication scheme where it is a +username/password that is authenticated, not a "share/password".

Many clients send a "session setup" even if the server is in share +level security. They normally send a valid username but no +password. Samba records this username in a list of "possible +usernames". When the client then does a "tree connection" it also adds +to this list the name of the share they try to connect to (useful for +home directories) and any users listed in the "user =" smb.conf +line. The password is then checked in turn against these "possible +usernames". If a match is found then the client is authenticated as +that user.

Finally "server level" security. In server level security the samba +server reports to the client that it is in user level security. The +client then does a "session setup" as described earlier. The samba +server takes the username/password that the client sends and attempts +to login to the "password server" by sending exactly the same +username/password that it got from the client. If that server is in +user level security and accepts the password then samba accepts the +clients connection. This allows the samba server to use another SMB +server as the "password server".

You should also note that at the very start of all this, where the +server tells the client what security level it is in, it also tells +the client if it supports encryption. If it does then it supplies the +client with a random "cryptkey". The client will then send all +passwords in encrypted form. You have to compile samba with encryption +enabled to support this feature, and you have to maintain a separate +smbpasswd file with SMB style encrypted passwords. It is +cryptographically impossible to translate from unix style encryption +to SMB style encryption, although there are some fairly simple management +schemes by which the two could be kept in sync.

\ No newline at end of file diff --git a/docs/htmldocs/smb.conf.5.html b/docs/htmldocs/smb.conf.5.html index d329c25d654..6f0e88c4d35 100644 --- a/docs/htmldocs/smb.conf.5.html +++ b/docs/htmldocs/smb.conf.5.html @@ -1465,30 +1465,6 @@ CLASS="PARAMETER" >
  • ldap port

  • ldap server

  • ldap suffix

  • ldap suffix

  • ssl

  • ssl CA certDir

  • ssl CA certFile

  • ssl ciphers

  • ssl client cert

  • ssl client key

  • ssl compatibility

  • ssl egd socket

  • ssl entropy bytes

  • ssl entropy file

  • ssl hosts

  • ssl hosts resign

  • ssl require clientcert

  • ssl require servercert

  • ssl server cert

  • ssl server key

  • ssl versionuse spnego

    COMPLETE LIST OF SERVICE PARAMETERS

    EXPLANATION OF EACH PARAMETER

  • add group script (G)

    This is the full pathname to a script that will + be run AS ROOT by smbd(8) when a new group is requested. It will expand any %g to the group name passed. This script is only useful for installations using the Windows NT domain administration tools. +

    admin users (S)

    This is the full pathname to a script that will - be run AS ROOT by smbd(8) under special circumstances - described below.

    Normally, a Samba server requires that UNIX users are - created for all users accessing files on this server. For sites - that use Windows NT account databases as their primary user database - creating these users and keeping the user list in sync with the - Windows NT PDC is an onerous task. This option allows smbd to delete the required UNIX users ON - DEMAND when a user accesses the Samba server and the - Windows NT user no longer exists.

    In order to use this option, smbd must be - set to security = domain or security = - user and delete user script - must be set to a full pathname for a script - that will delete a UNIX user given one argument of %u, - which expands into the UNIX user name to delete.

    When the Windows user attempts to access the Samba server, - at login (session setup in the SMB protocol) - time, smbd contacts the password server and attempts to authenticate - the given user with the given password. If the authentication fails - with the specific Domain error code meaning that the user no longer - exists then smbd attempts to find a UNIX user in - the UNIX password database that matches the Windows user account. If - this lookup succeeds, and delete user script is - set then smbd will all the specified script - AS ROOT, expanding any %u - argument to be the user name to delete.

    This script should delete the given UNIX username. In this way, - UNIX users are dynamically deleted to match existing Windows NT - accounts.

    See also security = domain, - password server - , add user script - .

    This script is called when a remote client removes a user + from the server, normally using 'User Manager for Domains' or + rpcclient. +

    This script should delete the given UNIX username. +

    Default: ldap admin dn (G)

    This parameter is only available if Samba has been - configure to include the --with-ldapsam option - at compile time. This option should be considered experimental and - under active development. -

    The The ldap admin dn defines the Distinguished - Name (DN) name used by Samba to contact the ldap - server when retreiving user account information. The ldap @@ -9487,16 +9201,7 @@ NAME="LDAPFILTER" >ldap filter (G)

    This parameter is only available if Samba has been - configure to include the --with-ldapsam option - at compile time. This option should be considered experimental and - under active development. -

    This parameter specifies the RFC 2254 compliant LDAP search filter. +>This parameter specifies the RFC 2254 compliant LDAP search filter. The default is to match the login name with the uid

    ldap port (G)

    This parameter is only available if Samba has been - configure to include the --with-ldapsam option - at compile time. This option should be considered experimental and - under active development. -

    This option is used to control the tcp port number used to contact - the ldap server. - The default is to use the stand LDAPS port 636. -

    See Also: ldap ssl -

    Default : ldap port = 636

    ldap server (G)

    This parameter is only available if Samba has been - configure to include the --with-ldapsam option - at compile time. This option should be considered experimental and - under active development. -

    This parameter should contains the FQDN of the ldap directory - server which should be queried to locate user account information. -

    Default : ldap server = localhost

    ldap ssl (G)

    This parameter is only available if Samba has been - configure to include the --with-ldapsam option - at compile time. This option should be considered experimental and - under active development. -

    This option is used to define whether or not Samba should - use SSL when connecting to the ldap - server. This is This option is used to define whether or not Samba should + use SSL when connecting to the ldap server + This is NOT related to - Samba SSL support which is enabled by specifying the + Samba's previous SSL support which was enabled by specifying the --with-sslconfigure - script (see ssl). + script.

    The ldap suffix (G)

    This parameter is only available if Samba has been - configure to include the --with-ldapsam option - at compile time. This option should be considered experimental and - under active development. +>Default : none

    ldap user suffix (G)

    It specifies where users are added to the tree. +

    Default : none

    ldap machine suffix (G)

    It specifies where machines should be + added to the ldap tree.

    Default : log level (G)

    The value of the parameter (an integer) allows +>The value of the parameter (a astring) allows the debug level (logging level) to be specified in the smb.conf file. This is to give greater +> file. This parameter has been + extended since 2.2.x series, now it allow to specify the debug + level for multiple debug classes. This is to give greater flexibility in the configuration of the system.

    The default will be the log level specified on @@ -10148,7 +9785,8 @@ CLASS="FILENAME" >

    Example: log level = 3log level = 3 passdb:5 auth:10 winbind:2 +

    Any characters after the (optional) second : are passed to the plugin for its own processing

  • unixsam - Allows samba to map all (other) available unix users

    This backend uses the standard unix database for retrieving users. Users included + in this pdb are NOT listed in samba user listings and users included in this pdb won't be + able to login. The use of this backend is to always be able to display the owner of a file + on the samba server - even when the user doesn't have a 'real' samba account in one of the + other passdb backends. +

    This backend should always be the last backend listed, since it contains all users in + the unix passdb and might 'override' mappings if specified earlier. It's meant to only return + accounts for users that aren't covered by the previous backends.

  • Default: passdb backend = smbpasswdpassdb backend = smbpasswd unixsam

    Example: passdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswdpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd unixsam

    Example: passdb backend = ldapsam_nua:ldaps://ldap.example.compassdb backend = ldapsam_nua:ldaps://ldap.example.com unixsam

    Example:

    ssl (G)
    use spnego (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000sp2 clients to agree upon an authentication mechanism. As of samba 3.0alpha it must be set to "no" for these clients to join a samba domain controller. It can be set to "yes" to allow samba to participate in an AD domain controlled by a Windows2000 domain controller.

    This variable enables or disables the entire SSL mode. If - it is set to no, the SSL-enabled Samba behaves - exactly like the non-SSL Samba. If set to yes, - it depends on the variables ssl hosts and ssl hosts resign whether an SSL - connection will be required.

    Default: ssl = no

    ssl CA certDir (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This variable defines where to look up the Certification - Authorities. The given directory should contain one file for - each CA that Samba will trust. The file name must be the hash - value over the "Distinguished Name" of the CA. How this directory - is set up is explained later in this document. All files within the - directory that don't fit into this naming scheme are ignored. You - don't need this variable if you don't verify client certificates.

    Default: ssl CA certDir = /usr/local/ssl/certs -

    ssl CA certFile (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This variable is a second way to define the trusted CAs. - The certificates of the trusted CAs are collected in one big - file and this variable points to the file. You will probably - only use one of the two ways to define your CAs. The first choice is - preferable if you have many CAs or want to be flexible, the second - is preferable if you only have one CA and want to keep things - simple (you won't need to create the hashed file names). You - don't need this variable if you don't verify client certificates.

    Default: ssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem -

    ssl ciphers (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This variable defines the ciphers that should be offered - during SSL negotiation. You should not set this variable unless - you know what you are doing.

    ssl client cert (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    The certificate in this file is used by smbclient(1) if it exists. It's needed - if the server requires a client certificate.

    Default: ssl client cert = /usr/local/ssl/certs/smbclient.pem -

    ssl client key (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This is the private key for smbclient(1). It's only needed if the - client should have a certificate.

    Default: ssl client key = /usr/local/ssl/private/smbclient.pem -

    ssl compatibility (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This variable defines whether OpenSSL should be configured - for bug compatibility with other SSL implementations. This is - probably not desirable because currently no clients with SSL - implementations other than OpenSSL exist.

    Default: ssl compatibility = no

    ssl egd socket (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This option is used to define the location of the communiation socket of - an EGD or PRNGD daemon, from which entropy can be retrieved. This option - can be used instead of or together with the ssl entropy file - directive. 255 bytes of entropy will be retrieved from the daemon. -

    Default: none

    ssl entropy bytes (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This parameter is used to define the number of bytes which should - be read from the ssl entropy - file If a -1 is specified, the entire file will - be read. -

    Default: ssl entropy bytes = 255

    ssl entropy file (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This parameter is used to specify a file from which processes will - read "random bytes" on startup. In order to seed the internal pseudo - random number generator, entropy must be provided. On system with a - /dev/urandom device file, the processes - will retrieve its entropy from the kernel. On systems without kernel - entropy support, a file can be supplied that will be read on startup - and that will be used to seed the PRNG. -

    Default: none

    ssl hosts (G)

    See ssl hosts resign.

    ssl hosts resign (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    These two variables define whether Samba will go - into SSL mode or not. If none of them is defined, Samba will - allow only SSL connections. If the ssl hosts variable lists - hosts (by IP-address, IP-address range, net group or name), - only these hosts will be forced into SSL mode. If the ssl hosts resign variable lists hosts, only these - hosts will NOT be forced into SSL mode. The syntax for these two - variables is the same as for the hosts allow and hosts deny pair of variables, only - that the subject of the decision is different: It's not the access - right but whether SSL is used or not.

    The example below requires SSL connections from all hosts - outside the local net (which is 192.168.*.*).

    Default: ssl hosts = <empty string>

    ssl hosts resign = <empty string>

    Example: ssl hosts resign = 192.168.

    ssl require clientcert (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    If this variable is set to yes, the - server will not tolerate connections from clients that don't - have a valid certificate. The directory/file given in ssl CA certDir - and ssl CA certFile - will be used to look up the CAs that issued - the client's certificate. If the certificate can't be verified - positively, the connection will be terminated. If this variable - is set to no, clients don't need certificates. - Contrary to web applications you really should - require client certificates. In the web environment the client's - data is sensitive (credit card numbers) and the server must prove - to be trustworthy. In a file server environment the server's data - will be sensitive and the clients must prove to be trustworthy.

    Default: ssl require clientcert = no

    ssl require servercert (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    If this variable is set to yes, the - smbclient(1) - will request a certificate from the server. Same as - ssl require - clientcert for the server.

    Default: ssl require servercert = no -

    ssl server cert (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This is the file containing the server's certificate. - The server must have a certificate. The - file may also contain the server's private key. See later for - how certificates and private keys are created.

    Default: ssl server cert = <empty string> -

    ssl server key (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This file contains the private key of the server. If - this variable is not defined, the key is looked up in the - certificate file (it may be appended to the certificate). - The server must have a private key - and the certificate must - match this private key.

    Default: ssl server key = <empty string> -

    ssl version (G)

    This variable is part of SSL-enabled Samba. This - is only available if the SSL libraries have been compiled on your - system and the configure option --with-ssl was - given at configure time.

    This enumeration variable defines the versions of the - SSL protocol that will be used. ssl2or3 allows - dynamic negotiation of SSL v2 or v3, ssl2 results - in SSL v2, ssl3 results in SSL v3 and - tls1 results in TLS v1. TLS (Transport Layer - Security) is the new standard for SSL.

    Default: ssl version = "ssl2or3"Default: use spnego = yes

    This boolean parameter controls whether Samba - implments the CIFS UNIX extensions, as defined by HP. These - extensions enable CIFS to server UNIX clients to UNIX servers - better, and allow such things as symbolic links, hard links etc. + implments the CIFS UNIX extensions, as defined by HP. + These extensions enable Samba to better serve UNIX CIFS clients + by supporting features such as symbolic links, hard links, etc... These extensions require a similarly enabled client, and are of no current use to Windows clients.

    Due to the requirements of the utmp record, we + are required to create a unique identifier for the + incoming user. Enabling this option creates an n^2 + algorithm to find this number. This may impede + performance on large installations.

    See also the

    WARNINGS

    VERSION

    SEE ALSO

    AUTHOR

    , or printer-notifyprintnotify
    .

    The

    The printer-notifyprintnotify message-type sends a message to smbd which in turn sends a printer notify message to - any Windows NT clients connected to a printer. This message-type - takes an argument of the printer name to send notify messages to. + any Windows NT clients connected to a printer. This message-type + takes the following arguments: + +

    queuepause printername

    Send a queue pause change notify + message to the printer specified.

    queueresume printername

    Send a queue resume change notify + message for the printer specified.

    jobpause printername unixjobid

    Send a job pause change notify + message for the printer and unix jobid + specified.

    jobresume printername unixjobid

    Send a job resume change notify + message for the printer and unix jobid + specified.

    jobdelete printername unixjobid

    Send a job delete change notify + message for the printer and unix jobid + specified.

    + + Note that this message only sends notification that an + event has occured. It doesn't actually cause the + event to happen. + This message can only be sent to smbd.

    . +

    parameters

    VERSION

    SEE ALSO

    AUTHOR

    This HOWTO describes how to get winbind services up and running to control access and authenticate users on your Linux box using the winbind services which come with SAMBA 2.2.2.

    There is also some Solaris specific information in +docs/textdocs/Solaris-Winbind-HOWTO.txt. +Future revisions of this document will incorporate that +information.


    Introduction


    Requirements


    Testing Things Out


    Configure and compile SAMBA


    Configure nsswitch.confln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2

    And, in the case of Sun solaris:

    root# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1 +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1 +root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2

    Now, as root you need to edit /etc/nsswitch.conf


    Configure smb.conf


    Join the SAMBA server to the PDC domain


    Start up the winbindd daemon and test it!


    Fix the /etc/rc.d/init.d/smb startup filesFix the init.d startup scripts

    Linux

    The nmbd daemons are running. -To accomplish this task, you need to modify the /etc/init.d/smb -script to add commands to invoke this daemon in the proper sequence. My +> in RedHat and /etc/init.d/smb file starts up /etc/init.d/samba in Debian. +script to add commands to invoke this daemon in the proper sequence. My +startup script starts up smbd, @@ -1057,6 +1095,86 @@ CLASS="PROGRAMLISTING" return $RETVAL }


    Solaris

    On solaris, you need to modify the +/etc/init.d/samba.server startup script. It usually +only starts smbd and nmbd but should now start winbindd too. If you +have samba installed in /usr/local/samba/bin, +the file could contains something like this:

    ##
    +## samba.server
    +##
    +
    +if [ ! -d /usr/bin ]
    +then                    # /usr not mounted
    +        exit
    +fi
    +
    +killproc() {            # kill the named process(es)
    +        pid=`/usr/bin/ps -e |
    +             /usr/bin/grep -w $1 |
    +             /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
    +        [ "$pid" != "" ] && kill $pid
    +}
    + 
    +# Start/stop processes required for samba server
    +
    +case "$1" in
    +
    +'start')
    +#
    +# Edit these lines to suit your installation (paths, workgroup, host)
    +#
    +echo Starting SMBD
    +   /usr/local/samba/bin/smbd -D -s \
    +	/usr/local/samba/smb.conf
    +
    +echo Starting NMBD
    +   /usr/local/samba/bin/nmbd -D -l \
    +	/usr/local/samba/var/log -s /usr/local/samba/smb.conf
    +
    +echo Starting Winbind Daemon
    +   /usr/local/samba/bin/winbindd
    +   ;;
    +
    +'stop')
    +   killproc nmbd
    +   killproc smbd
    +   killproc winbindd
    +   ;;
    +
    +*)
    +   echo "Usage: /etc/init.d/samba.server { start | stop }"
    +   ;;
    +esac


    Restarting

    If you restart the


    Configure Winbind and PAM

    /lib/security directory.

    directory. On Solaris, the pam security +modules reside in /usr/lib/security.

    cp ../samba/source/nsswitch/pam_winbind.so /lib/security


    Linux/FreeBSD-specific PAM configuration

    The line to get rid of annoying double prompts for passwords.


    Solaris-specific configuration

    The /etc/pam.conf needs to be changed. I changed this file so that my Domain +users can logon both locally as well as telnet.The following are the changes +that I made.You can customize the pam.conf file as per your requirements,but +be sure of those changes because in the worst case it will leave your system +nearly impossible to boot.

    #
    +#ident	"@(#)pam.conf	1.14	99/09/16 SMI"
    +#
    +# Copyright (c) 1996-1999, Sun Microsystems, Inc.
    +# All Rights Reserved.
    +#
    +# PAM configuration
    +#
    +# Authentication management
    +#
    +login   auth required   /usr/lib/security/pam_winbind.so
    +login	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass 
    +login	auth required 	/usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass 
    +#
    +rlogin  auth sufficient /usr/lib/security/pam_winbind.so
    +rlogin  auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1
    +rlogin	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
    +#
    +dtlogin auth sufficient /usr/lib/security/pam_winbind.so
    +dtlogin	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
    +#
    +rsh	auth required	/usr/lib/security/$ISA/pam_rhosts_auth.so.1
    +other   auth sufficient /usr/lib/security/pam_winbind.so
    +other	auth required	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass
    +#
    +# Account management
    +#
    +login   account sufficient      /usr/lib/security/pam_winbind.so
    +login	account requisite	/usr/lib/security/$ISA/pam_roles.so.1 
    +login	account required	/usr/lib/security/$ISA/pam_unix.so.1 
    +#
    +dtlogin account sufficient      /usr/lib/security/pam_winbind.so
    +dtlogin	account requisite	/usr/lib/security/$ISA/pam_roles.so.1 
    +dtlogin	account required	/usr/lib/security/$ISA/pam_unix.so.1 
    +#
    +other   account sufficient      /usr/lib/security/pam_winbind.so
    +other	account requisite	/usr/lib/security/$ISA/pam_roles.so.1 
    +other	account required	/usr/lib/security/$ISA/pam_unix.so.1 
    +#
    +# Session management
    +#
    +other	session required	/usr/lib/security/$ISA/pam_unix.so.1 
    +#
    +# Password management
    +#
    +#other   password sufficient     /usr/lib/security/pam_winbind.so
    +other	password required	/usr/lib/security/$ISA/pam_unix.so.1 
    +dtsession auth required	/usr/lib/security/$ISA/pam_unix.so.1
    +#
    +# Support for Kerberos V5 authentication (uncomment to use Kerberos)
    +#
    +#rlogin	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
    +#login	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
    +#dtlogin	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
    +#other	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass
    +#dtlogin	account optional /usr/lib/security/$ISA/pam_krb5.so.1
    +#other	account optional /usr/lib/security/$ISA/pam_krb5.so.1
    +#other	session optional /usr/lib/security/$ISA/pam_krb5.so.1
    +#other	password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass

    I also added a try_first_pass line after the winbind.so line to get rid of +annoying double prompts for passwords.

    Now restart your Samba & try connecting through your application that you +configured in the pam.conf.


    Limitations


    Conclusion

    .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "RPCCLIENT" "1" "16 April 2002" "" "" +.TH "RPCCLIENT" "1" "15 August 2002" "" "" .SH NAME rpcclient \- tool for executing client side MS-RPC functions .SH SYNOPSIS .sp -\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c \fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s \fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] \fBserver\fR +\fBrpcclient\fR [ \fB-A authfile\fR ] [ \fB-c \fR ] [ \fB-d debuglevel\fR ] [ \fB-h\fR ] [ \fB-l logfile\fR ] [ \fB-N\fR ] [ \fB-s \fR ] [ \fB-U username[%password]\fR ] [ \fB-W workgroup\fR ] [ \fB-N\fR ] [ \fB-I destinationIP\fR ] \fBserver\fR .SH "DESCRIPTION" .PP This tool is part of the Sambasuite. @@ -55,6 +55,22 @@ planning on submitting a bug report to the Samba team (see \fIBUGS.txt\fR). \fB-h|--help\fR Print a summary of command line options. .TP +\fB-I IP-address\fR +\fIIP address\fR is the address of the server to connect to. +It should be specified in standard "a.b.c.d" notation. + +Normally the client would attempt to locate a named +SMB/CIFS server by looking it up via the NetBIOS name resolution +mechanism described above in the \fIname resolve order\fR +parameter above. Using this parameter will force the client +to assume that the server is on the machine with the specified IP +address and the NetBIOS name component of the resource being +connected to will be ignored. + +There is no default for this parameter. If not supplied, +it will be determined automatically by the client as described +above. +.TP \fB-l|--logfile=logbasename\fR File name for log/debug files. The extension \&'.client' will be appended. The log file is never removed diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5 index 692530334be..caa27103dbb 100644 --- a/docs/manpages/smb.conf.5 +++ b/docs/manpages/smb.conf.5 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMB.CONF" "5" "08 May 2002" "" "" +.TH "SMB.CONF" "5" "15 August 2002" "" "" .SH NAME smb.conf \- The configuration file for the Samba suite .SH "SYNOPSIS" @@ -657,18 +657,18 @@ each parameter for details. Note that some are synonyms. \fIldap filter\fR .TP 0.2i \(bu -\fIldap port\fR -.TP 0.2i -\(bu -\fIldap server\fR -.TP 0.2i -\(bu \fIldap ssl\fR .TP 0.2i \(bu \fIldap suffix\fR .TP 0.2i \(bu +\fIldap suffix\fR +.TP 0.2i +\(bu +\fIldap suffix\fR +.TP 0.2i +\(bu \fIlm announce\fR .TP 0.2i \(bu @@ -906,55 +906,7 @@ each parameter for details. Note that some are synonyms. \fIsource environment\fR .TP 0.2i \(bu -\fIssl\fR -.TP 0.2i -\(bu -\fIssl CA certDir\fR -.TP 0.2i -\(bu -\fIssl CA certFile\fR -.TP 0.2i -\(bu -\fIssl ciphers\fR -.TP 0.2i -\(bu -\fIssl client cert\fR -.TP 0.2i -\(bu -\fIssl client key\fR -.TP 0.2i -\(bu -\fIssl compatibility\fR -.TP 0.2i -\(bu -\fIssl egd socket\fR -.TP 0.2i -\(bu -\fIssl entropy bytes\fR -.TP 0.2i -\(bu -\fIssl entropy file\fR -.TP 0.2i -\(bu -\fIssl hosts\fR -.TP 0.2i -\(bu -\fIssl hosts resign\fR -.TP 0.2i -\(bu -\fIssl require clientcert\fR -.TP 0.2i -\(bu -\fIssl require servercert\fR -.TP 0.2i -\(bu -\fIssl server cert\fR -.TP 0.2i -\(bu -\fIssl server key\fR -.TP 0.2i -\(bu -\fIssl version\fR +\fIuse spnego\fR .TP 0.2i \(bu \fIstat cache\fR @@ -1605,6 +1557,11 @@ Default: \fBadd user script = \fR Example: \fBadd user script = /usr/local/samba/bin/add_user %u\fR +.TP +\fBadd group script (G)\fR +This is the full pathname to a script that will +be run \fBAS ROOT\fR by smbd(8) when a new group is requested. It will expand any \fI%g\fR to the group name passed. This script is only useful for installations using the Windows NT domain administration tools. + .TP \fBadmin users (S)\fR This is a list of users who will be granted @@ -2189,44 +2146,14 @@ Example: \fBdelete share command = /usr/local/bin/delshare\fR .TP \fBdelete user script (G)\fR This is the full pathname to a script that will -be run \fBAS ROOT\fR by \fBsmbd(8)\fRunder special circumstances -described below. +be run by \fBsmbd(8)\fR +when managing user's with remote RPC (NT) tools. -Normally, a Samba server requires that UNIX users are -created for all users accessing files on this server. For sites -that use Windows NT account databases as their primary user database -creating these users and keeping the user list in sync with the -Windows NT PDC is an onerous task. This option allows \fB smbd\fR to delete the required UNIX users \fBON -DEMAND\fR when a user accesses the Samba server and the -Windows NT user no longer exists. +This script is called when a remote client removes a user +from the server, normally using 'User Manager for Domains' or +\fBrpcclient\fR. -In order to use this option, \fBsmbd\fR must be -set to \fIsecurity = domain\fR or \fIsecurity = -user\fR and \fIdelete user script\fR -must be set to a full pathname for a script -that will delete a UNIX user given one argument of \fI%u\fR, -which expands into the UNIX user name to delete. - -When the Windows user attempts to access the Samba server, -at \fBlogin\fR (session setup in the SMB protocol) -time, \fBsmbd\fR contacts the \fIpassword server\fR and attempts to authenticate -the given user with the given password. If the authentication fails -with the specific Domain error code meaning that the user no longer -exists then \fBsmbd\fR attempts to find a UNIX user in -the UNIX password database that matches the Windows user account. If -this lookup succeeds, and \fIdelete user script\fR is -set then \fBsmbd\fR will all the specified script -\fBAS ROOT\fR, expanding any \fI%u\fR -argument to be the user name to delete. - -This script should delete the given UNIX username. In this way, -UNIX users are dynamically deleted to match existing Windows NT -accounts. - -See also security = domain, -\fIpassword server\fR -, \fIadd user script\fR -\&. +This script should delete the given UNIX username. Default: \fBdelete user script = \fR @@ -2744,7 +2671,7 @@ would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'. .TP -\fBforce directory security mode (S)\fR +\fBforce directory\fR This parameter controls what UNIX permission bits can be modified when a Windows NT client is manipulating the UNIX permission on a directory using the native NT security dialog box. @@ -3302,14 +3229,9 @@ code paths. Default : \fBlarge readwrite = yes\fR .TP \fBldap admin dn (G)\fR -This parameter is only available if Samba has been -configure to include the \fB--with-ldapsam\fR option -at compile time. This option should be considered experimental and -under active development. - The \fIldap admin dn\fR defines the Distinguished -Name (DN) name used by Samba to contact the ldap -server when retreiving user account information. The \fIldap +Name (DN) name used by Samba to contact the ldap server when retreiving +user account information. The \fIldap admin dn\fR is used in conjunction with the admin dn password stored in the \fIprivate/secrets.tdb\fR file. See the \fBsmbpasswd(8)\fRman @@ -3318,11 +3240,6 @@ page for more information on how to accmplish this. Default : \fBnone\fR .TP \fBldap filter (G)\fR -This parameter is only available if Samba has been -configure to include the \fB--with-ldapsam\fR option -at compile time. This option should be considered experimental and -under active development. - This parameter specifies the RFC 2254 compliant LDAP search filter. The default is to match the login name with the uid attribute for all entries matching the sambaAccount @@ -3330,43 +3247,13 @@ objectclass. Note that this filter should only return one entry. Default : \fBldap filter = (&(uid=%u)(objectclass=sambaAccount))\fR .TP -\fBldap port (G)\fR -This parameter is only available if Samba has been -configure to include the \fB--with-ldapsam\fR option -at compile time. This option should be considered experimental and -under active development. - -This option is used to control the tcp port number used to contact -the \fIldap server\fR. -The default is to use the stand LDAPS port 636. - -See Also: ldap ssl - -Default : \fBldap port = 636\fR -.TP -\fBldap server (G)\fR -This parameter is only available if Samba has been -configure to include the \fB--with-ldapsam\fR option -at compile time. This option should be considered experimental and -under active development. - -This parameter should contains the FQDN of the ldap directory -server which should be queried to locate user account information. - -Default : \fBldap server = localhost\fR -.TP \fBldap ssl (G)\fR -This parameter is only available if Samba has been -configure to include the \fB--with-ldapsam\fR option -at compile time. This option should be considered experimental and -under active development. - This option is used to define whether or not Samba should -use SSL when connecting to the \fIldap -server\fR. This is \fBNOT\fR related to -Samba SSL support which is enabled by specifying the +use SSL when connecting to the ldap server +This is \fBNOT\fR related to +Samba's previous SSL support which was enabled by specifying the \fB--with-ssl\fR option to the \fIconfigure\fR -script (see \fIssl\fR). +script. The \fIldap ssl\fR can be set to one of three values: (a) on - Always use SSL when contacting the @@ -3378,10 +3265,16 @@ Never use SSL when querying the directory, or (c) start_tls Default : \fBldap ssl = on\fR .TP \fBldap suffix (G)\fR -This parameter is only available if Samba has been -configure to include the \fB--with-ldapsam\fR option -at compile time. This option should be considered experimental and -under active development. +Default : \fBnone\fR +.TP +\fBldap user suffix (G)\fR +It specifies where users are added to the tree. + +Default : \fBnone\fR +.TP +\fBldap machine suffix (G)\fR +It specifies where machines should be +added to the ldap tree. Default : \fBnone\fR .TP @@ -3546,16 +3439,18 @@ you to have separate log files for each user or machine. Example: \fBlog file = /usr/local/samba/var/log.%m \fR.TP \fBlog level (G)\fR -The value of the parameter (an integer) allows +The value of the parameter (a astring) allows the debug level (logging level) to be specified in the -\fIsmb.conf\fR file. This is to give greater +\fIsmb.conf\fR file. This parameter has been +extended since 2.2.x series, now it allow to specify the debug +level for multiple debug classes. This is to give greater flexibility in the configuration of the system. The default will be the log level specified on the command line or level zero if none was specified. -Example: \fBlog level = 3\fR -.TP +Example: \fBlog level = 3 passdb:5 auth:10 winbind:2 +\fR.TP \fBlogon drive (G)\fR This parameter specifies the local path to which the home directory will be connected (see \fIlogon home\fR) @@ -4790,14 +4685,27 @@ arbitary passdb backend from the .so specified as a compulsary argument. Any characters after the (optional) second : are passed to the plugin for its own processing +.TP 0.2i +\(bu +\fBunixsam\fR - Allows samba to map all (other) available unix users + +This backend uses the standard unix database for retrieving users. Users included +in this pdb are NOT listed in samba user listings and users included in this pdb won't be +able to login. The use of this backend is to always be able to display the owner of a file +on the samba server - even when the user doesn't have a 'real' samba account in one of the +other passdb backends. + +This backend should always be the last backend listed, since it contains all users in +the unix passdb and might 'override' mappings if specified earlier. It's meant to only return +accounts for users that aren't covered by the previous backends. .RE .PP -Default: \fBpassdb backend = smbpasswd\fR +Default: \fBpassdb backend = smbpasswd unixsam\fR -Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd\fR +Example: \fBpassdb backend = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd unixsam\fR -Example: \fBpassdb backend = ldapsam_nua:ldaps://ldap.example.com\fR +Example: \fBpassdb backend = ldapsam_nua:ldaps://ldap.example.com unixsam\fR Example: \fBpassdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args tdbsam:/etc/samba/private/passdb.tdb\fR .TP @@ -6278,246 +6186,10 @@ Examples: \fBsource environment = |/etc/smb.conf.sh Example: \fBsource environment = /usr/local/smb_env_vars\fR .TP -\fBssl (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. +\fBuse spnego (G)\fR +This variable controls controls whether samba will try to use Simple and Protected NEGOciation (as specified by rfc2478) with WindowsXP and Windows2000sp2 clients to agree upon an authentication mechanism. As of samba 3.0alpha it must be set to "no" for these clients to join a samba domain controller. It can be set to "yes" to allow samba to participate in an AD domain controlled by a Windows2000 domain controller. -This variable enables or disables the entire SSL mode. If -it is set to no, the SSL-enabled Samba behaves -exactly like the non-SSL Samba. If set to yes, -it depends on the variables \fI ssl hosts\fR and \fIssl hosts resign\fR whether an SSL -connection will be required. - -Default: \fBssl = no\fR -.TP -\fBssl CA certDir (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This variable defines where to look up the Certification -Authorities. The given directory should contain one file for -each CA that Samba will trust. The file name must be the hash -value over the "Distinguished Name" of the CA. How this directory -is set up is explained later in this document. All files within the -directory that don't fit into this naming scheme are ignored. You -don't need this variable if you don't verify client certificates. - -Default: \fBssl CA certDir = /usr/local/ssl/certs -\fR.TP -\fBssl CA certFile (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This variable is a second way to define the trusted CAs. -The certificates of the trusted CAs are collected in one big -file and this variable points to the file. You will probably -only use one of the two ways to define your CAs. The first choice is -preferable if you have many CAs or want to be flexible, the second -is preferable if you only have one CA and want to keep things -simple (you won't need to create the hashed file names). You -don't need this variable if you don't verify client certificates. - -Default: \fBssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem -\fR.TP -\fBssl ciphers (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This variable defines the ciphers that should be offered -during SSL negotiation. You should not set this variable unless -you know what you are doing. -.TP -\fBssl client cert (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -The certificate in this file is used by \fBsmbclient(1)\fRif it exists. It's needed -if the server requires a client certificate. - -Default: \fBssl client cert = /usr/local/ssl/certs/smbclient.pem -\fR.TP -\fBssl client key (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This is the private key for \fBsmbclient(1)\fR. It's only needed if the -client should have a certificate. - -Default: \fBssl client key = /usr/local/ssl/private/smbclient.pem -\fR.TP -\fBssl compatibility (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This variable defines whether OpenSSL should be configured -for bug compatibility with other SSL implementations. This is -probably not desirable because currently no clients with SSL -implementations other than OpenSSL exist. - -Default: \fBssl compatibility = no\fR -.TP -\fBssl egd socket (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This option is used to define the location of the communiation socket of -an EGD or PRNGD daemon, from which entropy can be retrieved. This option -can be used instead of or together with the \fIssl entropy file\fR -directive. 255 bytes of entropy will be retrieved from the daemon. - -Default: \fBnone\fR -.TP -\fBssl entropy bytes (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This parameter is used to define the number of bytes which should -be read from the \fIssl entropy -file\fR If a -1 is specified, the entire file will -be read. - -Default: \fBssl entropy bytes = 255\fR -.TP -\fBssl entropy file (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This parameter is used to specify a file from which processes will -read "random bytes" on startup. In order to seed the internal pseudo -random number generator, entropy must be provided. On system with a -\fI/dev/urandom\fR device file, the processes -will retrieve its entropy from the kernel. On systems without kernel -entropy support, a file can be supplied that will be read on startup -and that will be used to seed the PRNG. - -Default: \fBnone\fR -.TP -\fBssl hosts (G)\fR -See \fI ssl hosts resign\fR. -.TP -\fBssl hosts resign (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -These two variables define whether Samba will go -into SSL mode or not. If none of them is defined, Samba will -allow only SSL connections. If the \fIssl hosts\fR variable lists -hosts (by IP-address, IP-address range, net group or name), -only these hosts will be forced into SSL mode. If the \fI ssl hosts resign\fR variable lists hosts, only these -hosts will \fBNOT\fR be forced into SSL mode. The syntax for these two -variables is the same as for the \fI hosts allow\fR and \fIhosts deny\fR pair of variables, only -that the subject of the decision is different: It's not the access -right but whether SSL is used or not. - -The example below requires SSL connections from all hosts -outside the local net (which is 192.168.*.*). - -Default: \fBssl hosts = \fR - -\fBssl hosts resign = \fR - -Example: \fBssl hosts resign = 192.168.\fR -.TP -\fBssl require clientcert (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -If this variable is set to yes, the -server will not tolerate connections from clients that don't -have a valid certificate. The directory/file given in \fIssl CA certDir\fR -and \fIssl CA certFile -\fRwill be used to look up the CAs that issued -the client's certificate. If the certificate can't be verified -positively, the connection will be terminated. If this variable -is set to no, clients don't need certificates. -Contrary to web applications you really \fBshould\fR -require client certificates. In the web environment the client's -data is sensitive (credit card numbers) and the server must prove -to be trustworthy. In a file server environment the server's data -will be sensitive and the clients must prove to be trustworthy. - -Default: \fBssl require clientcert = no\fR -.TP -\fBssl require servercert (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -If this variable is set to yes, the -\fBsmbclient(1)\fR -will request a certificate from the server. Same as -\fIssl require -clientcert\fR for the server. - -Default: \fBssl require servercert = no\fR -.TP -\fBssl server cert (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This is the file containing the server's certificate. -The server \fBmust\fR have a certificate. The -file may also contain the server's private key. See later for -how certificates and private keys are created. - -Default: \fBssl server cert = -\fR.TP -\fBssl server key (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This file contains the private key of the server. If -this variable is not defined, the key is looked up in the -certificate file (it may be appended to the certificate). -The server \fBmust\fR have a private key -and the certificate \fBmust\fR -match this private key. - -Default: \fBssl server key = -\fR.TP -\fBssl version (G)\fR -This variable is part of SSL-enabled Samba. This -is only available if the SSL libraries have been compiled on your -system and the configure option \fB--with-ssl\fR was -given at configure time. - -This enumeration variable defines the versions of the -SSL protocol that will be used. ssl2or3 allows -dynamic negotiation of SSL v2 or v3, ssl2 results -in SSL v2, ssl3 results in SSL v3 and -tls1 results in TLS v1. TLS (Transport Layer -Security) is the new standard for SSL. - -Default: \fBssl version = "ssl2or3"\fR +Default: \fBuse spnego = yes\fR .TP \fBstat cache (G)\fR This parameter determines if smbd(8)will use a cache in order to @@ -6698,9 +6370,9 @@ Example: \fBtotal print jobs = 5000\fR .TP \fBunix extensions(G)\fR This boolean parameter controls whether Samba -implments the CIFS UNIX extensions, as defined by HP. These -extensions enable CIFS to server UNIX clients to UNIX servers -better, and allow such things as symbolic links, hard links etc. +implments the CIFS UNIX extensions, as defined by HP. +These extensions enable Samba to better serve UNIX CIFS clients +by supporting features such as symbolic links, hard links, etc... These extensions require a similarly enabled client, and are of no current use to Windows clients. @@ -6983,6 +6655,12 @@ to add utmp or utmpx records (depending on the UNIX system) whenever a connection is made to a Samba server. Sites may use this to record the user connecting to a Samba share. +Due to the requirements of the utmp record, we +are required to create a unique identifier for the +incoming user. Enabling this option creates an n^2 +algorithm to find this number. This may impede +performance on large installations. + See also the \fI utmp directory\fR parameter. Default: \fButmp = no\fR diff --git a/docs/manpages/smbcontrol.1 b/docs/manpages/smbcontrol.1 index f3e6c843b59..d1479bff258 100644 --- a/docs/manpages/smbcontrol.1 +++ b/docs/manpages/smbcontrol.1 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "SMBCONTROL" "1" "08 May 2002" "" "" +.TH "SMBCONTROL" "1" "15 August 2002" "" "" .SH NAME smbcontrol \- send messages to smbd, nmbd or winbindd processes .SH SYNOPSIS @@ -47,7 +47,7 @@ One of: close-share, debug, force-election, ping , profile, debuglevel, profilelevel, -or printer-notify. +or printnotify. The close-share message-type sends a message to smbd which will then close the client connections to @@ -90,11 +90,40 @@ a "request profile level" message. The current profile level setting is returned by a "profilelevel" message. This can be sent to any smbd or nmbd destinations. -The printer-notify message-type sends a +The printnotify message-type sends a message to smbd which in turn sends a printer notify message to -any Windows NT clients connected to a printer. This message-type -takes an argument of the printer name to send notify messages to. -This message can only be sent to smbd. +any Windows NT clients connected to a printer. This message-type +takes the following arguments: +.RS +.TP +\fBqueuepause printername\fR +Send a queue pause change notify +message to the printer specified. +.TP +\fBqueueresume printername\fR +Send a queue resume change notify +message for the printer specified. +.TP +\fBjobpause printername unixjobid\fR +Send a job pause change notify +message for the printer and unix jobid +specified. +.TP +\fBjobresume printername unixjobid\fR +Send a job resume change notify +message for the printer and unix jobid +specified. +.TP +\fBjobdelete printername unixjobid\fR +Send a job delete change notify +message for the printer and unix jobid +specified. +.RE +.PP +Note that this message only sends notification that an +event has occured. It doesn't actually cause the +event to happen. +This message can only be sent to smbd. .TP \fBparameters\fR any parameters required for the message-type From 14c7250ab4c3d1349e059f6bf3e91ce8fcbdf2ec Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 15 Aug 2002 19:34:57 +0000 Subject: [PATCH 243/262] Removed unused variable. (This used to be commit 23f1b839e6287089511cd51ceed298d6a6d65a89) --- source3/nmbd/nmbd_processlogon.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index 605cdb435b0..a9952ff72bb 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -227,7 +227,6 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", case SAMLOGON: { char *q = buf + 2; - char *q1; fstring asccomp; q += 2; From ef4ff1bc48b7ff1f699384b38b298393e4f42a0c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 15 Aug 2002 19:37:34 +0000 Subject: [PATCH 244/262] Rename unknown_0 field in create_user2 reply in the actual struct. Remove 9th place leading zero from some constants. (This used to be commit 876e7b2bf45aad40282fd0ccddadf01df23d8d41) --- source3/include/rpc_samr.h | 53 +++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index d9707c2ebfb..11438ae0676 100644 --- a/source3/include/rpc_samr.h +++ b/source3/include/rpc_samr.h @@ -27,10 +27,8 @@ #ifndef _RPC_SAMR_H /* _RPC_SAMR_H */ #define _RPC_SAMR_H - #include "rpc_misc.h" - /******************************************************************* the following information comes from a QuickView on samsrv.dll, and gives an idea of exactly what is needed: @@ -180,17 +178,17 @@ SamrTestPrivateFunctionsUser /* Access bits to Domain-objects */ -#define DOMAIN_ACCESS_LOOKUP_INFO_1 0x000000001 -#define DOMAIN_ACCESS_SET_INFO_1 0x000000002 -#define DOMAIN_ACCESS_LOOKUP_INFO_2 0x000000004 -#define DOMAIN_ACCESS_SET_INFO_2 0x000000008 -#define DOMAIN_ACCESS_CREATE_USER 0x000000010 -#define DOMAIN_ACCESS_CREATE_GROUP 0x000000020 -#define DOMAIN_ACCESS_CREATE_ALIAS 0x000000040 -#define DOMAIN_ACCESS_UNKNOWN_80 0x000000080 -#define DOMAIN_ACCESS_ENUM_ACCOUNTS 0x000000100 -#define DOMAIN_ACCESS_OPEN_ACCOUNT 0x000000200 -#define DOMAIN_ACCESS_SET_INFO_3 0x000000400 +#define DOMAIN_ACCESS_LOOKUP_INFO_1 0x00000001 +#define DOMAIN_ACCESS_SET_INFO_1 0x00000002 +#define DOMAIN_ACCESS_LOOKUP_INFO_2 0x00000004 +#define DOMAIN_ACCESS_SET_INFO_2 0x00000008 +#define DOMAIN_ACCESS_CREATE_USER 0x00000010 +#define DOMAIN_ACCESS_CREATE_GROUP 0x00000020 +#define DOMAIN_ACCESS_CREATE_ALIAS 0x00000040 +#define DOMAIN_ACCESS_UNKNOWN_80 0x00000080 +#define DOMAIN_ACCESS_ENUM_ACCOUNTS 0x00000100 +#define DOMAIN_ACCESS_OPEN_ACCOUNT 0x00000200 +#define DOMAIN_ACCESS_SET_INFO_3 0x00000400 #define DOMAIN_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ DOMAIN_ACCESS_SET_INFO_3 | \ @@ -224,17 +222,17 @@ SamrTestPrivateFunctionsUser /* Access bits to User-objects */ -#define USER_ACCESS_GET_NAME_ETC 0x000000001 -#define USER_ACCESS_GET_LOCALE 0x000000002 -#define USER_ACCESS_SET_LOC_COM 0x000000004 -#define USER_ACCESS_GET_LOGONINFO 0x000000008 -#define USER_ACCESS_UNKNOWN_10 0x000000010 -#define USER_ACCESS_SET_ATTRIBUTES 0x000000020 -#define USER_ACCESS_CHANGE_PASSWORD 0x000000040 -#define USER_ACCESS_SET_PASSWORD 0x000000080 -#define USER_ACCESS_GET_GROUPS 0x000000100 -#define USER_ACCESS_UNKNOWN_200 0x000000200 -#define USER_ACCESS_UNKNOWN_400 0x000000400 +#define USER_ACCESS_GET_NAME_ETC 0x00000001 +#define USER_ACCESS_GET_LOCALE 0x00000002 +#define USER_ACCESS_SET_LOC_COM 0x00000004 +#define USER_ACCESS_GET_LOGONINFO 0x00000008 +#define USER_ACCESS_UNKNOWN_10 0x00000010 +#define USER_ACCESS_SET_ATTRIBUTES 0x00000020 +#define USER_ACCESS_CHANGE_PASSWORD 0x00000040 +#define USER_ACCESS_SET_PASSWORD 0x00000080 +#define USER_ACCESS_GET_GROUPS 0x00000100 +#define USER_ACCESS_UNKNOWN_200 0x00000200 +#define USER_ACCESS_UNKNOWN_400 0x00000400 #define USER_ALL_ACCESS ( STANDARD_RIGHTS_REQUIRED_ACCESS | \ USER_ACCESS_UNKNOWN_400 | \ @@ -316,9 +314,6 @@ SamrTestPrivateFunctionsUser #define ALIAS_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ ALIAS_ACCESS_LOOKUP_INFO ) - - - typedef struct _DISP_USER_INFO { SAM_ACCOUNT *sam; } DISP_USER_INFO; @@ -1651,7 +1646,7 @@ typedef struct r_samr_create_user_info { POLICY_HND user_pol; /* policy handle associated with user */ - uint32 unknown_0; /* 0x0007 03ff */ + uint32 access_granted; uint32 user_rid; /* user RID */ NTSTATUS status; /* return status */ @@ -2025,6 +2020,4 @@ typedef struct r_samr_set_domain_info } SAMR_R_SET_DOMAIN_INFO; - #endif /* _RPC_SAMR_H */ - From 9b38f76ab10a015ade9da2c5c9bafd43e3ef258c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 15 Aug 2002 19:40:34 +0000 Subject: [PATCH 245/262] Rename unknown_0 field in create_user2 reply in the actual struct. (This used to be commit 482d873c26bf02e27ffcd92042b476eda765a5ff) --- source3/rpc_parse/parse_samr.c | 2 +- source3/rpc_server/srv_samr_nt.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index d3634407270..1137993bb60 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5069,7 +5069,7 @@ BOOL samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER * r_u, if(!smb_io_pol_hnd("user_pol", &r_u->user_pol, ps, depth)) return False; - if(!prs_uint32("access_granted", ps, depth, &r_u->unknown_0)) + if(!prs_uint32("access_granted", ps, depth, &r_u->access_granted)) return False; if(!prs_uint32("user_rid ", ps, depth, &r_u->user_rid)) return False; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index f427eb70462..1a09917ac7b 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2361,7 +2361,10 @@ NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_ } r_u->user_rid=pdb_get_user_rid(sam_pass); - r_u->unknown_0 = 0x000703ff; + + /* This should probably be some subset of q_u->access_mask */ + + r_u->access_granted = 0x000703ff; pdb_free_sam(&sam_pass); From 298f956eaf7cbd362be8494f315a49d126a2c0ea Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 15 Aug 2002 22:03:22 +0000 Subject: [PATCH 246/262] The unused variable was actually needed. The correct fix is to move it inside an #ifdef HAVE_ADS to avoid the warning and breaking the build. (-: (This used to be commit a8c4febdb760beb669048c2bf2bb0a0b1c5ed472) --- source3/nmbd/nmbd_processlogon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c index a9952ff72bb..d6605d08f56 100644 --- a/source3/nmbd/nmbd_processlogon.c +++ b/source3/nmbd/nmbd_processlogon.c @@ -305,7 +305,7 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n", else { GUID domain_guid; pstring domain; - char *component, *dc; + char *component, *dc, *q1; uint8 size; safe_strcpy(domain, lp_realm(), sizeof(domain)); From 88d321becdcff10f52a629946fb300d158fcc2fa Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 16 Aug 2002 00:25:48 +0000 Subject: [PATCH 247/262] Merge of netbios namecache code from APPLIANCE_HEAD. Tridge suggested a generic caching mechanism for Samba to avoid the proliferation of little cache files hanging around limpet like in the locks directory. Someone should probably implement this at some stage. (This used to be commit dad31483b3bd1790356ef1e40ac62624a403bce8) --- source3/Makefile.in | 2 +- source3/lib/util_str.c | 12 ++ source3/libsmb/namecache.c | 252 ++++++++++++++++++++++++++++++++++++ source3/libsmb/namequery.c | 28 +++- source3/nsswitch/winbindd.c | 2 + source3/param/loadparm.c | 6 + source3/smbd/server.c | 2 + 7 files changed, 299 insertions(+), 5 deletions(-) create mode 100644 source3/libsmb/namecache.c diff --git a/source3/Makefile.in b/source3/Makefile.in index b96ce8b1439..696a80c412a 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -166,7 +166,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \ libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \ libsmb/clioplock.o libsmb/errormap.o libsmb/clirap2.o \ libsmb/passchange.o libsmb/unexpected.o libsmb/doserr.o \ - $(RPC_PARSE_OBJ1) + libsmb/namecache.o $(RPC_PARSE_OBJ1) LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \ rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o \ diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 9dc80c89dbc..3b5ceb2217c 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -212,6 +212,18 @@ int strwicmp(const char *psz1, const char *psz2) } +/* Convert a string to upper case, but don't modify it */ + +char *strupper_static(char *s) +{ + static pstring str; + + pstrcpy(str, s); + strupper(str); + + return str; +} + /******************************************************************* convert a string to "normal" form ********************************************************************/ diff --git a/source3/libsmb/namecache.c b/source3/libsmb/namecache.c new file mode 100644 index 00000000000..fc09d8eac2a --- /dev/null +++ b/source3/libsmb/namecache.c @@ -0,0 +1,252 @@ +/* + Unix SMB/CIFS implementation. + + NetBIOS name cache module. + + Copyright (C) Tim Potter, 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + +static BOOL done_namecache_init; +static BOOL enable_namecache; +static TDB_CONTEXT *namecache_tdb; + +struct nc_value { + time_t expiry; /* When entry expires */ + int count; /* Number of addresses */ + struct in_addr ip_list[0]; /* Address list */ +}; + +/* Initialise namecache system */ + +void namecache_enable(void) +{ + /* Check if we have been here before, or name caching disabled + by setting the name cache timeout to zero. */ + + if (done_namecache_init) + return; + + done_namecache_init = True; + + if (lp_name_cache_timeout() == 0) { + DEBUG(5, ("namecache_init: disabling netbios name cache\n")); + return; + } + + /* Open namecache tdb in read/write or readonly mode */ + + namecache_tdb = tdb_open_log( + lock_path("namecache.tdb"), 0, + TDB_DEFAULT, O_RDWR | O_CREAT, 0644); + + if (!namecache_tdb) { + DEBUG(5, ("namecache_init: could not open %s\n", + lock_path("namecache.tdb"))); + return; + } + + DEBUG(5, ("namecache_init: enabling netbios namecache, timeout %d " + "seconds\n", lp_name_cache_timeout())); + + enable_namecache = True; +} + +/* Return a key for a name and name type. The caller must free + retval.dptr when finished. */ + +static TDB_DATA namecache_key(const char *name, int name_type) +{ + TDB_DATA retval; + char *keystr; + + asprintf(&keystr, "%s#%02X", strupper_static(name), name_type); + + retval.dsize = strlen(keystr) + 1; + retval.dptr = keystr; + + return retval; +} + +/* Return a data value for an IP list. The caller must free + retval.dptr when finished. */ + +static TDB_DATA namecache_value(struct in_addr *ip_list, int num_names, + time_t expiry) +{ + TDB_DATA retval; + struct nc_value *value; + int size; + + size = sizeof(struct nc_value) + sizeof(struct in_addr) * + num_names; + + value = (struct nc_value *)malloc(size); + + value->expiry = expiry; + value->count = num_names; + + memcpy(value->ip_list, ip_list, num_names * sizeof(struct in_addr)); + + retval.dptr = (char *)value; + retval.dsize = size; + + return retval; +} + +/* Store a name in the name cache */ + +void namecache_store(const char *name, int name_type, + int num_names, struct in_addr *ip_list) +{ + TDB_DATA key, value; + time_t expiry; + int i; + + if (!enable_namecache) + return; + + DEBUG(5, ("namecache_store: storing %d address%s for %s#%02x: ", + num_names, num_names == 1 ? "": "es", name, name_type)); + + for (i = 0; i < num_names; i++) + DEBUGADD(5, ("%s%s", inet_ntoa(ip_list[i]), + i == (num_names - 1) ? "" : ", ")); + + DEBUGADD(5, ("\n")); + + key = namecache_key(name, name_type); + + /* Cache pdc location or dc lists for only a little while + otherwise if we lock on to a bad DC we can potentially be + out of action for the entire cache timeout time! */ + + if (name_type != 0x1b || name_type != 0x1c) + expiry = time(NULL) + 10; + else + expiry = time(NULL) + lp_name_cache_timeout(); + + value = namecache_value(ip_list, num_names, expiry); + + tdb_store(namecache_tdb, key, value, TDB_REPLACE); + + free(key.dptr); + free(value.dptr); +} + +/* Look up a name in the name cache. Return a mallocated list of IP + addresses if the name is contained in the cache. */ + +BOOL namecache_fetch(const char *name, int name_type, struct in_addr **ip_list, + int *num_names) +{ + TDB_DATA key, value; + struct nc_value *data; + time_t now; + int i; + + if (!enable_namecache) + return False; + + /* Read value */ + + key = namecache_key(name, name_type); + + value = tdb_fetch(namecache_tdb, key); + + if (!value.dptr) { + DEBUG(5, ("namecache_fetch: %s#%02x not found\n", + name, name_type)); + goto done; + } + + data = (struct nc_value *)value.dptr; + + /* Check expiry time */ + + now = time(NULL); + + if (now > data->expiry) { + + DEBUG(5, ("namecache_fetch: entry for %s#%02x expired\n", + name, name_type)); + + tdb_delete(namecache_tdb, key); + + value = tdb_null; + + goto done; + } + + if ((data->expiry - now) > lp_name_cache_timeout()) { + + /* Someone may have changed the system time on us */ + + DEBUG(5, ("namecache_fetch: entry for %s#%02x has bad expiry\n", + name, name_type)); + + tdb_delete(namecache_tdb, key); + + value = tdb_null; + + goto done; + } + + /* Extract and return namelist */ + + *ip_list = (struct in_addr *)malloc( + sizeof(struct in_addr) * data->count); + + memcpy(*ip_list, data->ip_list, sizeof(struct in_addr) * + data->count); + + *num_names = data->count; + + DEBUG(5, ("namecache_fetch: returning %d address%s for %s#%02x: ", + *num_names, *num_names == 1 ? "" : "es", name, name_type)); + + for (i = 0; i < *num_names; i++) + DEBUGADD(5, ("%s%s", inet_ntoa((*ip_list)[i]), + i == (*num_names - 1) ? "" : ", ")); + + DEBUGADD(5, ("\n")); + +done: + SAFE_FREE(key.dptr); + SAFE_FREE(value.dptr); + + return value.dsize > 0; +} + +/* Flush all names from the name cache */ + +void namecache_flush(void) +{ + int result; + + if (!namecache_tdb) + return; + + result = tdb_traverse(namecache_tdb, tdb_traverse_delete_fn, NULL); + + if (result == -1) + DEBUG(5, ("namecache_flush: error deleting cache entries\n")); + else + DEBUG(5, ("namecache_flush: deleted %d cache entr%s\n", + result, result == 1 ? "y" : "ies")); +} diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 3382ce4f4a0..40a353fa8b6 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -783,7 +783,7 @@ static BOOL resolve_hosts(const char *name, *********************************************************/ static BOOL internal_resolve_name(const char *name, int name_type, - struct in_addr **return_iplist, int *return_count) + struct in_addr **return_iplist, int *return_count) { pstring name_resolve_list; fstring tok; @@ -816,6 +816,15 @@ static BOOL internal_resolve_name(const char *name, int name_type, return True; } + /* Check netbios name cache */ + + if (namecache_fetch(name, name_type, return_iplist, return_count)) { + + /* This could be a negative response */ + + return (*return_count > 0); + } + pstrcpy(name_resolve_list, lp_name_resolve_order()); ptr = name_resolve_list; if (!ptr || !*ptr) @@ -823,9 +832,16 @@ static BOOL internal_resolve_name(const char *name, int name_type, while (next_token(&ptr, tok, LIST_SEP, sizeof(tok))) { if((strequal(tok, "host") || strequal(tok, "hosts"))) { - if (name_type == 0x20 && resolve_hosts(name, return_iplist, return_count)) { - result = True; - goto done; + if (name_type == 0x20) { + if (resolve_hosts(name, return_iplist, return_count)) { + result = True; + goto done; + } else { + + /* Store negative lookup result */ + + namecache_store(name, name_type, 0, NULL); + } } } else if(strequal( tok, "lmhosts")) { if (resolve_lmhosts(name, name_type, return_iplist, return_count)) { @@ -897,6 +913,10 @@ static BOOL internal_resolve_name(const char *name, int name_type, *return_iplist = nodupes_iplist; *return_count = nodupes_count; } + + /* Save in name cache */ + + namecache_store(name, name_type, *return_count, *return_iplist); /* Display some debugging info */ diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c index 047ea1accca..256c0203c0e 100644 --- a/source3/nsswitch/winbindd.c +++ b/source3/nsswitch/winbindd.c @@ -691,6 +691,8 @@ int winbind_setup_common(void) } + namecache_enable(); /* Enable netbios namecache */ + /* Get list of domains we look up requests for. This includes the domain which we are a member of as well as any trusted domains. */ diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 0967134b9b0..9e4ce615e81 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -260,6 +260,7 @@ typedef struct BOOL bUnixExtensions; BOOL bDisableNetbios; int restrict_anonymous; + int name_cache_timeout; } global; @@ -838,6 +839,8 @@ static struct parm_struct parm_table[] = { {"hostname lookups", P_BOOL, P_GLOBAL, &Globals.bHostnameLookups, NULL, NULL, 0}, {"write cache size", P_INTEGER, P_LOCAL, &sDefault.iWriteCacheSize, NULL, NULL, FLAG_SHARE}, + {"name cache timeout", P_INTEGER, P_GLOBAL, &Globals.name_cache_timeout, NULL, NULL, 0}, + {"Printing Options", P_SEP, P_SEPARATOR}, {"total print jobs", P_INTEGER, P_GLOBAL, &Globals.iTotalPrintJobs, NULL, NULL, FLAG_PRINT}, @@ -1375,6 +1378,8 @@ static void init_globals(void) Globals.bWinbindEnumGroups = True; Globals.bWinbindUseDefaultDomain = False; + Globals.name_cache_timeout = 660; /* In seconds */ + Globals.bUseSpnego = True; string_set(&Globals.smb_ports, SMB_PORTS); @@ -1740,6 +1745,7 @@ FN_LOCAL_CHAR(lp_magicchar, magic_char) FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time) FN_GLOBAL_BOOL(lp_hide_local_users, &Globals.bHideLocalUsers) FN_GLOBAL_BOOL(lp_algorithmic_rid_base, &Globals.bAlgorithmicRidBase) +FN_GLOBAL_INTEGER(lp_name_cache_timeout, &Globals.name_cache_timeout) typedef struct _param_opt_struct param_opt_struct; struct _param_opt_struct { diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 45295896e85..41b55b96229 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -881,6 +881,8 @@ static void usage(char *pname) * everything after this point is run after the fork() */ + namecache_enable(); + if (!locking_init(0)) exit(1); From 54e964a0fb0958f603f90ba5995586b21ee52266 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 16 Aug 2002 07:04:37 +0000 Subject: [PATCH 248/262] Fix segfault in the new NTLMSSP code. jmcd: can you look at this - what exactly were you trying to do here? Andrew Bartlett (This used to be commit 81b675b54d86d196fb2035dc5d22781160518beb) --- source3/smbd/sesssetup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index bb78129667c..78dd66a018b 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -332,12 +332,11 @@ static int reply_spnego_negotiate(connection_struct *conn, fstrcat(dnsname, lp_realm()); strlower(dnsname); - msrpc_gen(&struct_blob, "aaaaa", + msrpc_gen(&struct_blob, "aaaa", 2, lp_workgroup(), 1, global_myname, 4, dnsdomname, - 3, dnsname, - 0, NULL); + 3, dnsname); msrpc_gen(&chal, "CdUdbddB", "NTLMSSP", From b92cda9772a23a7d46171144b1f0af860142e590 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 16 Aug 2002 07:56:08 +0000 Subject: [PATCH 249/262] Add some const to the 'in' paramaters for these functions. Andrew Bartlett (This used to be commit 23f332178526877e9670515eb7c614b81fca21a9) --- source3/smbd/uid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index a5083ce75d0..c0bacf8f910 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -592,7 +592,7 @@ DOM_SID *gid_to_sid(DOM_SID *psid, gid_t gid) was done correctly, False if not. sidtype is set by this function. *****************************************************************/ -BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype) +BOOL sid_to_uid(const DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype) { fstring sid_str; @@ -668,7 +668,7 @@ BOOL sid_to_uid(DOM_SID *psid, uid_t *puid, enum SID_NAME_USE *sidtype) was done correctly, False if not. *****************************************************************/ -BOOL sid_to_gid(DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype) +BOOL sid_to_gid(const DOM_SID *psid, gid_t *pgid, enum SID_NAME_USE *sidtype) { fstring dom_name, name, sid_str; enum SID_NAME_USE name_type; From 51f62926b3bae5b20dc7610b8261431f2d4d4a84 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Fri, 16 Aug 2002 08:09:55 +0000 Subject: [PATCH 250/262] Re-add the last empty item to the NTLMSSP info list, but this time do it with an empty string, not a NULL pointer... Also, check for security=ads before giving a kerberos spnego response. (This used to be commit 6eca417d1c29c7c18455f8290cad86fb1444e615) --- source3/smbd/sesssetup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 78dd66a018b..8fb5a50697b 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -266,7 +266,7 @@ static int reply_spnego_negotiate(connection_struct *conn, DEBUG(3,("Got secblob of size %d\n", secblob.length)); #ifdef HAVE_KRB5 - if (got_kerberos) { + if (got_kerberos && (SEC_ADS == lp_security())) { int ret = reply_spnego_kerberos(conn, inbuf, outbuf, length, bufsize, &secblob); data_blob_free(&secblob); @@ -332,11 +332,12 @@ static int reply_spnego_negotiate(connection_struct *conn, fstrcat(dnsname, lp_realm()); strlower(dnsname); - msrpc_gen(&struct_blob, "aaaa", + msrpc_gen(&struct_blob, "aaaaa", 2, lp_workgroup(), 1, global_myname, 4, dnsdomname, - 3, dnsname); + 3, dnsname, + 0, ""); msrpc_gen(&chal, "CdUdbddB", "NTLMSSP", From fbaf4d07ae32c1052683ca0cae9ecdb6b9ed2521 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 16 Aug 2002 08:46:03 +0000 Subject: [PATCH 251/262] Make the 'guest account' always have a RID of DOMAIN_USER_RID_GUEST. Andrew Bartlett (This used to be commit 4725d7d04936335cbd85bd6ac5096c50fed93671) --- source3/passdb/passdb.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index c800cf5ed9c..fdcda0268dc 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -774,6 +774,8 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid) if (pdb_getsampwnam(sam_user, pass->pw_name)) { sid_copy(psid, pdb_get_user_sid(sam_user)); + } else if (strcmp(pass->pw_name, lp_guestaccount()) == 0) { + sid_append_rid(psid, DOMAIN_USER_RID_GUEST); } else { sid_append_rid(psid, fallback_pdb_uid_to_user_rid(uid)); } @@ -839,15 +841,27 @@ BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_ } if (!pdb_rid_is_user(rid)) { - DEBUG(3, ("local_sid_to_uid: sid '%s' cannot be mapped to a uid algorithmicly becous it is a group\n", sid_to_string(str, psid))); + DEBUG(3, ("local_sid_to_uid: sid '%s' cannot be mapped to a uid algorithmicly becouse it is a group\n", sid_to_string(str, psid))); return False; } - *puid = fallback_pdb_user_rid_to_uid(rid); - - DEBUG(5,("local_sid_to_uid: SID %s algorithmicly mapped to %ld mapped becouse SID was not found in passdb.\n", - sid_to_string(str, psid), (signed long int)(*puid))); - return False; + if (rid == DOMAIN_USER_RID_GUEST) { + struct passwd *pw = getpwnam_alloc(lp_guestaccount()); + if (!pw) { + DEBUG(1, ("getpwnam on guest account '%s' failed!\n", lp_guestaccount())); + return False; + } + *puid = pw->pw_uid; + passwd_free(&pw); + DEBUG(5,("local_sid_to_uid: Guest account (SID %s) mapped to guest account id %ld.\n", + sid_to_string(str, psid), (signed long int)(*puid))); + } else { + + *puid = fallback_pdb_user_rid_to_uid(rid); + + DEBUG(5,("local_sid_to_uid: SID %s algorithmicly mapped to %ld mapped becouse SID was not found in passdb.\n", + sid_to_string(str, psid), (signed long int)(*puid))); + } } *name_type = SID_NAME_USER; From b84315e2d583ad4bf06b5e43c3c1046a751326b6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 16 Aug 2002 08:47:10 +0000 Subject: [PATCH 252/262] Return the error if get_group_domain_entries() fails. (This used to be commit bc9e9e3e2e0d861f34de26a9ef8b627a86c9954d) --- source3/rpc_server/srv_samr_nt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 1a09917ac7b..ee404534823 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1081,7 +1081,9 @@ NTSTATUS _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAM DEBUG(5,("samr_reply_enum_dom_groups: %d\n", __LINE__)); /* the domain group array is being allocated in the function below */ - get_group_domain_entries(p->mem_ctx, &grp, &sid, q_u->start_idx, &num_entries, MAX_SAM_ENTRIES); + if (!NT_STATUS_IS_OK(r_u->status = get_group_domain_entries(p->mem_ctx, &grp, &sid, q_u->start_idx, &num_entries, MAX_SAM_ENTRIES))) { + return r_u->status; + } make_group_sam_entry_list(p->mem_ctx, &r_u->sam, &r_u->uni_grp_name, num_entries, grp); From 4ed429481c6aa2517b8b1615f95900d7db372cd6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 16 Aug 2002 15:36:37 +0000 Subject: [PATCH 253/262] Fairly large change to printing code. * removed support for PHANTOM_DEVMODE printer data * s/NT_PRINTER_PARAM/REGISTRY_VALUE/g - This was a good bit of work. Everything seems stable, but is not complete. * support for printer data keys other than PrinterDriverData in the store and fetch routines. Still needs to be plugged into the XxxPrinterDataEx() calls. Tested against NT4.0 & 2k. Like I said, it's not done, but doesn't crash so it shouldn't upset anyone (unless you're trying to build a Samba printer server off of HEAD). More work to come. Should settle by Monday. jerry (This used to be commit 7ba7c04c0e961618c82c2112b9627af114c6cc42) --- source3/include/nt_printing.h | 31 +- source3/printing/nt_printing.c | 746 ++++++++++++---------------- source3/registry/reg_frontend.c | 91 +++- source3/registry/reg_printing.c | 6 +- source3/rpc_parse/parse_spoolss.c | 36 -- source3/rpc_server/srv_spoolss_nt.c | 724 ++++++++++----------------- 6 files changed, 676 insertions(+), 958 deletions(-) diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 57181c66591..6303136894a 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -174,14 +174,26 @@ typedef struct nt_printer_driver_info_level NT_PRINTER_DRIVER_INFO_LEVEL_6 *info_6; } NT_PRINTER_DRIVER_INFO_LEVEL; -typedef struct nt_printer_param -{ - fstring value; - uint32 type; - uint8 *data; - int data_len; - struct nt_printer_param *next; -} NT_PRINTER_PARAM; +/* predefined registry key names for printer data */ + +#define SPOOL_PRINTERDATA_KEY "PrinterDriverData" +#define SPOOL_DSSPOOLER_KEY "DsSpooler" +#define SPOOL_DSDRIVER_KEY "DsDriver" +#define SPOOL_DSUSER_KEY "DsUser" + +/* container for a single registry key */ + +typedef struct { + char *name; + REGVAL_CTR values; +} NT_PRINTER_KEY; + +/* container for all printer data */ + +typedef struct { + int num_keys; + NT_PRINTER_KEY *keys; +} NT_PRINTER_DATA; typedef struct ntdevicemode { @@ -246,9 +258,8 @@ typedef struct nt_printer_info_level_2 fstring printprocessor; fstring datatype; fstring parameters; - NT_PRINTER_PARAM *specific; + NT_PRINTER_DATA data; SEC_DESC_BUF *secdesc_buf; - /* not used but ... and how ??? */ uint32 changeid; uint32 c_setprinter; uint32 setuptime; diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index e9ebb89d605..c497c65bfea 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -1962,22 +1962,52 @@ static int pack_devicemode(NT_DEVICEMODE *nt_devmode, char *buf, int buflen) } /**************************************************************************** -****************************************************************************/ -static int pack_specifics(NT_PRINTER_PARAM *param, char *buf, int buflen) + Pack all values in all printer keys + ***************************************************************************/ + +static int pack_values(NT_PRINTER_DATA *data, char *buf, int buflen) { - int len = 0; + int len = 0; + int i, j; + REGISTRY_VALUE *val; + REGVAL_CTR *val_ctr; + pstring path; + int num_values; - while (param != NULL) { - len += tdb_pack(buf+len, buflen-len, "pfdB", - param, - param->value, - param->type, - param->data_len, - param->data); - param=param->next; + if ( !data ) + return 0; + + /* loop over all keys */ + + for ( i=0; inum_keys; i++ ) + { + val_ctr = &data->keys[i].values; + num_values = regval_ctr_numvals( val_ctr ); + + /* loop over all values */ + + for ( j=0; j\ */ + + val = regval_ctr_specific_value( val_ctr, j ); + pstrcpy( path, data->keys[i].name ); + pstrcat( path, "\\" ); + pstrcat( path, regval_name(val) ); + + len += tdb_pack(buf+len, buflen-len, "pPdB", + val, + path, + regval_type(val), + regval_size(val), + regval_data_p(val) ); + } + } - len += tdb_pack(buf+len, buflen-len, "p", param); + /* terminator */ + + len += tdb_pack(buf+len, buflen-len, "p", NULL); return len; } @@ -2071,7 +2101,7 @@ static WERROR update_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info) len += pack_devicemode(info->devmode, buf+len, buflen-len); - len += pack_specifics(info->specific, buf+len, buflen-len); + len += pack_values( &info->data, buf+len, buflen-len ); if (buflen != len) { char *tb; @@ -2110,89 +2140,6 @@ done: } -/**************************************************************************** -****************************************************************************/ -void add_a_specific_param(NT_PRINTER_INFO_LEVEL_2 *info_2, NT_PRINTER_PARAM **param) -{ - NT_PRINTER_PARAM *current; - - DEBUG(108,("add_a_specific_param\n")); - - (*param)->next=NULL; - - if (info_2->specific == NULL) - { - info_2->specific=*param; - } - else - { - current=info_2->specific; - while (current->next != NULL) { - current=current->next; - } - current->next=*param; - } - - *param = NULL; -} - -/**************************************************************************** -****************************************************************************/ -BOOL unlink_specific_param_if_exist(NT_PRINTER_INFO_LEVEL_2 *info_2, NT_PRINTER_PARAM *param) -{ - NT_PRINTER_PARAM *current; - NT_PRINTER_PARAM *previous; - - current=info_2->specific; - previous=current; - - if (current==NULL) return (False); - - if ( !strcmp(current->value, param->value) && - (strlen(current->value)==strlen(param->value)) ) { - DEBUG(109,("deleting first value\n")); - info_2->specific=current->next; - SAFE_FREE(current->data); - SAFE_FREE(current); - DEBUG(109,("deleted first value\n")); - return (True); - } - - current=previous->next; - - while ( current!=NULL ) { - if (!strcmp(current->value, param->value) && - strlen(current->value)==strlen(param->value) ) { - DEBUG(109,("deleting current value\n")); - previous->next=current->next; - SAFE_FREE(current->data); - SAFE_FREE(current); - DEBUG(109,("deleted current value\n")); - return(True); - } - - previous=previous->next; - current=current->next; - } - return (False); -} - -/**************************************************************************** - Clean up and deallocate a (maybe partially) allocated NT_PRINTER_PARAM. -****************************************************************************/ -void free_nt_printer_param(NT_PRINTER_PARAM **param_ptr) -{ - NT_PRINTER_PARAM *param = *param_ptr; - - if(param == NULL) - return; - - DEBUG(106,("free_nt_printer_param: deleting param [%s]\n", param->value)); - - SAFE_FREE(param->data); - SAFE_FREE(*param_ptr); -} - /**************************************************************************** Malloc and return an NT devicemode. ****************************************************************************/ @@ -2294,7 +2241,7 @@ void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr) DEBUG(106,("free_nt_devicemode: deleting DEVMODE\n")); - SAFE_FREE(nt_devmode->private); + SAFE_FREE(nt_devmode->private); SAFE_FREE(*devmode_ptr); } @@ -2304,23 +2251,29 @@ void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr) static void free_nt_printer_info_level_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr) { NT_PRINTER_INFO_LEVEL_2 *info = *info_ptr; - NT_PRINTER_PARAM *param_ptr; + NT_PRINTER_DATA *data; + int i; - if(info == NULL) + if ( !info ) return; DEBUG(106,("free_nt_printer_info_level_2: deleting info\n")); free_nt_devicemode(&info->devmode); - for(param_ptr = info->specific; param_ptr; ) { - NT_PRINTER_PARAM *tofree = param_ptr; - - param_ptr = param_ptr->next; - free_nt_printer_param(&tofree); + /* clean up all registry keys */ + + data = &info->data; + for ( i=0; inum_keys; i++ ) + { + SAFE_FREE( data->keys[i].name ); + regval_ctr_destroy( &data->keys[i].values ); } + SAFE_FREE( data->keys ); - SAFE_FREE(*info_ptr); + /* finally the top level structure */ + + SAFE_FREE( *info_ptr ); } @@ -2400,32 +2353,257 @@ static int unpack_devicemode(NT_DEVICEMODE **nt_devmode, char *buf, int buflen) } /**************************************************************************** -****************************************************************************/ -static int unpack_specifics(NT_PRINTER_PARAM **list, char *buf, int buflen) + allocate and initialize a new slot in + ***************************************************************************/ + +static int add_new_printer_key( NT_PRINTER_DATA *data, char *name ) { - int len = 0; - NT_PRINTER_PARAM param, *p; + NT_PRINTER_KEY *d; + int key_index; + + if ( !data || !name ) + return -1; + + /* allocate another slot in the NT_PRINTER_KEY array */ + + d = Realloc( data->keys, sizeof(NT_PRINTER_KEY)*(data->num_keys+1) ); + if ( d ) + data->keys = d; + + key_index = data->num_keys; + + /* initialze new key */ + + data->num_keys++; + data->keys[key_index].name = strdup( name ); + + ZERO_STRUCTP( &data->keys[key_index].values ); + + regval_ctr_init( &data->keys[key_index].values ); + + DEBUG(10,("add_new_printer_key: Inserted new data key [%s]\n", name )); + + return key_index; +} - *list = NULL; +/**************************************************************************** + search for a registry key name in the existing printer data + ***************************************************************************/ + +int lookup_printerkey( NT_PRINTER_DATA *data, char *name ) +{ + int key_index = -1; + int i; + + if ( !data || !name ) + return -1; - while (1) { - len += tdb_unpack(buf+len, buflen-len, "p", &p); - if (!p) break; + DEBUG(12,("lookup_printerkey: Looking for [%s]\n", name)); + /* loop over all existing keys */ + + for ( i=0; inum_keys; i++ ) + { + if ( strcmp(data->keys[i].name, name) == 0 ) { + DEBUG(12,("lookup_printerkey: Found [%s]!\n", name)); + key_index = i; + break; + + } + } + + return key_index; +} + +/**************************************************************************** + ***************************************************************************/ + +WERROR delete_all_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2 ) +{ + WERROR result = WERR_OK; + NT_PRINTER_DATA *data; + int i; + + data = &p2->data; + + for ( i=0; inum_keys; i++ ) + { + DEBUG(8,("delete_all_printer_data: Removed all Printer Data from key [%s]\n", + data->keys[i].name)); + + SAFE_FREE( data->keys[i].name ); + regval_ctr_destroy( &data->keys[i].values ); + } + + SAFE_FREE( data->keys ); + + DEBUG(8,("delete_all_printer_data: Removed all Printer Data from printer [%s]\n", + p2->printername )); + + ZERO_STRUCTP( data ); + + return result; +} + +/**************************************************************************** + ***************************************************************************/ + +WERROR delete_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value ) +{ + WERROR result = WERR_OK; + int key_index; + + /* we must have names on non-zero length */ + + if ( !key || !*key|| !value || !*value ) + return WERR_INVALID_NAME; + + /* find the printer key first */ + + key_index = lookup_printerkey( &p2->data, key ); + if ( key_index == -1 ) + key_index = add_new_printer_key( &p2->data, key ); + + if ( key_index == -1 ) + return WERR_NOMEM; + + regval_ctr_delvalue( &p2->data.keys[key_index].values, value ); + + DEBUG(8,("delete_printer_data: Removed key => [%s], value => [%s]\n", + key, value )); + + return result; +} + +/**************************************************************************** + ***************************************************************************/ + +WERROR add_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value, + uint32 type, uint8 *data, int real_len ) +{ + WERROR result = WERR_OK; + int key_index; + + /* we must have names on non-zero length */ + + if ( !key || !*key|| !value || !*value ) + return WERR_INVALID_NAME; + + /* find the printer key first */ + + key_index = lookup_printerkey( &p2->data, key ); + if ( key_index == -1 ) + key_index = add_new_printer_key( &p2->data, key ); + + if ( key_index == -1 ) + return WERR_NOMEM; + + regval_ctr_addvalue( &p2->data.keys[key_index].values, value, + type, data, real_len ); + + DEBUG(8,("add_printer_data: Added key => [%s], value => [%s], size => [%d]\n", + key, value, real_len )); + + return result; +} + +/**************************************************************************** + ***************************************************************************/ + +REGISTRY_VALUE* get_printer_data( NT_PRINTER_INFO_LEVEL_2 *p2, char *key, char *value ) +{ + int key_index; + + if ( (key_index = lookup_printerkey( &p2->data, key )) == -1 ) + return NULL; + + DEBUG(8,("get_printer_data: Attempting to lookup key => [%s], value => [%s]\n", + key, value )); + + return regval_ctr_getvalue( &p2->data.keys[key_index].values, value ); +} + +/**************************************************************************** + Unpack a list of registry values frem the TDB + ***************************************************************************/ + +static int unpack_values(NT_PRINTER_DATA *printer_data, char *buf, int buflen) +{ + int len = 0; + uint32 type; + pstring string, valuename, keyname; + char *str; + int size; + uint8 *data_p; + REGISTRY_VALUE *regval_p; + int key_index; + + /* add the "PrinterDriverData" key first for performance reasons */ + + add_new_printer_key( printer_data, SPOOL_PRINTERDATA_KEY ); + + /* loop and unpack the rest of the registry values */ + + while ( True ) + { + + /* check to see if there are any more registry values */ + + len += tdb_unpack(buf+len, buflen-len, "p", ®val_p); + if ( !regval_p ) + break; + + /* unpack the next regval */ + len += tdb_unpack(buf+len, buflen-len, "fdB", - param.value, - ¶m.type, - ¶m.data_len, - ¶m.data); - param.next = *list; - *list = memdup(¶m, sizeof(param)); + string, + &type, + &size, + &data_p); + + /* + * break of the keyname from the value name. + * Should only be one '\' in the string returned. + */ + + str = strchr( string, '\\'); + + /* Put in "PrinterDriverData" is no key specified */ + + if ( !str ) { + pstrcpy( keyname, SPOOL_PRINTERDATA_KEY ); + pstrcpy( valuename, string ); + } + else { + *str = '\0'; + pstrcpy( keyname, string ); + pstrcpy( valuename, str+1 ); + } + + /* see if we need a new key */ + + if ( (key_index=lookup_printerkey( printer_data, keyname )) == -1 ) + key_index = add_new_printer_key( printer_data, keyname ); + + if ( key_index == -1 ) { + DEBUG(0,("unpack_values: Failed to allocate a new key [%s]!\n", + keyname)); + break; + } + + /* add the new value */ + + regval_ctr_addvalue( &printer_data->keys[key_index].values, valuename, type, data_p, size ); - DEBUG(8,("specific: [%s], len: %d\n", param.value, param.data_len)); + DEBUG(8,("specific: [%s\\%s], len: %d\n", keyname, valuename, size)); } return len; } +/**************************************************************************** + ***************************************************************************/ + static void map_to_os2_driver(fstring drivername) { static BOOL initialised=False; @@ -2659,10 +2837,10 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 **info_ptr, fstring sharen info.devmode = construct_nt_devicemode(printername); } - len += unpack_specifics(&info.specific,dbuf.dptr+len, dbuf.dsize-len); + len += unpack_values( &info.data, dbuf.dptr+len, dbuf.dsize-len ); /* This will get the current RPC talloc context, but we should be - passing this as a parameter... fixme... JRA ! */ + passing this as a parameter... fixme... JRA ! */ nt_printing_getsec(get_talloc_ctx(), sharename, &info.secdesc_buf); @@ -2849,24 +3027,19 @@ WERROR mod_a_printer(NT_PRINTER_INFO_LEVEL printer, uint32 level) Initialize printer devmode & data with previously saved driver init values. ****************************************************************************/ -static BOOL set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) +static BOOL set_driver_init_2( NT_PRINTER_INFO_LEVEL_2 *info_ptr ) { int len = 0; pstring key; TDB_DATA kbuf, dbuf; - NT_PRINTER_PARAM *current; NT_PRINTER_INFO_LEVEL_2 info; /* - * Delete any printer data 'specifics' already set. When called for driver + * Delete any printer data 'values' already set. When called for driver * replace, there will generally be some, but during an add printer, there * should not be any (if there are delete them). */ - while ( (current=info_ptr->specific) != NULL ) { - info_ptr->specific=current->next; - SAFE_FREE(current->data); - SAFE_FREE(current); - } + delete_all_printer_data( info_ptr ); ZERO_STRUCT(info); @@ -2876,7 +3049,7 @@ static BOOL set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) kbuf.dsize = strlen(key)+1; dbuf = tdb_fetch(tdb_drivers, kbuf); - if (!dbuf.dptr) { + if (!dbuf.dptr) { /* * When changing to a driver that has no init info in the tdb, remove * the previous drivers init info and leave the new on blank. @@ -2945,9 +3118,10 @@ static BOOL set_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info_ptr) info_ptr->printername, info_ptr->drivername)); /* - * Add the printer data 'specifics' to the new printer + * Add the printer data 'values' to the new printer */ - len += unpack_specifics(&info_ptr->specific,dbuf.dptr+len, dbuf.dsize-len); + len += unpack_values( &info_ptr->data, dbuf.dptr+len, dbuf.dsize-len ); + SAFE_FREE(dbuf.dptr); @@ -3005,7 +3179,7 @@ BOOL del_driver_init(char *drivername) } /**************************************************************************** - Pack up the DEVMODE and specifics for a printer into a 'driver init' entry + Pack up the DEVMODE and values for a printer into a 'driver init' entry in the tdb. Note: this is different from the driver entry and the printer entry. There should be a single driver init entry for each driver regardless of whether it was installed from NT or 2K. Technically, they should be @@ -3026,7 +3200,7 @@ static uint32 update_driver_init_2(NT_PRINTER_INFO_LEVEL_2 *info) len = 0; len += pack_devicemode(info->devmode, buf+len, buflen-len); - len += pack_specifics(info->specific, buf+len, buflen-len); + len += pack_values( &info->data, buf+len, buflen-len ); if (buflen != len) { char *tb; @@ -3057,14 +3231,14 @@ done: SAFE_FREE(buf); - DEBUG(10,("update_driver_init_2: Saved printer [%s] init DEVMODE & specifics for driver [%s]\n", + DEBUG(10,("update_driver_init_2: Saved printer [%s] init DEVMODE & values for driver [%s]\n", info->sharename, info->drivername)); return ret; } /**************************************************************************** - Update (i.e. save) the driver init info (DEVMODE and specifics) for a printer + Update (i.e. save) the driver init info (DEVMODE and values) for a printer ****************************************************************************/ uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level) @@ -3088,154 +3262,6 @@ uint32 update_driver_init(NT_PRINTER_INFO_LEVEL printer, uint32 level) return result; } -/**************************************************************************** - Convert the printer data value, a REG_BINARY array, into an initialization - DEVMODE. Note: the array must be parsed as if it was a DEVMODE in an rpc... - got to keep the endians happy :). -****************************************************************************/ - -static BOOL convert_driver_init(NT_PRINTER_PARAM *param, TALLOC_CTX *ctx, NT_DEVICEMODE *nt_devmode) -{ - BOOL result = False; - prs_struct ps; - DEVICEMODE devmode; - - ZERO_STRUCT(devmode); - - prs_init(&ps, 0, ctx, UNMARSHALL); - ps.data_p = (char *)param->data; - ps.buffer_size = param->data_len; - - if (spoolss_io_devmode("phantom DEVMODE", &ps, 0, &devmode)) - result = convert_devicemode("", &devmode, &nt_devmode); - else - DEBUG(10,("convert_driver_init: error parsing DEVMODE\n")); - - return result; -} - -/**************************************************************************** - Set the DRIVER_INIT info in the tdb. Requires Win32 client code that: - - 1. Use the driver's config DLL to this UNC printername and: - a. Call DrvPrintEvent with PRINTER_EVENT_INITIALIZE - b. Call DrvConvertDevMode with CDM_DRIVER_DEFAULT to get default DEVMODE - 2. Call SetPrinterData with the 'magic' key and the DEVMODE as data. - - The last step triggers saving the "driver initialization" information for - this printer into the tdb. Later, new printers that use this driver will - have this initialization information bound to them. This simulates the - driver initialization, as if it had run on the Samba server (as it would - have done on NT). - - The Win32 client side code requirement sucks! But until we can run arbitrary - Win32 printer driver code on any Unix that Samba runs on, we are stuck with it. - - It would have been easier to use SetPrinter because all the UNMARSHALLING of - the DEVMODE is done there, but 2K/XP clients do not set the DEVMODE... think - about it and you will realize why. JRR 010720 -****************************************************************************/ - -static WERROR save_driver_init_2(NT_PRINTER_INFO_LEVEL *printer, NT_PRINTER_PARAM *param) -{ - WERROR status = WERR_OK; - TALLOC_CTX *ctx = NULL; - NT_DEVICEMODE *nt_devmode = NULL; - NT_DEVICEMODE *tmp_devmode = printer->info_2->devmode; - - /* - * When the DEVMODE is already set on the printer, don't try to unpack it. - */ - - if (!printer->info_2->devmode && param->data_len) { - /* - * Set devmode on printer info, so entire printer initialization can be - * saved to tdb. - */ - - if ((ctx = talloc_init()) == NULL) - return WERR_NOMEM; - - if ((nt_devmode = (NT_DEVICEMODE*)malloc(sizeof(NT_DEVICEMODE))) == NULL) { - status = WERR_NOMEM; - goto done; - } - - ZERO_STRUCTP(nt_devmode); - - /* - * The DEVMODE is held in the 'data' component of the param in raw binary. - * Convert it to to a devmode structure - */ - if (!convert_driver_init(param, ctx, nt_devmode)) { - DEBUG(10,("save_driver_init_2: error converting DEVMODE\n")); - status = WERR_INVALID_PARAM; - goto done; - } - - printer->info_2->devmode = nt_devmode; - } - - /* - * Pack up and add (or update) the DEVMODE and any current printer data to - * a 'driver init' element in the tdb - * - */ - - if (update_driver_init(*printer, 2)!=0) { - DEBUG(10,("save_driver_init_2: error updating DEVMODE\n")); - status = WERR_NOMEM; - goto done; - } - - /* - * If driver initialization info was successfully saved, set the current - * printer to match it. This allows initialization of the current printer - * as well as the driver. - */ - status = mod_a_printer(*printer, 2); - if (!W_ERROR_IS_OK(status)) { - DEBUG(10,("save_driver_init_2: error setting DEVMODE on printer [%s]\n", - printer->info_2->printername)); - } - -#if 0 /* JERRY */ - srv_spoolss_sendnotify(p, handle); -#endif - - done: - talloc_destroy(ctx); - if (nt_devmode) - SAFE_FREE(nt_devmode->private); - SAFE_FREE(nt_devmode); - printer->info_2->devmode = tmp_devmode; - - return status; -} - -/**************************************************************************** - Update the driver init info (DEVMODE and specifics) for a printer -****************************************************************************/ - -WERROR save_driver_init(NT_PRINTER_INFO_LEVEL *printer, uint32 level, NT_PRINTER_PARAM *param) -{ - WERROR status = WERR_OK; - - switch (level) - { - case 2: - { - status=save_driver_init_2(printer, param); - break; - } - default: - status=WERR_UNKNOWN_LEVEL; - break; - } - - return status; -} - /**************************************************************************** Get a NT_PRINTER_INFO_LEVEL struct. It returns malloced memory. ****************************************************************************/ @@ -3851,83 +3877,6 @@ WERROR delete_printer_driver( NT_PRINTER_DRIVER_INFO_LEVEL_3 *i, struct current_ return delete_printer_driver_internal(i, user, version, delete_files ); } - -/**************************************************************************** -****************************************************************************/ - -BOOL get_specific_param_by_index(NT_PRINTER_INFO_LEVEL printer, uint32 level, uint32 param_index, - fstring value, uint8 **data, uint32 *type, uint32 *len) -{ - /* right now that's enough ! */ - NT_PRINTER_PARAM *param; - int i=0; - - param=printer.info_2->specific; - - while (param != NULL && i < param_index) { - param=param->next; - i++; - } - - if (param == NULL) - return False; - - /* exited because it exist */ - *type=param->type; - StrnCpy(value, param->value, sizeof(fstring)-1); - *data=(uint8 *)malloc(param->data_len*sizeof(uint8)); - if(*data == NULL) - return False; - ZERO_STRUCTP(*data); - memcpy(*data, param->data, param->data_len); - *len=param->data_len; - return True; -} - -/**************************************************************************** -****************************************************************************/ -BOOL get_specific_param(NT_PRINTER_INFO_LEVEL printer, uint32 level, - fstring value, uint8 **data, uint32 *type, uint32 *len) -{ - /* right now that's enough ! */ - NT_PRINTER_PARAM *param; - - DEBUG(10, ("get_specific_param\n")); - - param=printer.info_2->specific; - - while (param != NULL) - { -#if 1 /* JRA - I think this should be case insensitive.... */ - if ( strequal(value, param->value) -#else - if ( !strcmp(value, param->value) -#endif - && strlen(value)==strlen(param->value)) - break; - - param=param->next; - } - - if (param != NULL) - { - DEBUGADD(10, ("get_specific_param: found one param\n")); - /* exited because it exist */ - *type=param->type; - - *data=(uint8 *)malloc(param->data_len*sizeof(uint8)); - if(*data == NULL) - return False; - memcpy(*data, param->data, param->data_len); - *len=param->data_len; - - DEBUGADD(10, ("get_specific_param: exit true\n")); - return (True); - } - DEBUGADD(10, ("get_specific_param: exit false\n")); - return (False); -} - /**************************************************************************** Store a security desc for a printer. ****************************************************************************/ @@ -4363,76 +4312,3 @@ BOOL print_time_access_check(int snum) return ok; } -#if 0 /* JERRY - not used */ -/**************************************************************************** - Attempt to write a default device. -*****************************************************************************/ - -WERROR printer_write_default_dev(int snum, const PRINTER_DEFAULT *printer_default) -{ - NT_PRINTER_INFO_LEVEL *printer = NULL; - WERROR result; - - /* - * Don't bother if no default devicemode was sent. - */ - - if (printer_default->devmode_cont.devmode == NULL) - return WERR_OK; - - result = get_a_printer(&printer, 2, lp_servicename(snum)); - if (!W_ERROR_IS_OK(result)) return result; - - /* - * Just ignore it if we already have a devmode. - */ -#if 0 - if (printer->info_2->devmode != NULL) - goto done; -#endif - /* - * We don't have a devicemode and we're trying to write - * one. Check we have the access needed. - */ - DEBUG(5,("printer_write_default_dev: access: %x\n", printer_default->access_required)); - - if ( (printer_default->access_required & PRINTER_ACCESS_ADMINISTER) != - PRINTER_ACCESS_ADMINISTER) { - DEBUG(5,("printer_write_default_dev: invalid request access to update: %x\n", printer_default->access_required)); - result = WERR_ACCESS_DENIED; - goto done; - } - - if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) { - DEBUG(5,("printer_write_default_dev: Access denied for printer %s\n", - lp_servicename(snum) )); - result = WERR_ACCESS_DENIED; - /*result = NT_STATUS_NO_PROBLEMO;*/ - goto done; - } - - DEBUG(5,("printer_write_default_dev: updating, check OK.\n")); - - /* - * Convert the on the wire devicemode format to the internal one. - */ - - if (!convert_devicemode(printer->info_2->printername, - printer_default->devmode_cont.devmode, - &printer->info_2->devmode)) { - result = WERR_NOMEM; - goto done; - } - - /* - * Finally write back to the tdb. - */ - - result = mod_a_printer(*printer, 2); - - done: - - free_a_printer(&printer, 2); - return result; -} -#endif /* JERRY */ diff --git a/source3/registry/reg_frontend.c b/source3/registry/reg_frontend.c index c0788c1b753..45c1f240010 100644 --- a/source3/registry/reg_frontend.c +++ b/source3/registry/reg_frontend.c @@ -188,6 +188,38 @@ void free_registry_value( REGISTRY_VALUE *val ) return; } +/********************************************************************** + *********************************************************************/ + +uint8* regval_data_p( REGISTRY_VALUE *val ) +{ + return val->data_p; +} + +/********************************************************************** + *********************************************************************/ + +int regval_size( REGISTRY_VALUE *val ) +{ + return val->size; +} + +/********************************************************************** + *********************************************************************/ + +char* regval_name( REGISTRY_VALUE *val ) +{ + return val->valuename; +} + +/********************************************************************** + *********************************************************************/ + +uint32 regval_type( REGISTRY_VALUE *val ) +{ + return val->type; +} + /*********************************************************************** Retreive a pointer to a specific value. Caller shoud dup the structure since this memory may go away with a regval_ctr_destroy() @@ -214,7 +246,7 @@ TALLOC_CTX* regval_ctr_getctx( REGVAL_CTR *val ) } /*********************************************************************** - Add a new regostry value to the array + Add a new registry value to the array **********************************************************************/ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, @@ -237,7 +269,7 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, ctr->values = ppreg; } - /* allocate a new valuie and store the pointer in the arrya */ + /* allocate a new value and store the pointer in the arrya */ ctr->values[ctr->num_values] = talloc( ctr->ctx, sizeof(REGISTRY_VALUE) ); @@ -253,6 +285,61 @@ int regval_ctr_addvalue( REGVAL_CTR *ctr, char *name, uint16 type, return ctr->num_values; } +/*********************************************************************** + Delete a single value from the registry container. + No need to free memory since it is talloc'd. + **********************************************************************/ + +int regval_ctr_delvalue( REGVAL_CTR *ctr, char *name ) +{ + int i; + + /* search for the value */ + + for ( i=0; inum_values; i++ ) { + if ( strcmp( ctr->values[i]->valuename, name ) == 0) + break; + } + + /* just return if we don't find it */ + + if ( i == ctr->num_values ) + return ctr->num_values; + + /* just shift everything down one */ + + for ( /* use previous i */; i<(ctr->num_values-1); i++ ) + memcpy( ctr->values[i], ctr->values[i+1], sizeof(REGISTRY_VALUE) ); + + /* paranoia */ + + ZERO_STRUCTP( ctr->values[i] ); + + ctr->num_values--; + + return ctr->num_values; +} + +/*********************************************************************** + Delete a single value from the registry container. + No need to free memory since it is talloc'd. + **********************************************************************/ + +REGISTRY_VALUE* regval_ctr_getvalue( REGVAL_CTR *ctr, char *name ) +{ + int i; + + /* search for the value */ + + for ( i=0; inum_values; i++ ) { + if ( strcmp( ctr->values[i]->valuename, name ) == 0) + return ctr->values[i]; + + } + + return NULL; +} + /*********************************************************************** free memory held by a REGVAL_CTR structure **********************************************************************/ diff --git a/source3/registry/reg_printing.c b/source3/registry/reg_printing.c index 3fd36804894..8f53fe9ea5c 100644 --- a/source3/registry/reg_printing.c +++ b/source3/registry/reg_printing.c @@ -492,7 +492,7 @@ static int print_subpath_printers( char *key, REGSUBKEY_CTR *subkeys ) free_a_printer( &printer, 2 ); - regsubkey_ctr_addkey( subkeys, "PrinterDriverData" ); + regsubkey_ctr_addkey( subkeys, SPOOL_PRINTERDATA_KEY ); } /* no other subkeys below here */ @@ -620,7 +620,7 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val ) /* here should be no more path components here */ - if ( new_path || strcmp(base, "PrinterDriverData") ) + if ( new_path || strcmp(base, SPOOL_PRINTERDATA_KEY) ) goto done; /* now enumerate the PrinterDriverData key */ @@ -632,10 +632,12 @@ static int print_subpath_values_printers( char *key, REGVAL_CTR *val ) /* iterate over all printer data and fill the regval container */ +#if 0 /* JERRY */ for ( i=0; get_specific_param_by_index(*printer, 2, i, valuename, &data, &type, &data_len); i++ ) { regval_ctr_addvalue( val, valuename, type, data, data_len ); } +#endif free_a_printer( &printer, 2 ); diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 79760ff37ef..ac41a81a5a1 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -6186,42 +6186,6 @@ BOOL spoolss_io_r_resetprinter(char *desc, SPOOL_R_RESETPRINTER *r_u, prs_struct return True; } -/******************************************************************* -********************************************************************/ -BOOL convert_specific_param(NT_PRINTER_PARAM **param, const UNISTR2 *value, - uint32 type, const uint8 *data, uint32 len) -{ - DEBUG(5,("converting a specific param struct\n")); - - if (*param == NULL) - { - *param=(NT_PRINTER_PARAM *)malloc(sizeof(NT_PRINTER_PARAM)); - if(*param == NULL) - return False; - memset((char *)*param, '\0', sizeof(NT_PRINTER_PARAM)); - DEBUGADD(6,("Allocated a new PARAM struct\n")); - } - unistr2_to_ascii((*param)->value, value, sizeof((*param)->value)-1); - (*param)->type = type; - - /* le champ data n'est pas NULL termine */ - /* on stocke donc la longueur */ - - (*param)->data_len=len; - - if (len) { - (*param)->data=(uint8 *)malloc(len * sizeof(uint8)); - if((*param)->data == NULL) - return False; - memcpy((*param)->data, data, len); - } - - DEBUGADD(6,("\tvalue:[%s], len:[%d]\n",(*param)->value, (*param)->data_len)); - dump_data(10, (char *)(*param)->data, (*param)->data_len); - - return True; -} - /******************************************************************* ********************************************************************/ diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index d04aff8b150..2aa11530f80 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1798,51 +1798,56 @@ static BOOL getprinterdata_printer(pipes_struct *p, TALLOC_CTX *ctx, POLICY_HND uint8 **data, uint32 *needed, uint32 in_size ) { NT_PRINTER_INFO_LEVEL *printer = NULL; - int snum=0; - uint8 *idata=NULL; - uint32 len; - Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + int snum=0; + Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + REGISTRY_VALUE *val; + int size = 0; DEBUG(5,("getprinterdata_printer\n")); - if (!Printer) { + if ( !Printer ) { DEBUG(2,("getprinterdata_printer: Invalid handle (%s:%u:%u).\n", OUR_HANDLE(handle))); return False; } - if(!get_printer_snum(p, handle, &snum)) + if ( !get_printer_snum(p, handle, &snum) ) return False; - if (!W_ERROR_IS_OK(get_a_printer(&printer, 2, lp_servicename(snum)))) + if ( !W_ERROR_IS_OK(get_a_printer(&printer, 2, lp_servicename(snum))) ) return False; - if (!get_specific_param(*printer, 2, value, &idata, type, &len)) { + if ( !(val = get_printer_data( printer->info_2, SPOOL_PRINTERDATA_KEY, value)) ) + { free_a_printer(&printer, 2); return False; } + + *type = regval_type( val ); - free_a_printer(&printer, 2); DEBUG(5,("getprinterdata_printer:allocating %d\n", in_size)); - if (in_size) { - if((*data = (uint8 *)talloc(ctx, in_size *sizeof(uint8) )) == NULL) { + if (in_size) + { + if ( (*data = (uint8 *)talloc(ctx, in_size * sizeof(uint8))) == NULL ) return False; - } - memset(*data, 0, in_size *sizeof(uint8)); + memset( *data, 0, in_size *sizeof(uint8) ); + /* copy the min(in_size, len) */ - memcpy(*data, idata, (len>in_size)?in_size:len *sizeof(uint8)); - } else { - *data = NULL; + + size = regval_size( val ); + memcpy( *data, regval_data_p(val), (size > in_size) ? in_size : size*sizeof(uint8) ); } + else + *data = NULL; - *needed = len; + *needed = size; DEBUG(5,("getprinterdata_printer:copy done\n")); - SAFE_FREE(idata); + free_a_printer(&printer, 2); return True; } @@ -1871,11 +1876,12 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO * JFM, 4/19/1999 */ - *out_size=in_size; + *out_size = in_size; /* in case of problem, return some default values */ - *needed=0; - *type=0; + + *needed = 0; + *type = 0; DEBUG(4,("_spoolss_getprinterdata\n")); @@ -1889,13 +1895,16 @@ WERROR _spoolss_getprinterdata(pipes_struct *p, SPOOL_Q_GETPRINTERDATA *q_u, SPO unistr2_to_ascii(value, valuename, sizeof(value)-1); if (Printer->printer_type == PRINTER_HANDLE_IS_PRINTSERVER) - found=getprinterdata_printer_server(p->mem_ctx, value, type, data, needed, *out_size); + found = getprinterdata_printer_server(p->mem_ctx, value, type, data, needed, *out_size); else - found= getprinterdata_printer(p, p->mem_ctx, handle, value, type, data, needed, *out_size); + found = getprinterdata_printer(p, p->mem_ctx, handle, value, type, data, needed, *out_size); - if (found==False) { + if ( !found ) + { DEBUG(5, ("value not found, allocating %d\n", *out_size)); + /* reply this param doesn't exist */ + if (*out_size) { if((*data=(uint8 *)talloc_zero(p->mem_ctx, *out_size*sizeof(uint8))) == NULL) return WERR_NOMEM; @@ -5219,254 +5228,6 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) return True; } -#if 0 /* JERRY */ - -/* Return true if two devicemodes are equal */ - -#define DEVMODE_CHECK_INT(field) \ - if (d1->field != d2->field) { \ - DEBUG(10, ("nt_devicemode_equal(): " #field " not equal (%d != %d)\n", \ - d1->field, d2->field)); \ - return False; \ - } - -/************************************************************************ - Handy, but currently unused functions - ***********************************************************************/ - -static BOOL nt_devicemode_equal(NT_DEVICEMODE *d1, NT_DEVICEMODE *d2) -{ - if (!d1 && !d2) goto equal; /* if both are NULL they are equal */ - - if (!d1 ^ !d2) { - DEBUG(10, ("nt_devicemode_equal(): pointers not equal\n")); - return False; /* if either is exclusively NULL are not equal */ - } - - if (!strequal(d1->devicename, d2->devicename)) { - DEBUG(10, ("nt_devicemode_equal(): device not equal (%s != %s)\n", d1->devicename, d2->devicename)); - return False; - } - - if (!strequal(d1->formname, d2->formname)) { - DEBUG(10, ("nt_devicemode_equal(): formname not equal (%s != %s)\n", d1->formname, d2->formname)); - return False; - } - - DEVMODE_CHECK_INT(specversion); - DEVMODE_CHECK_INT(driverversion); - DEVMODE_CHECK_INT(driverextra); - DEVMODE_CHECK_INT(orientation); - DEVMODE_CHECK_INT(papersize); - DEVMODE_CHECK_INT(paperlength); - DEVMODE_CHECK_INT(paperwidth); - DEVMODE_CHECK_INT(scale); - DEVMODE_CHECK_INT(copies); - DEVMODE_CHECK_INT(defaultsource); - DEVMODE_CHECK_INT(printquality); - DEVMODE_CHECK_INT(color); - DEVMODE_CHECK_INT(duplex); - DEVMODE_CHECK_INT(yresolution); - DEVMODE_CHECK_INT(ttoption); - DEVMODE_CHECK_INT(collate); - DEVMODE_CHECK_INT(logpixels); - - DEVMODE_CHECK_INT(fields); - DEVMODE_CHECK_INT(bitsperpel); - DEVMODE_CHECK_INT(pelswidth); - DEVMODE_CHECK_INT(pelsheight); - DEVMODE_CHECK_INT(displayflags); - DEVMODE_CHECK_INT(displayfrequency); - DEVMODE_CHECK_INT(icmmethod); - DEVMODE_CHECK_INT(icmintent); - DEVMODE_CHECK_INT(mediatype); - DEVMODE_CHECK_INT(dithertype); - DEVMODE_CHECK_INT(reserved1); - DEVMODE_CHECK_INT(reserved2); - DEVMODE_CHECK_INT(panningwidth); - DEVMODE_CHECK_INT(panningheight); - - /* compare the private data if it exists */ - if (!d1->driverextra && !d2->driverextra) goto equal; - - - DEVMODE_CHECK_INT(driverextra); - - if (memcmp(d1->private, d2->private, d1->driverextra)) { - DEBUG(10, ("nt_devicemode_equal(): private data not equal\n")); - return False; - } - - equal: - DEBUG(10, ("nt_devicemode_equal(): devicemodes identical\n")); - return True; -} - -/* Return true if two NT_PRINTER_PARAM structures are equal */ - -static BOOL nt_printer_param_equal(NT_PRINTER_PARAM *p1, - NT_PRINTER_PARAM *p2) -{ - if (!p1 && !p2) goto equal; - - if ((!p1 && p2) || (p1 && !p2)) { - DEBUG(10, ("nt_printer_param_equal(): pointers differ\n")); - return False; - } - - /* Compare lists of printer parameters */ - - while (p1) { - BOOL found = False; - NT_PRINTER_PARAM *q = p1; - - /* Find the parameter in the second structure */ - - while(q) { - - if (strequal(p1->value, q->value)) { - - if (p1->type != q->type) { - DEBUG(10, ("nt_printer_param_equal():" - "types for %s differ (%d != %d)\n", - p1->value, p1->type, - q->type)); - break; - } - - if (p1->data_len != q->data_len) { - DEBUG(10, ("nt_printer_param_equal():" - "len for %s differs (%d != %d)\n", - p1->value, p1->data_len, - q->data_len)); - break; - } - - if (memcmp(p1->data, q->data, p1->data_len) == 0) { - found = True; - } else { - DEBUG(10, ("nt_printer_param_equal():" - "data for %s differs\n", p1->value)); - } - - break; - } - - q = q->next; - } - - if (!found) { - DEBUG(10, ("nt_printer_param_equal(): param %s " - "does not exist\n", p1->value)); - return False; - } - - p1 = p1->next; - } - - equal: - - DEBUG(10, ("nt_printer_param_equal(): printer params identical\n")); - return True; -} - -/******************************************************************** - * Called by update_printer when trying to work out whether to - * actually update printer info. - ********************************************************************/ - -#define PI_CHECK_INT(field) \ - if (pi1->field != pi2->field) { \ - DEBUG(10, ("nt_printer_info_level_equal(): " #field " not equal (%d != %d)\n", \ - pi1->field, pi2->field)); \ - return False; \ - } - -#define PI_CHECK_STR(field) \ - if (!strequal(pi1->field, pi2->field)) { \ - DEBUG(10, ("nt_printer_info_level_equal(): " #field " not equal (%s != %s)\n", \ - pi1->field, pi2->field)); \ - return False; \ - } - -static BOOL nt_printer_info_level_equal(NT_PRINTER_INFO_LEVEL *p1, - NT_PRINTER_INFO_LEVEL *p2) -{ - NT_PRINTER_INFO_LEVEL_2 *pi1, *pi2; - - /* Trivial conditions */ - - if ((!p1 && !p2) || (!p1->info_2 && !p2->info_2)) { - goto equal; - } - - if ((!p1 && p2) || (p1 && !p2) || - (!p1->info_2 && p2->info_2) || - (p1->info_2 && !p2->info_2)) { - DEBUG(10, ("nt_printer_info_level_equal(): info levels " - "differ\n")); - return False; - } - - /* Compare two nt_printer_info_level structures. Don't compare - status or cjobs as they seem to have something to do with the - printer queue. */ - - pi1 = p1->info_2; - pi2 = p2->info_2; - - /* Don't check the attributes as we stomp on the value in - check_printer_ok() anyway. */ - -#if 0 - PI_CHECK_INT(attributes); -#endif - - PI_CHECK_INT(priority); - PI_CHECK_INT(default_priority); - PI_CHECK_INT(starttime); - PI_CHECK_INT(untiltime); - PI_CHECK_INT(averageppm); - - /* Yuck - don't check the printername or servername as the - mod_a_printer() code plays games with them. You can't - change the printername or the sharename through this interface - in Samba. */ - - PI_CHECK_STR(sharename); - PI_CHECK_STR(portname); - PI_CHECK_STR(drivername); - PI_CHECK_STR(comment); - PI_CHECK_STR(location); - - if (!nt_devicemode_equal(pi1->devmode, pi2->devmode)) { - return False; - } - - PI_CHECK_STR(sepfile); - PI_CHECK_STR(printprocessor); - PI_CHECK_STR(datatype); - PI_CHECK_STR(parameters); - - if (!nt_printer_param_equal(pi1->specific, pi2->specific)) { - return False; - } - - if (!sec_desc_equal(pi1->secdesc_buf->sec, pi2->secdesc_buf->sec)) { - return False; - } - - PI_CHECK_INT(changeid); - PI_CHECK_INT(c_setprinter); - PI_CHECK_INT(setuptime); - - equal: - DEBUG(10, ("nt_printer_info_level_equal(): infos are identical\n")); - return True; -} - -#endif - /******************************************************************** * Called by spoolss_api_setprinter * when updating a printer description. @@ -7121,38 +6882,38 @@ WERROR _spoolss_getprinterdriverdirectory(pipes_struct *p, SPOOL_Q_GETPRINTERDRI WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, SPOOL_R_ENUMPRINTERDATA *r_u) { POLICY_HND *handle = &q_u->handle; - uint32 idx = q_u->index; - uint32 in_value_len = q_u->valuesize; - uint32 in_data_len = q_u->datasize; - uint32 *out_max_value_len = &r_u->valuesize; - uint16 **out_value = &r_u->value; - uint32 *out_value_len = &r_u->realvaluesize; - uint32 *out_type = &r_u->type; + uint32 idx = q_u->index; + uint32 in_value_len = q_u->valuesize; + uint32 in_data_len = q_u->datasize; + uint32 *out_max_value_len= &r_u->valuesize; + uint16 **out_value = &r_u->value; + uint32 *out_value_len = &r_u->realvaluesize; + uint32 *out_type = &r_u->type; uint32 *out_max_data_len = &r_u->datasize; - uint8 **data_out = &r_u->data; - uint32 *out_data_len = &r_u->realdatasize; + uint8 **data_out = &r_u->data; + uint32 *out_data_len = &r_u->realdatasize; NT_PRINTER_INFO_LEVEL *printer = NULL; - fstring value; + uint32 param_index; + uint32 biggest_valuesize; + uint32 biggest_datasize; + uint32 data_len; + Printer_entry *Printer = find_printer_index_by_hnd(p, handle); + int snum; + WERROR result; + REGISTRY_VALUE *val; + NT_PRINTER_DATA *p_data; + int i, key_index, num_values; + int name_length; - uint32 param_index; - uint32 biggest_valuesize; - uint32 biggest_datasize; - uint32 data_len; - Printer_entry *Printer = find_printer_index_by_hnd(p, handle); - int snum; - uint8 *data=NULL; - uint32 type; - WERROR result; - - ZERO_STRUCT(printer); + ZERO_STRUCT( printer ); - *out_type=0; + *out_type = 0; - *out_max_data_len=0; - *data_out=NULL; - *out_data_len=0; + *out_max_data_len = 0; + *data_out = NULL; + *out_data_len = 0; DEBUG(5,("spoolss_enumprinterdata\n")); @@ -7167,103 +6928,133 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S result = get_a_printer(&printer, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(result)) return result; + + p_data = &printer->info_2->data; + key_index = lookup_printerkey( p_data, SPOOL_PRINTERDATA_KEY ); + + result = WERR_OK; /* * The NT machine wants to know the biggest size of value and data * * cf: MSDN EnumPrinterData remark section */ - if ( (in_value_len==0) && (in_data_len==0) ) { + + if ( !in_value_len && !in_data_len ) + { DEBUGADD(6,("Activating NT mega-hack to find sizes\n")); - SAFE_FREE(data); - - param_index=0; - biggest_valuesize=0; - biggest_datasize=0; + param_index = 0; + biggest_valuesize = 0; + biggest_datasize = 0; + + num_values = regval_ctr_numvals( &p_data->keys[key_index].values ); - while (get_specific_param_by_index(*printer, 2, param_index, value, &data, &type, &data_len)) { - if (strlen(value) > biggest_valuesize) biggest_valuesize=strlen(value); - if (data_len > biggest_datasize) biggest_datasize=data_len; - - DEBUG(6,("current values: [%d], [%d]\n", biggest_valuesize, biggest_datasize)); - - SAFE_FREE(data); - param_index++; + for ( i=0; ikeys[key_index].values, i ); + + name_length = strlen(val->valuename); + if ( strlen(val->valuename) > biggest_valuesize ) + biggest_valuesize = name_length; + + if ( val->size > biggest_datasize ) + biggest_datasize = val->size; + + DEBUG(6,("current values: [%d], [%d]\n", biggest_valuesize, + biggest_datasize)); } - /* the value is an UNICODE string but realvaluesize is the length in bytes including the leading 0 */ - *out_value_len=2*(1+biggest_valuesize); - *out_data_len=biggest_datasize; + /* the value is an UNICODE string but real_value_size is the length + in bytes including the trailing 0 */ + + *out_value_len = 2 * (1+biggest_valuesize); + *out_data_len = biggest_datasize; DEBUG(6,("final values: [%d], [%d]\n", *out_value_len, *out_data_len)); - free_a_printer(&printer, 2); - return WERR_OK; + goto done; } /* * the value len is wrong in NT sp3 * that's the number of bytes not the number of unicode chars */ + + val = regval_ctr_specific_value( &p_data->keys[key_index].values, idx ); - if (!get_specific_param_by_index(*printer, 2, idx, value, &data, &type, &data_len)) { - - SAFE_FREE(data); - free_a_printer(&printer, 2); + if ( !val ) + { /* out_value should default to "" or else NT4 has problems unmarshalling the response */ - *out_max_value_len=(in_value_len/sizeof(uint16)); - if((*out_value=(uint16 *)talloc_zero(p->mem_ctx, in_value_len*sizeof(uint8))) == NULL) - return WERR_NOMEM; + *out_max_value_len = (in_value_len/sizeof(uint16)); + + if ( (*out_value=(uint16 *)talloc_zero(p->mem_ctx, in_value_len*sizeof(uint8))) == NULL ) + { + result = WERR_NOMEM; + goto done; + } *out_value_len = (uint32)rpcstr_push((char *)*out_value, "", in_value_len, 0); /* the data is counted in bytes */ + *out_max_data_len = in_data_len; - *out_data_len = in_data_len; - if((*data_out=(uint8 *)talloc_zero(p->mem_ctx, in_data_len*sizeof(uint8))) == NULL) - return WERR_NOMEM; + *out_data_len = in_data_len; + + /* only allocate when given a non-zero data_len */ + + if ( in_data_len && ((*data_out=(uint8 *)talloc_zero(p->mem_ctx, in_data_len*sizeof(uint8))) == NULL) ) + { + result = WERR_NOMEM; + goto done; + } - return WERR_NO_MORE_ITEMS; + result = WERR_NO_MORE_ITEMS; + } + else + { + /* + * the value is: + * - counted in bytes in the request + * - counted in UNICODE chars in the max reply + * - counted in bytes in the real size + * + * take a pause *before* coding not *during* coding + */ + + /* name */ + *out_max_value_len = ( in_value_len / sizeof(uint16) ); + if ( (*out_value = (uint16 *)talloc_zero(p->mem_ctx, in_value_len*sizeof(uint8))) == NULL ) + { + result = WERR_NOMEM; + goto done; + } + + *out_value_len = (uint32)rpcstr_push((char *)*out_value, regval_name(val), in_value_len, 0); + + /* type */ + + *out_type = regval_type( val ); + + /* data - counted in bytes */ + + *out_max_data_len = in_data_len; + if ( (*data_out = (uint8 *)talloc_zero(p->mem_ctx, in_data_len*sizeof(uint8))) == NULL) + { + result = WERR_NOMEM; + goto done; + } + data_len = (size_t)regval_size(val); + memcpy( *data_out, regval_data_p(val), data_len ); + *out_data_len = data_len; } +done: free_a_printer(&printer, 2); - - /* - * the value is: - * - counted in bytes in the request - * - counted in UNICODE chars in the max reply - * - counted in bytes in the real size - * - * take a pause *before* coding not *during* coding - */ - - *out_max_value_len=(in_value_len/sizeof(uint16)); - if((*out_value=(uint16 *)talloc_zero(p->mem_ctx,in_value_len*sizeof(uint8))) == NULL) { - SAFE_FREE(data); - return WERR_NOMEM; - } - - *out_value_len = (uint32)rpcstr_push((char *)*out_value,value, in_value_len, 0); - - *out_type=type; - - /* the data is counted in bytes */ - *out_max_data_len=in_data_len; - if((*data_out=(uint8 *)talloc_zero(p->mem_ctx, in_data_len*sizeof(uint8))) == NULL) { - SAFE_FREE(data); - return WERR_NOMEM; - } - - memcpy(*data_out, data, (size_t)data_len); - *out_data_len=data_len; - - SAFE_FREE(data); - - return WERR_OK; + return result; } /**************************************************************************** @@ -7271,17 +7062,17 @@ WERROR _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SPOOL_R_SETPRINTERDATA *r_u) { - POLICY_HND *handle = &q_u->handle; - UNISTR2 *value = &q_u->value; - uint32 type = q_u->type; - uint8 *data = q_u->data; - uint32 real_len = q_u->real_len; + POLICY_HND *handle = &q_u->handle; + UNISTR2 *value = &q_u->value; + uint32 type = q_u->type; + uint8 *data = q_u->data; + uint32 real_len = q_u->real_len; - NT_PRINTER_INFO_LEVEL *printer = NULL; - NT_PRINTER_PARAM *param = NULL, old_param; - int snum=0; - WERROR status = WERR_OK; - Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + NT_PRINTER_INFO_LEVEL *printer = NULL; + int snum=0; + WERROR status = WERR_OK; + Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + fstring valuename; DEBUG(5,("spoolss_setprinterdata\n")); @@ -7293,8 +7084,6 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP if (!get_printer_snum(p,handle, &snum)) return WERR_BADFID; - ZERO_STRUCT(old_param); - /* * Access check : NT returns "access denied" if you make a * SetPrinterData call without the necessary privildge. @@ -7309,40 +7098,22 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP goto done; } - /* Check if we are making any changes or not. Return true if - nothing is actually changing. This is not needed anymore but - has been left in as an optimization to keep from from - writing to disk as often --jerry */ - status = get_a_printer(&printer, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(status)) return status; - convert_specific_param(¶m, value , type, data, real_len); - - unlink_specific_param_if_exist(printer->info_2, param); + /* save the registry data */ - /* - * When client side code sets a magic printer data key, detect it and save - * the current printer data and the magic key's data (its the DEVMODE) for - * future printer/driver initializations. - */ - if (param->type==3 && !strcmp( param->value, PHANTOM_DEVMODE_KEY)) { - /* - * Set devmode and printer initialization info - */ - status = save_driver_init(printer, 2, param); - } - else { - add_a_specific_param(printer->info_2, ¶m); - status = mod_a_printer(*printer, 2); - } + unistr2_to_ascii( valuename, value, sizeof(valuename)-1 ); + delete_printer_data( printer->info_2, SPOOL_PRINTERDATA_KEY, valuename ); + add_printer_data( printer->info_2, SPOOL_PRINTERDATA_KEY, valuename, type, data, real_len ); - done: + /* write the **entire** printer out to disk.... :-( */ + + status = mod_a_printer(*printer, 2); + +done: free_a_printer(&printer, 2); - if (param) - free_nt_printer_param(¶m); - SAFE_FREE(old_param.data); return status; } @@ -7352,9 +7123,9 @@ WERROR _spoolss_setprinterdata( pipes_struct *p, SPOOL_Q_SETPRINTERDATA *q_u, SP WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R_RESETPRINTER *r_u) { - POLICY_HND *handle = &q_u->handle; - Printer_entry *Printer=find_printer_index_by_hnd(p, handle); - int snum; + POLICY_HND *handle = &q_u->handle; + Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + int snum; DEBUG(5,("_spoolss_resetprinter\n")); @@ -7378,16 +7149,19 @@ WERROR _spoolss_resetprinter(pipes_struct *p, SPOOL_Q_RESETPRINTER *q_u, SPOOL_R } +/**************************************************************************** +****************************************************************************/ + WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_u, SPOOL_R_DELETEPRINTERDATA *r_u) { - POLICY_HND *handle = &q_u->handle; - UNISTR2 *value = &q_u->valuename; + POLICY_HND *handle = &q_u->handle; + UNISTR2 *value = &q_u->valuename; - NT_PRINTER_INFO_LEVEL *printer = NULL; - NT_PRINTER_PARAM param; - int snum=0; - WERROR status = WERR_OK; - Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + NT_PRINTER_INFO_LEVEL *printer = NULL; + int snum=0; + WERROR status = WERR_OK; + Printer_entry *Printer=find_printer_index_by_hnd(p, handle); + pstring valuename; DEBUG(5,("spoolss_deleteprinterdata\n")); @@ -7408,15 +7182,14 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_ if (!W_ERROR_IS_OK(status)) return status; - ZERO_STRUCTP(¶m); - unistr2_to_ascii(param.value, value, sizeof(param.value)-1); + unistr2_to_ascii( valuename, value, sizeof(valuename)-1 ); - if(!unlink_specific_param_if_exist(printer->info_2, ¶m)) - status = WERR_INVALID_PARAM; - else + status = delete_printer_data( printer->info_2, SPOOL_PRINTERDATA_KEY, valuename ); + if ( NT_STATUS_IS_OK(status) ) status = mod_a_printer(*printer, 2); free_a_printer(&printer, 2); + return status; } @@ -7426,7 +7199,6 @@ WERROR _spoolss_deleteprinterdata(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATA *q_ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM *r_u) { POLICY_HND *handle = &q_u->handle; -/* uint32 level = q_u->level; - notused. */ FORM *form = &q_u->form; nt_forms_struct tmpForm; int snum; @@ -8045,9 +7817,10 @@ WERROR _spoolss_getprinterdataex(pipes_struct *p, SPOOL_Q_GETPRINTERDATAEX *q_u, * (a) DsDriver * (b) DsSpooler * (c) PnPData + * (d) DsUser */ - if (strcmp(key, "PrinterDriverData") != 0) + if (strcmp(key, SPOOL_PRINTERDATA_KEY) != 0) return WERR_BADFILE; DEBUG(10, ("_spoolss_getprinterdataex: pass me to getprinterdata\n")); @@ -8093,7 +7866,7 @@ WERROR _spoolss_setprinterdataex(pipes_struct *p, SPOOL_Q_SETPRINTERDATAEX *q_u, unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1); - if (strcmp(key, "PrinterDriverData") != 0) + if (strcmp(key, SPOOL_PRINTERDATA_KEY) != 0) return WERR_INVALID_PARAM; ZERO_STRUCT(q_u_local); @@ -8128,7 +7901,7 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX unistr2_to_ascii(key, &q_u->keyname, sizeof(key) - 1); - if (strcmp(key, "PrinterDriverData") != 0) + if (strcmp(key, SPOOL_PRINTERDATA_KEY) != 0) return WERR_INVALID_PARAM; memcpy(&q_u_local.handle, &q_u->handle, sizeof(POLICY_HND)); @@ -8153,7 +7926,7 @@ WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPO uint16 enumkeys[ENUMERATED_KEY_SIZE+1]; char* ptr = NULL; int i; - char *PrinterKey = "PrinterDriverData"; + char *PrinterKey = SPOOL_PRINTERDATA_KEY; DEBUG(4,("_spoolss_enumprinterkey\n")); @@ -8222,7 +7995,7 @@ WERROR _spoolss_deleteprinterkey(pipes_struct *p, SPOOL_Q_DELETEPRINTERKEY *q_u, unistr2_to_ascii(key, &q_u->keyname, sizeof(key) - 1); - if (strcmp(key, "PrinterDriverData") != 0) + if (strcmp(key, SPOOL_PRINTERDATA_KEY) != 0) return WERR_INVALID_PARAM; /* @@ -8246,14 +8019,16 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ needed; NT_PRINTER_INFO_LEVEL *printer = NULL; PRINTER_ENUM_VALUES *enum_values = NULL; - fstring key, value; + NT_PRINTER_DATA *p_data; + fstring key; Printer_entry *Printer = find_printer_index_by_hnd(p, handle); int snum; - uint32 param_index, - data_len, - type; WERROR result; - uint8 *data=NULL; + int key_index; + int i; + REGISTRY_VALUE *val; + char *value_name; + int data_len; DEBUG(4,("_spoolss_enumprinterdataex\n")); @@ -8264,20 +8039,8 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ } - /* - * The only key we support is "PrinterDriverData". This should return - > an array of all the key/value pairs returned by EnumPrinterDataSee - * _spoolss_getprinterdataex() for details --jerry - */ - - unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1); - if (strcmp(key, "PrinterDriverData") != 0) - { - DEBUG(10,("_spoolss_enumprinterdataex: Unknown keyname [%s]\n", key)); - return WERR_INVALID_PARAM; - } - - + /* first get the printer off of disk */ + if (!get_printer_snum(p,handle, &snum)) return WERR_BADFID; @@ -8285,61 +8048,76 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ result = get_a_printer(&printer, 2, lp_servicename(snum)); if (!W_ERROR_IS_OK(result)) return result; - + /* now look for a match on the key name */ + + p_data = &printer->info_2->data; + + unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1); + if ( (key_index = lookup_printerkey( p_data, key)) == -1 ) + { + DEBUG(10,("_spoolss_enumprinterdataex: Unknown keyname [%s]\n", key)); + result = WERR_INVALID_PARAM; + goto done; + } + + result = WERR_OK; + needed = 0; + + /* allocate the memory for the array of pointers -- if necessary */ + + num_entries = regval_ctr_numvals( &p_data->keys[key_index].values ); + if ( num_entries ) + { + if ( (enum_values=talloc(p->mem_ctx, num_entries*sizeof(PRINTER_ENUM_VALUES))) == NULL ) + { + DEBUG(0,("_spoolss_enumprinterdataex: talloc() failed to allocate memory for [%d] bytes!\n", + num_entries*sizeof(PRINTER_ENUM_VALUES))); + result = WERR_NOMEM; + goto done; + } + + memset( enum_values, 0x0, num_entries*sizeof(PRINTER_ENUM_VALUES) ); + } + /* * loop through all params and build the array to pass * back to the client */ - result = WERR_OK; - param_index = 0; - needed = 0; - num_entries = 0; - - while (get_specific_param_by_index(*printer, 2, param_index, value, &data, &type, &data_len)) + + for ( i=0; imem_ctx, enum_values, (num_entries+1) * sizeof(PRINTER_ENUM_VALUES))) == NULL) - { - DEBUG(0,("talloc_realloc failed to allocate more memory!\n")); - result = WERR_NOMEM; - goto done; - } - enum_values = ptr; + /* lookup the registry value */ - ZERO_STRUCTP( &enum_values[num_entries] ); + val = regval_ctr_specific_value( &p_data->keys[key_index].values, i ); + DEBUG(10,("retrieved value number [%d] [%s]\n", i, regval_name(val) )); /* copy the data */ - init_unistr(&enum_values[num_entries].valuename, value); - enum_values[num_entries].value_len = (strlen(value)+1) * 2; - enum_values[num_entries].type = type; + value_name = regval_name( val ); + init_unistr( &enum_values[i].valuename, value_name ); + enum_values[i].value_len = (strlen(value_name)+1) * 2; + enum_values[i].type = regval_type( val ); - if ( data_len ) - { - if ( !(enum_values[num_entries].data = talloc_zero(p->mem_ctx, data_len)) ) { - DEBUG(0,("talloc_realloc failed to allocate more memory [data_len=%d] for data!\n", data_len )); + data_len = regval_size( val ); + if ( data_len ) { + if ( !(enum_values[i].data = talloc_memdup(p->mem_ctx, regval_data_p(val), data_len)) ) + { + DEBUG(0,("talloc_memdup failed to allocate memory [data_len=%d] for data!\n", + data_len )); result = WERR_NOMEM; goto done; } - memcpy(enum_values[num_entries].data, data, data_len); } - - enum_values[num_entries].data_len = data_len; + enum_values[i].data_len = data_len; /* keep track of the size of the array in bytes */ needed += spoolss_size_printer_enum_values(&enum_values[num_entries]); - - num_entries++; - param_index++; } - r_u->needed = needed; - r_u->returned = num_entries; + r_u->needed = needed; + r_u->returned = num_entries; if (needed > in_size) { result = WERR_MORE_DATA; From 31514f67ae28844deb85a031fb707bff12dc7b76 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 16 Aug 2002 16:46:50 +0000 Subject: [PATCH 254/262] fix small bug in enumprinterdataex due to my changes (still more lurking though). (This used to be commit 2feb89601fc45dea13fe45a55a9c058726a5de84) --- source3/rpc_server/srv_spoolss_nt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 2aa11530f80..b6a7eeee6cf 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -8113,9 +8113,11 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ /* keep track of the size of the array in bytes */ - needed += spoolss_size_printer_enum_values(&enum_values[num_entries]); + needed += spoolss_size_printer_enum_values(&enum_values[i]); } + /* housekeeping information in the reply */ + r_u->needed = needed; r_u->returned = num_entries; From 3a226d149db5ddca14448640818f2d51380a331c Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 16 Aug 2002 17:35:38 +0000 Subject: [PATCH 255/262] Return access granted in create_user2. (This used to be commit 8ebc295f4a487993474390e0686d2aa9313be8d1) --- source3/rpc_server/srv_samr_nt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index ee404534823..a30622c6008 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2364,9 +2364,7 @@ NTSTATUS _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_ r_u->user_rid=pdb_get_user_rid(sam_pass); - /* This should probably be some subset of q_u->access_mask */ - - r_u->access_granted = 0x000703ff; + r_u->access_granted = acc_granted; pdb_free_sam(&sam_pass); From f56e06476fed5dda04ce12734aeb6efc9bf2d0a4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 17 Aug 2002 00:38:20 +0000 Subject: [PATCH 256/262] fix seg fault in _spoolss_enumprinterkey after changes... add SPOOL_PNPDATA_KEY define (This used to be commit cdaa3f55e1fcc38b1d7a63d502a9fea3b92bf193) --- source3/include/nt_printing.h | 1 + source3/rpc_server/srv_spoolss_nt.c | 48 +++++++++++++++++------------ 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 6303136894a..5e2b8f7f64a 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -180,6 +180,7 @@ typedef struct nt_printer_driver_info_level #define SPOOL_DSSPOOLER_KEY "DsSpooler" #define SPOOL_DSDRIVER_KEY "DsDriver" #define SPOOL_DSUSER_KEY "DsUser" +#define SPOOL_PNPDATA_KEY "PnPData" /* container for a single registry key */ diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index b6a7eeee6cf..2c1dbefd8b3 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -7917,57 +7917,66 @@ WERROR _spoolss_deleteprinterdataex(pipes_struct *p, SPOOL_Q_DELETEPRINTERDATAEX * spoolss_enumprinterkey ********************************************************************/ -/* constants for EnumPrinterKey() */ -#define ENUMERATED_KEY_SIZE 19 WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPOOL_R_ENUMPRINTERKEY *r_u) { fstring key; - uint16 enumkeys[ENUMERATED_KEY_SIZE+1]; + uint16 *enumkeys = NULL; char* ptr = NULL; int i; - char *PrinterKey = SPOOL_PRINTERDATA_KEY; + int printerkey_len = strlen(SPOOL_PRINTERDATA_KEY)+1; DEBUG(4,("_spoolss_enumprinterkey\n")); - unistr2_to_ascii(key, &q_u->key, sizeof(key) - 1); + unistr2_to_ascii( key, &q_u->key, sizeof(key)-1 ); /* * we only support enumating all keys (key == "") * Of course, the only key we support is the "PrinterDriverData" * key - */ - if (strlen(key) == 0) + */ + + if ( !strlen( key ) ) { - r_u->needed = ENUMERATED_KEY_SIZE *2; - if (q_u->size < r_u->needed) + r_u->needed = printerkey_len*2; + + if ( q_u->size < r_u->needed ) return WERR_MORE_DATA; - ptr = PrinterKey; - for (i=0; imem_ctx, printerkey_len*2 )) ) { + DEBUG(0,("_spoolss_enumprinterkey: talloc() failed for [%d] bytes!\n", + printerkey_len)); + return WERR_NOMEM; + } + + ptr = SPOOL_PRINTERDATA_KEY; + for ( i=0; i<(printerkey_len-1); i++ ) { enumkeys[i] = (uint16)(*ptr); ptr++; } - /* tag of with 2 '\0's */ - enumkeys[i++] = '\0'; - enumkeys[i] = '\0'; + /* tag of '\0's */ + + enumkeys[i] = 0x0; - if (!make_spoolss_buffer5(p->mem_ctx, &r_u->keys, ENUMERATED_KEY_SIZE, enumkeys)) + if (!make_spoolss_buffer5(p->mem_ctx, &r_u->keys, printerkey_len, enumkeys)) return WERR_BADFILE; return WERR_OK; } /* The "PrinterDriverData" key should have no subkeys */ - if (strcmp(key, PrinterKey) == 0) + if ( strcmp(key, SPOOL_PRINTERDATA_KEY) == 0 ) { - r_u-> needed = 2; + uint16 dummy_key = 0; + + r_u->needed = 2; + if (q_u->size < r_u->needed) return WERR_MORE_DATA; - enumkeys[0] = 0x0; - if (!make_spoolss_buffer5(p->mem_ctx, &r_u->keys, 1, enumkeys)) + + if ( !make_spoolss_buffer5(p->mem_ctx, &r_u->keys, 1, &dummy_key ) ) return WERR_BADFILE; return WERR_OK; @@ -7976,6 +7985,7 @@ WERROR _spoolss_enumprinterkey(pipes_struct *p, SPOOL_Q_ENUMPRINTERKEY *q_u, SPO /* The return value for an unknown key is documented in MSDN EnumPrinterKey description */ + return WERR_BADFILE; } From a27ec4a0118e4443e76f706b715c95c17ce60595 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 Aug 2002 04:51:27 +0000 Subject: [PATCH 257/262] Rework the 'guest account get's RID 501' code again... This moves it right into the passdb subsystem, where we can do this in just one (or 2) places. Due to the fact that this code can be in a tight loop, I've had to make 'guest account' a 'const' paramater, where % macros cannot be used. In any case, if the 'guest account' varies, we are in for some nasty cases in the other code, so it's useful anyway. Andrew Bartlett (This used to be commit 8718e5e7b2651edad15f52a4262dc745df7ad70f) --- docs/docbook/manpages/smb.conf.5.sgml | 4 ++ source3/param/loadparm.c | 2 +- source3/passdb/passdb.c | 76 +++++++++++++-------------- source3/passdb/pdb_unix.c | 27 +++++++--- 4 files changed, 62 insertions(+), 47 deletions(-) diff --git a/docs/docbook/manpages/smb.conf.5.sgml b/docs/docbook/manpages/smb.conf.5.sgml index 2aeb312924a..1e713147c99 100644 --- a/docs/docbook/manpages/smb.conf.5.sgml +++ b/docs/docbook/manpages/smb.conf.5.sgml @@ -2769,6 +2769,10 @@ su - command) and trying to print using the system print command such as lpr(1) or lp(1). + + This paramater does not accept % marcos, becouse + many parts of the system require this value to be + constant for correct operation Default: specified at compile time, usually "nobody" diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 9e4ce615e81..b16f4483f84 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1525,7 +1525,7 @@ FN_GLOBAL_STRING(lp_panic_action, &Globals.szPanicAction) FN_GLOBAL_STRING(lp_adduser_script, &Globals.szAddUserScript) FN_GLOBAL_STRING(lp_deluser_script, &Globals.szDelUserScript) -FN_GLOBAL_STRING(lp_guestaccount, &Globals.szGuestaccount) +FN_GLOBAL_CONST_STRING(lp_guestaccount, &Globals.szGuestaccount) FN_GLOBAL_STRING(lp_addgroup_script, &Globals.szAddGroupScript) FN_GLOBAL_STRING(lp_delgroup_script, &Globals.szDelGroupScript) FN_GLOBAL_STRING(lp_addusertogroup_script, &Globals.szAddUserToGroupScript) diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index fdcda0268dc..a9c6f0729bd 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -157,6 +157,12 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) { GROUP_MAP map; + const char *guest_account = lp_guestaccount(); + if (!(guest_account && *guest_account)) { + DEBUG(1, ("NULL guest account!?!?\n")); + return NT_STATUS_UNSUCCESSFUL; + } + if (!pwd) { return NT_STATUS_UNSUCCESSFUL; } @@ -183,23 +189,35 @@ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd) -- abartlet 11-May-02 */ - if (!pdb_set_user_sid_from_rid(sam_account, - fallback_pdb_uid_to_user_rid(pwd->pw_uid))) { - DEBUG(0,("Can't set User SID from RID!\n")); - return NT_STATUS_INVALID_PARAMETER; - } - /* call the mapping code here */ - if(get_group_map_from_gid(pwd->pw_gid, &map, MAPPING_WITHOUT_PRIV)) { - if (!pdb_set_group_sid(sam_account,&map.sid)){ - DEBUG(0,("Can't set Group SID!\n")); + /* Ensure this *must* be set right */ + if (strcmp(pwd->pw_name, guest_account) == 0) { + if (!pdb_set_user_sid_from_rid(sam_account, DOMAIN_USER_RID_GUEST)) { + return NT_STATUS_UNSUCCESSFUL; + } + if (!pdb_set_group_sid_from_rid(sam_account, DOMAIN_GROUP_RID_GUESTS)) { + return NT_STATUS_UNSUCCESSFUL; + } + } else { + + if (!pdb_set_user_sid_from_rid(sam_account, + fallback_pdb_uid_to_user_rid(pwd->pw_uid))) { + DEBUG(0,("Can't set User SID from RID!\n")); return NT_STATUS_INVALID_PARAMETER; } - } - else { - if (!pdb_set_group_sid_from_rid(sam_account,pdb_gid_to_group_rid(pwd->pw_gid))) { - DEBUG(0,("Can't set Group SID\n")); - return NT_STATUS_INVALID_PARAMETER; + + /* call the mapping code here */ + if(get_group_map_from_gid(pwd->pw_gid, &map, MAPPING_WITHOUT_PRIV)) { + if (!pdb_set_group_sid(sam_account,&map.sid)){ + DEBUG(0,("Can't set Group SID!\n")); + return NT_STATUS_INVALID_PARAMETER; + } + } + else { + if (!pdb_set_group_sid_from_rid(sam_account,pdb_gid_to_group_rid(pwd->pw_gid))) { + DEBUG(0,("Can't set Group SID\n")); + return NT_STATUS_INVALID_PARAMETER; + } } } @@ -574,14 +592,6 @@ BOOL local_lookup_sid(DOM_SID *sid, char *name, enum SID_NAME_USE *psid_name_use fstrcpy(name, "Administrator"); } return True; - - } else if (rid == DOMAIN_USER_RID_GUEST) { - char *p = lp_guestaccount(); - *psid_name_use = SID_NAME_USER; - if(!next_token(&p, name, NULL, sizeof(fstring))) - fstrcpy(name, "Guest"); - return True; - } /* @@ -597,6 +607,7 @@ BOOL local_lookup_sid(DOM_SID *sid, char *name, enum SID_NAME_USE *psid_name_use } /* This now does the 'generic' mapping in pdb_unix */ + /* 'guest' is also handled there */ if (pdb_getsampwsid(sam_account, sid)) { fstrcpy(name, pdb_get_username(sam_account)); *psid_name_use = SID_NAME_USER; @@ -845,23 +856,10 @@ BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_ return False; } - if (rid == DOMAIN_USER_RID_GUEST) { - struct passwd *pw = getpwnam_alloc(lp_guestaccount()); - if (!pw) { - DEBUG(1, ("getpwnam on guest account '%s' failed!\n", lp_guestaccount())); - return False; - } - *puid = pw->pw_uid; - passwd_free(&pw); - DEBUG(5,("local_sid_to_uid: Guest account (SID %s) mapped to guest account id %ld.\n", - sid_to_string(str, psid), (signed long int)(*puid))); - } else { - - *puid = fallback_pdb_user_rid_to_uid(rid); - - DEBUG(5,("local_sid_to_uid: SID %s algorithmicly mapped to %ld mapped becouse SID was not found in passdb.\n", - sid_to_string(str, psid), (signed long int)(*puid))); - } + *puid = fallback_pdb_user_rid_to_uid(rid); + + DEBUG(5,("local_sid_to_uid: SID %s algorithmicly mapped to %ld mapped becouse SID was not found in passdb.\n", + sid_to_string(str, psid), (signed long int)(*puid))); } *name_type = SID_NAME_USER; diff --git a/source3/passdb/pdb_unix.c b/source3/passdb/pdb_unix.c index 88334f2b703..06f12164eb8 100644 --- a/source3/passdb/pdb_unix.c +++ b/source3/passdb/pdb_unix.c @@ -49,19 +49,32 @@ static BOOL unixsam_getsampwrid (struct pdb_methods *methods, { struct passwd *pass; BOOL ret = False; + const char *guest_account = lp_guestaccount(); + if (!(guest_account && *guest_account)) { + DEBUG(1, ("NULL guest account!?!?\n")); + return False; + } + if (!methods) { DEBUG(0,("invalid methods\n")); return False; } - - if (pdb_rid_is_user(rid)) { - pass = getpwuid_alloc(fallback_pdb_user_rid_to_uid (rid)); - - if (pass) { - ret = NT_STATUS_IS_OK(pdb_fill_sam_pw(user, pass)); - passwd_free(&pass); + + if (rid == DOMAIN_USER_RID_GUEST) { + pass = getpwnam_alloc(guest_account); + if (!pass) { + DEBUG(1, ("guest account %s does not seem to exist...\n", guest_account)); + return False; } + } else if (pdb_rid_is_user(rid)) { + pass = getpwuid_alloc(fallback_pdb_user_rid_to_uid (rid)); + } else { + return False; } + + ret = NT_STATUS_IS_OK(pdb_fill_sam_pw(user, pass)); + passwd_free(&pass); + return ret; } From ba1d3482653d2bfef0a9d233f118654dd7144ab3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 Aug 2002 04:56:38 +0000 Subject: [PATCH 258/262] The idea of this function is not to touch the argument, so make it const too... (This used to be commit 8a63fe45058b15c15d79e15387e908564cfe5c2d) --- source3/lib/util_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 3b5ceb2217c..19d92eec8fb 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -214,7 +214,7 @@ int strwicmp(const char *psz1, const char *psz2) /* Convert a string to upper case, but don't modify it */ -char *strupper_static(char *s) +char *strupper_static(const char *s) { static pstring str; From 22404245b4f283197126479da23affd88f1ee8b3 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 Aug 2002 05:26:58 +0000 Subject: [PATCH 259/262] Becouse of changes to the meaning of this feild over time, this doesn't actually work. Also, the idea of 'loopback winbind' isn't that bad an idea anyway (potential PDC/BDC applications). Given all that, remove it... Andrew Bartlett (This used to be commit fc0d6e53fce1d05b16ec58c0bdc38aa8da4422c0) --- source3/nsswitch/wb_common.c | 17 ----------------- source3/smbd/server.c | 5 ----- 2 files changed, 22 deletions(-) diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 89dd6252412..9bc9faafb50 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -28,7 +28,6 @@ /* Global variables. These are effectively the client state information */ int winbindd_fd = -1; /* fd for winbindd socket */ -static char *excluded_domain; /* Free a response structure */ @@ -40,16 +39,6 @@ void free_response(struct winbindd_response *response) SAFE_FREE(response->extra_data); } -/* - smbd needs to be able to exclude lookups for its own domain -*/ -void winbind_exclude_domain(const char *domain) -{ - SAFE_FREE(excluded_domain); - excluded_domain = strdup(domain); -} - - /* Initialise a request structure */ void init_request(struct winbindd_request *request, int request_type) @@ -325,12 +314,6 @@ NSS_STATUS winbindd_send_request(int req_type, struct winbindd_request *request) return NSS_STATUS_NOTFOUND; } - /* smbd may have excluded this domain */ - if (excluded_domain && - strcasecmp(excluded_domain, request->domain) == 0) { - return NSS_STATUS_NOTFOUND; - } - if (!request) { ZERO_STRUCT(lrequest); request = &lrequest; diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 41b55b96229..b2b905cec35 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -808,11 +808,6 @@ static void usage(char *pname) init_structs(); - /* don't call winbind for our domain if we are the DC */ - if (lp_domain_logons()) { - winbind_exclude_domain(lp_workgroup()); - } - #ifdef WITH_PROFILE if (!profile_setup(False)) { DEBUG(0,("ERROR: failed to setup profiling\n")); From c4ebde6b4b6a4e7a42ac2cc89216df1cad42a5f5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 Aug 2002 06:34:41 +0000 Subject: [PATCH 260/262] Add 'const'. (This used to be commit 8955f3d63a9d9e5da76331996fba42dc105737da) --- source3/smbd/password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 6d922139e70..cfac7cf695f 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -184,7 +184,7 @@ has been given. vuid is biased by an offset. This allows us to tell random client vuid's (normally zero) from valid vuids. ****************************************************************************/ -int register_vuid(auth_serversupplied_info *server_info, char *smb_name) +int register_vuid(auth_serversupplied_info *server_info, const char *smb_name) { user_struct *vuser = NULL; uid_t uid; From 717b27c005311efe50aae7033a5e8c0908ea3abe Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 Aug 2002 06:36:18 +0000 Subject: [PATCH 261/262] Add const. (This used to be commit fb28abd120310a591bdf5fa1afc5521443c3d34c) --- source3/smbd/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 26e00aa49f3..6f83a2d3b75 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -347,7 +347,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser, } if (lp_guest_only(snum)) { - char *guestname = lp_guestaccount(); + const char *guestname = lp_guestaccount(); guest = True; force = True; pass = getpwnam_alloc(guestname); From 8690b271a6a4feb112e0a6c03fe99ee25f86430b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 17 Aug 2002 07:09:22 +0000 Subject: [PATCH 262/262] Move tridge's getgrouplist() replacement function from replace.c to a new 'system_smbd.c' file, where it can link with become_root() and unbecome_root(), and therefore avoiding some nasty 'it workes on linux' bugs. (The replacement function is implemented in terms of initgroups(), which is naturally only avaliable to root). Andrew Bartlett (This used to be commit a91018dd026be3db473bb1cf1f4981295f9758e4) --- source3/Makefile.in | 8 ++- source3/lib/replace.c | 64 ----------------------- source3/lib/system_smbd.c | 105 ++++++++++++++++++++++++++++++++++++++ source3/lib/util_getent.c | 35 ------------- source3/lib/util_smbd.c | 65 +++++++++++++++++++++++ 5 files changed, 176 insertions(+), 101 deletions(-) create mode 100644 source3/lib/system_smbd.c create mode 100644 source3/lib/util_smbd.c diff --git a/source3/Makefile.in b/source3/Makefile.in index 696a80c412a..2db6d550113 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -140,6 +140,8 @@ LIB_OBJ = lib/charcnv.o lib/debug.o lib/fault.o \ lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \ lib/adt_tree.o lib/popt_common.o $(TDB_OBJ) +LIB_SMBD_OBJ = lib/system_smbd.o lib/util_smbd.o + READLINE_OBJ = lib/readline.o UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \ @@ -265,7 +267,8 @@ SMBD_OBJ = $(SMBD_OBJ1) $(MSDFS_OBJ) $(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) \ $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(QUOTAOBJS) $(OPLOCK_OBJ) \ $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \ $(LIBMSRPC_OBJ) $(LIBMSRPC_SERVER_OBJ) \ - $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) + $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) \ + $(LIB_SMBD_OBJ) NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \ @@ -442,7 +445,8 @@ PROTO_OBJ = $(SMBD_OBJ1) $(NMBD_OBJ1) $(SWAT_OBJ1) $(LIB_OBJ) $(LIBSMB_OBJ) \ $(AUTH_OBJ) $(PARAM_OBJ) $(LOCKING_OBJ) $(SECRETS_OBJ) \ $(PRINTING_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) $(NOTIFY_OBJ) \ $(QUOTAOBJS) $(PASSDB_OBJ) $(GROUPDB_OBJ) $(MSDFS_OBJ) \ - $(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) + $(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) \ + $(LIB_SMBD_OBJ) NSS_OBJ_0 = nsswitch/wins.o $(PARAM_OBJ) $(UBIQX_OBJ) $(LIBSMB_OBJ) \ $(LIB_OBJ) $(NSSWINS_OBJ) diff --git a/source3/lib/replace.c b/source3/lib/replace.c index e2664accfa7..fd7b2cf7f01 100644 --- a/source3/lib/replace.c +++ b/source3/lib/replace.c @@ -430,67 +430,3 @@ char *rep_inet_ntoa(struct in_addr ip) #endif /* HAVE_VSYSLOG */ -#ifndef HAVE_GETGROUPLIST -/* - This is a *much* faster way of getting the list of groups for a user - without changing the current supplemenrary group list. The old - method used getgrent() which could take 20 minutes on a really big - network with hundeds of thousands of groups and users. The new method - takes a couple of seconds. - - NOTE!! this function only works if it is called as root! - */ - int getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) -{ - gid_t *gids_saved; - int ret, ngrp_saved; - - /* work out how many groups we need to save */ - ngrp_saved = getgroups(0, NULL); - if (ngrp_saved == -1) { - /* this shouldn't happen */ - return -1; - } - - gids_saved = (gid_t *)malloc(sizeof(gid_t) * (ngrp_saved+1)); - if (!gids_saved) { - errno = ENOMEM; - return -1; - } - - ngrp_saved = getgroups(ngrp_saved, gids_saved); - if (ngrp_saved == -1) { - free(gids_saved); - /* very strange! */ - return -1; - } - - if (initgroups(user, gid) != 0) { - free(gids_saved); - return -1; - } - - /* this must be done to cope with systems that put the current egid in the - return from getgroups() */ - save_re_gid(); - set_effective_gid(gid); - setgid(gid); - - ret = getgroups(*grpcnt, groups); - if (ret >= 0) { - *grpcnt = ret; - } - - restore_re_gid(); - - if (setgroups(ngrp_saved, gids_saved) != 0) { - /* yikes! */ - DEBUG(0,("ERROR: getgrouplist: failed to reset group list!\n")); - free(gids_saved); - return -1; - } - - free(gids_saved); - return ret; -} -#endif diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c new file mode 100644 index 00000000000..28ceaf39390 --- /dev/null +++ b/source3/lib/system_smbd.c @@ -0,0 +1,105 @@ +/* + Unix SMB/CIFS implementation. + system call wrapper interface. + Copyright (C) Andrew Tridgell 2002 + Copyright (C) Andrew Barteltt 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +/* + This file may assume linkage with smbd - for things like become_root() + etc. +*/ + +#include "includes.h" + +#ifndef HAVE_GETGROUPLIST +/* + This is a *much* faster way of getting the list of groups for a user + without changing the current supplemenrary group list. The old + method used getgrent() which could take 20 minutes on a really big + network with hundeds of thousands of groups and users. The new method + takes a couple of seconds. + + NOTE!! this function only works if it is called as root! + */ +static int getgrouplist_internals(const char *user, gid_t gid, gid_t *groups, int *grpcnt) +{ + gid_t *gids_saved; + int ret, ngrp_saved; + + /* work out how many groups we need to save */ + ngrp_saved = getgroups(0, NULL); + if (ngrp_saved == -1) { + /* this shouldn't happen */ + return -1; + } + + gids_saved = (gid_t *)malloc(sizeof(gid_t) * (ngrp_saved+1)); + if (!gids_saved) { + errno = ENOMEM; + return -1; + } + + ngrp_saved = getgroups(ngrp_saved, gids_saved); + if (ngrp_saved == -1) { + free(gids_saved); + /* very strange! */ + return -1; + } + + if (initgroups(user, gid) != 0) { + free(gids_saved); + return -1; + } + + /* this must be done to cope with systems that put the current egid in the + return from getgroups() */ + save_re_gid(); + set_effective_gid(gid); + setgid(gid); + + ret = getgroups(*grpcnt, groups); + if (ret >= 0) { + *grpcnt = ret; + } + + restore_re_gid(); + + if (setgroups(ngrp_saved, gids_saved) != 0) { + /* yikes! */ + DEBUG(0,("ERROR: getgrouplist: failed to reset group list!\n")); + smb_panic("getgrouplist: failed to reset group list!\n"); + free(gids_saved); + return -1; + } + + free(gids_saved); + return ret; +} +#endif + +int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grpcnt) +{ +#ifdef HAVE_GETGROUPLIST + return getgrouplist(user, gid, groups, grpcnt); +#else + int retval; + become_root(); + retval = getgrouplist_internals(user, gid, groups, grpcnt); + unbecome_root(); +#endif +} diff --git a/source3/lib/util_getent.c b/source3/lib/util_getent.c index 5d2fcd76522..6699ce3e923 100644 --- a/source3/lib/util_getent.c +++ b/source3/lib/util_getent.c @@ -299,38 +299,3 @@ void free_userlist(struct sys_userlist *list_head) SAFE_FREE(old_head); } } - - -/* - return a full list of groups for a user - - returns the number of groups the user is a member of. The return will include the - users primary group. - - remember to free the resulting gid_t array - - NOTE! you must be root to call this function on some systems -*/ -int getgroups_user(const char *user, gid_t **groups) -{ - struct passwd *pwd; - int ngrp, max_grp; - - pwd = getpwnam(user); - if (!pwd) return -1; - - max_grp = groups_max(); - (*groups) = (gid_t *)malloc(sizeof(gid_t) * max_grp); - if (! *groups) { - errno = ENOMEM; - return -1; - } - - ngrp = getgrouplist(user, pwd->pw_gid, *groups, &max_grp); - if (ngrp <= 0) { - free(*groups); - return ngrp; - } - - return ngrp; -} diff --git a/source3/lib/util_smbd.c b/source3/lib/util_smbd.c new file mode 100644 index 00000000000..071f20b4162 --- /dev/null +++ b/source3/lib/util_smbd.c @@ -0,0 +1,65 @@ +/* + Unix SMB/CIFS implementation. + Samba utility functions, used in smbd only + Copyright (C) Andrew Tridgell 2002 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" + +/* + This function requires sys_getgrouplist - which is only + available in smbd due to it's use of become_root() in a + legacy systems hack. +*/ + +/* + return a full list of groups for a user + + returns the number of groups the user is a member of. The return will include the + users primary group. + + remember to free the resulting gid_t array + + NOTE! uses become_root() to gain correct priviages on systems + that lack a native getgroups() call (uses initgroups and getgroups) +*/ +int getgroups_user(const char *user, gid_t **groups) +{ + struct passwd *pwd; + int ngrp, max_grp; + + pwd = getpwnam_alloc(user); + if (!pwd) return -1; + + max_grp = groups_max(); + (*groups) = (gid_t *)malloc(sizeof(gid_t) * max_grp); + if (! *groups) { + passwd_free(&pwd); + errno = ENOMEM; + return -1; + } + + ngrp = sys_getgrouplist(user, pwd->pw_gid, *groups, &max_grp); + if (ngrp <= 0) { + passwd_free(&pwd); + free(*groups); + return ngrp; + } + + passwd_free(&pwd); + return ngrp; +}