diff options
author | Jeremy Allison <jra@samba.org> | 2002-02-02 21:28:10 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-02-02 21:28:10 +0000 |
commit | a2876f9ded3b175390a8690892c1aeaedae02cfa (patch) | |
tree | 61f433503df7285f61e3c1404518db5fc7443670 /source | |
parent | 9f33fd624576aacee1e059f30cfd958790945f2f (diff) | |
download | samba-a2876f9ded3b175390a8690892c1aeaedae02cfa.tar.gz samba-a2876f9ded3b175390a8690892c1aeaedae02cfa.tar.xz samba-a2876f9ded3b175390a8690892c1aeaedae02cfa.zip |
2.2.3 now in sync.
Jeremy.
Diffstat (limited to 'source')
-rwxr-xr-x | source/configure | 20 | ||||
-rw-r--r-- | source/configure.in | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd.c | 2 | ||||
-rw-r--r-- | source/nsswitch/winbindd_group.c | 3 | ||||
-rw-r--r-- | source/nsswitch/winbindd_pam.c | 2 | ||||
-rw-r--r-- | source/smbd/reply.c | 4 | ||||
-rw-r--r-- | source/smbd/trans2.c | 14 | ||||
-rw-r--r-- | source/smbd/vfs-wrap.c | 2 |
8 files changed, 27 insertions, 22 deletions
diff --git a/source/configure b/source/configure index aea495dfeb4..52dc6ebc8c8 100755 --- a/source/configure +++ b/source/configure @@ -2704,12 +2704,12 @@ else #line 2705 "configure" #include "confdefs.h" #include <stdio.h> -int main() +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:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2743,12 +2743,12 @@ else #line 2744 "configure" #include "confdefs.h" #include <stdio.h> -int main() +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:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2782,12 +2782,12 @@ else #line 2783 "configure" #include "confdefs.h" #include <stdio.h> -int main() +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:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -12936,7 +12936,7 @@ echo "configure:12935: checking whether to build winbind" >&5 # Initially, the value of $host_os decides whether winbind is supported case "$host_os" in - *linux*|*solaris*|*irix*) + *linux*|*solaris*|*irix*|*hpux11*) HAVE_WINBIND=yes ;; *) diff --git a/source/configure.in b/source/configure.in index fe53556cef3..504989344cb 100644 --- a/source/configure.in +++ b/source/configure.in @@ -2570,7 +2570,7 @@ AC_MSG_CHECKING(whether to build winbind) # Initially, the value of $host_os decides whether winbind is supported case "$host_os" in - *linux*|*solaris*|*irix*) + *linux*|*solaris*|*irix*|*hpux11*) HAVE_WINBIND=yes ;; *) diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 637260214ae..5dc28a43695 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -313,7 +313,9 @@ static struct dispatch_table dispatch_table[] = { /* PAM auth functions */ { WINBINDD_PAM_AUTH, winbindd_pam_auth, "PAM_AUTH" }, +#if ALLOW_WINBIND_AUTH_CRAP { WINBINDD_PAM_AUTH_CRAP, winbindd_pam_auth_crap, "AUTH_CRAP" }, +#endif { WINBINDD_PAM_CHAUTHTOK, winbindd_pam_chauthtok, "CHAUTHTOK" }, /* Enumeration functions */ diff --git a/source/nsswitch/winbindd_group.c b/source/nsswitch/winbindd_group.c index ac5534780b7..ad1abfc1f61 100644 --- a/source/nsswitch/winbindd_group.c +++ b/source/nsswitch/winbindd_group.c @@ -581,7 +581,7 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) struct getent_state *ent; struct winbindd_gr *group_list = NULL; int num_groups, group_list_ndx = 0, i, gr_mem_list_len = 0; - char *sep, *new_extra_data, *gr_mem_list = NULL; + char *new_extra_data, *gr_mem_list = NULL; DEBUG(3, ("[%5d]: getgrent\n", state->pid)); @@ -599,7 +599,6 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state) state->response.data.num_entries = 0; group_list = (struct winbindd_gr *)state->response.extra_data; - sep = lp_winbind_separator(); if (!(ent = state->getgrent_state)) return WINBINDD_ERROR; diff --git a/source/nsswitch/winbindd_pam.c b/source/nsswitch/winbindd_pam.c index 3e968c14737..2b6a79694d2 100644 --- a/source/nsswitch/winbindd_pam.c +++ b/source/nsswitch/winbindd_pam.c @@ -78,6 +78,7 @@ enum winbindd_result winbindd_pam_auth(struct winbindd_cli_state *state) /* Challenge Response Authentication Protocol */ +#if ALLOW_WINBIND_AUTH_CRAP enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) { NTSTATUS result; @@ -133,6 +134,7 @@ enum winbindd_result winbindd_pam_auth_crap(struct winbindd_cli_state *state) done: return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } +#endif /* Change a user password */ diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 0d89adf25b6..ae8d4b0ad47 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -603,8 +603,6 @@ static BOOL check_server_security(char *orig_user, char *domain, char *unix_user smb_ntpasswd, smb_ntpasslen); if(ret) { - struct passwd *pwd = NULL; - /* * User validated ok against Domain controller. * If the admin wants us to try and create a UNIX @@ -614,7 +612,7 @@ static BOOL check_server_security(char *orig_user, char *domain, char *unix_user * due to a bad password, or the user really doesn't exist. */ - if(lp_adduser_script() && !(pwd = smb_getpwnam(unix_user,True))) + if(lp_adduser_script() && !smb_getpwnam(unix_user,True)) smb_create_user(unix_user, NULL); } diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 4c34603bff5..b90f7537ca1 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -2188,6 +2188,7 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in #endif fstring last_component; pstring link_dest; + pstring link_test; char *p; BOOL bad_path = False; SMB_STRUCT_STAT sbuf; @@ -2195,6 +2196,9 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in pstrcpy(link_dest, link_dest_in); unix_convert(link_dest,conn,0,&bad_path,&sbuf); + /* Store the UNIX converted path. */ + pstrcpy(link_dest_out, link_dest); + p = strrchr(link_dest, '/'); if (p) { fstrcpy(last_component, p+1); @@ -2213,18 +2217,18 @@ static int ensure_link_is_safe(connection_struct *conn, const char *link_dest_in if (*link_dest != '/') { /* Relative path. */ - pstrcpy(link_dest_out, conn->connectpath); - pstrcat(link_dest_out, "/"); - pstrcat(link_dest_out, link_dest); + pstrcpy(link_test, conn->connectpath); + pstrcat(link_test, "/"); + pstrcat(link_test, link_dest); } else { - pstrcpy(link_dest_out, link_dest); + pstrcpy(link_test, link_dest); } /* * Check if the link is within the share. */ - if (strncmp(conn->connectpath, link_dest_out, strlen(conn->connectpath))) { + if (strncmp(conn->connectpath, link_test, strlen(conn->connectpath))) { errno = EACCES; return -1; } diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c index 7d84e8756eb..1fa9e72fcc3 100644 --- a/source/smbd/vfs-wrap.c +++ b/source/smbd/vfs-wrap.c @@ -570,7 +570,7 @@ static int strict_allocate_ftruncate(files_struct *fsp, int fd, SMB_OFF_T len) SMB_STRUCT_STAT st; SMB_OFF_T currpos = vfs_ops->lseek(fsp, fd, 0, SEEK_CUR); unsigned char zero_space[4096]; - SMB_OFF_T space_to_write = len - st.st_size; + SMB_OFF_T space_to_write; if (currpos == -1) return -1; |