reformat changed functions.
(smbfs_get_host_and_username): Fix comment.
(smbfs_fill_names): Add username@ before hostname.
(smbfs_open_link): Use IPC$ if share is empty.
(smbfs_get_path): Pass remote_path to smbfs_open_link().
(smbfs_stat): Copy username@ to server_url if passed.
PACKAGE_STRING, PACKAGE_TARNAME and PACKAGE_VERSION
before including "samba/include/config.h" to prevent warnings.
(smbfs_init): Set DEBUGLEVEL to 0.
(do_connect): Rename to ...
(smbfs_do_connect): ... this to avoid namespace clash and
make static. Make server const. Adjust all callers.
(smbfs_add_dots): Remove.
(smbfs_stat): Remove code duplication.
(smbfs_lstat): Define as smbfs_stat.
entries into the linked list.
(smbfs_loaddir): Call smbfs_add_dots for shares or servers.
(smbfs_get_free_bucket): Eliminate utime.
(fake_share_stat): Make path const.
* samba/configure.in: Don't check whether getpass
should be replaced.
browsing_helper, loaddir_helper and server_browsing_helper.
(browsing_helper): Use new_dir_entry.
(loaddir_helper): Likewise.
(server_browsing_helper): Likewise.
(cached_lstat_info): Eliminated.
(smbfs_readdir): Make dirent_dest static const.
Eliminate cached_lstat_info.
(smbfs_open_link): Make user parameter const. Fix memory leak.
(fake_server_stat): Make path parameter const. Symplify.
(smbfs_fstat): Set my_errno to EFAULT before return.
authinfo_get_authinfo_from_user() to vfs_smb_get_authinfo()
and remove their definitions.
* vfs/vfs.h: Declare smb_authinfo and vfs_smb_get_authinfo().
(get_stat_info): Eliminate fake_stat, memory leak fixed.
(IPC, URL_HEADER): Make static const.
(smbfs_stat): Fix segmentation violation.
(statfile_helper): Allocate memory for single_entry once. It is never
freed now, and only my_stat element of this structure is used.
../src/tty.h and ../src/global.h.
(password, username): Made static.
(is_error): Commented out.
(loaddir_helper): Don't ignore hidden files, style fixes.
(browsing_helper): typestr declared as char *, fstrcpy replaced by =.
(do_connect): Call cli_shutdown () and authinfo_remove () if
cli_session_setup () fails. It is not good idea to remember
wrong username/password.
(smbfs_free_dir): Nested between #ifdef SMBFS_FREE_DIR ... #endif.
(smbfs_readdir): #ifdef SMBFS_FREE_DIR used instead of C comment.
NULL when appropriative error message can't be found as it is expected
in cli_errstr(). Return type changed to const char *
* smbfs.c (smbfs_fill_names): implemented
(smbfs_stat): unneeded g_strdup/g_free calls removed
(smbfs_loaddir): memory leaking fixed
* smbfs.c (smbfs_close): honour changed semantics for return value
(on error -1 is expected).
* (fs): it is at least strange use char * for counter. Changed to int
so use LC_ALL=C to override any locale
* smbfs.c (smbfs_open_link): service initialized
* (my_forget): new features of vfs_split_url used
smbfs.c at all: make gcc some more happy
* ftpfs.c (netrc_next): Turned strange "const char * const keywords"
into more alike "const char const * keywords". Still, think, it's
too strict.
* smbfs.c: Add #define BOOL_DEFINED before inclusion of samba headers.
Libncurses(or slang?) defines BOOL and that can cause problems. (In fact,
I can't find references to that const, but sure, I hade reason to do that:)
* util-alone.h: Declare load_anon_passwd() to avoid warnings.
Patch by Andrew V. Samoilov <sav@bcs.zp.ua>
* vfs.[ch] (vfs_canon, mc_open, vfs_file_is_local,
mc_(un)?getlocalcopy): added const qualifier
(mc_def_getlocalcopy): tempnam() returns malloc()ed buffer,
so, free() it, not g_free();
(vfs_canon): prepend filename by cwd when tilde '~' cannot be expanded;
* smbfs.c: #define NO_CONFIG_H before including the samba
includes; this way it will not re=define HAVE_LIBREADLINE. This
situation sucks. Should we change the names of the widget.h
history_*() functions?
1999-09-17 Federico Mena Quintero <federico@redhat.com>
* gmain.c (x_init_dlg): Display a warning if the GtkTed code path
is ever reached.
(xtoolkit_create_dialog): Likewise.
(x_add_widget): Likewise.
this dialog doesn't look perfect but at least it doesn't break gmc.
1999-09-14 Norbert Warmuth <nwarmuth@privat.circular.de>
* gnome/layout: Added the new samba password dialog.
* src/widget.[ch] (input_new): added const qualifier
* src/util.c (wipe_password): Check for NULL.
1999-09-14 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/smbfs.c (various places): Store filenames in memory with the unix
character set and convert it back to the dos character set when filenames
are passed back to the samba server. If samba is configured correctly
this will fix the problems with filenames which contain national characters.
(bucket_set_authinfo): Set domain, username and password which will
be used to log on and authenticate against the samba server and remember this
information on a host/share basis. If set use PASSWD to get the
password. If already authenticated against the host and share use this
information. If already authenticated against host and IPC$ use this
information. If neither of the former is true ask the user how to
log on.
(authinfo_get_authinfo_from_user): New function. Query the user for
domain, username and password to use for authentication.
(authinfo_free): New function. Free memory in authentication structure.
(authinfo_free_all): New function. Free the list used to remember
authentication information.
(authinfo_compare_host_and_share, authinfo_compare_host): New functions.
Helper functions used to search the authentication list.
(authinfo_add): New function. Add one authentication entry to the
authlist.
(authinfo_remove): New function. Remove one entry from the authlist.
(free_bucket): Free memory associated with one bucket.
(smbfs_get_free_bucket): Initialize the complete connection array
with 0. Free the memory allocated for a bucket and initialize the
bucket before reusing it.
(smbfs_open_link): use new functions to get authentication information
(get_stat_info, smbfs_stat): remove unused variables.
* configure.in (AC_WITH_SLANG): rm -f destination before makeing
a symbolic link (ln -sf doesn't work as expected on Solaris)
1999-08-19 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/smbfs.c: added missing include file
(browsing_helper): use g_strdup instead of g_new + pstrcpy
(Btw. this is an example why the handholding of smblib gives a
false security feeling. pstrcpy limits the number of characters
copied and is used with a buffer which is smaler than the hard
coded limit in pstrcpy)
(loaddir_helper): ditto
(server_browsing_helper): ditto
(get_remote_stat): fixed memory leaks
(smbfs_loaddir): ditto
(get_stat_info): ditto
(smbfs_stat): ditto
(convert_path): rewritten, now it's much cleaner what it does.
This rewrite was necessary because gcc -O2 choked on glibc 2.1
systems. In that combination strncat is a macro which expands to
strlen and strcat and in vfs/samba/include/includes.h the latter is
defined to __ERROR__XX__NEVER_USE_STRCAT___;.