Age | Commit message (Collapse) | Author | Files | Lines |
|
Add a function to set and escape the password properly.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
This behavior is demonstrably unsafe and not something we want to support
going forward.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
The UNC is currently handled as a single string and mount.cifs will
just munge it whenever it needs to change the delimiter type or
uppercase it, etc. This is tricky to handle correctly and means that
we often need to keep track of what's already been changed. Instead
of doing this, just track the pieces of the UNC in separate fields
in the parsed_mount_info, and then use those pieces to build strings
as needed.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
...and fill and use them accordingly.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
...rather than a buffer pointed to by a global var
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Allocate a zeroed out parsed_mount_info struct and have parse_options
put its info into that instead. realloc() is no longer used here and
instead we just have the option parser carefully check that the result
will fit in the buffer before copying it.
We also no longer use snprintf to stuff info directly into the buffer.
It may not be possible given the other checks, but snprintf can leave a
non-NULL terminated string. Use strlcat everywhere instead to ensure
that doesn't occur.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Currently mount.cifs puts mount info into a disparate series of
dynamically sized buffers. Declate a new struct that holds a set of
fixed-size buffers. The option and UNC parsing routines can place their
results in this struct.
This should make it easier to implement privilege separation using
shared memory to pass data between processes.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Rather than passing the VERSION string to the kernel in the ver=
option, track the OPTIONS_VERSION separately and pass that to the
kernel. If we ever need to have different behavior in kernel for
different mount.cifs versions, we can bump this number.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
...to help ensure that exit processing is handled appropriately.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Clean up error handling in main() so that cleanup tasks are completed
rather than assuming exit processing will handle it.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Now that we chdir() to the mountpoint, the checks in that function are
pointless. Just make it a noop for non-legacy setuid builds.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
They don't actually do anything.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Let getopt_long do the work of parsing options, then check what's left.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Get rid of a lot of unnecessary nesting.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
...remove some unneeded junk.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Rather than using a hardcoded version string, use the VERSION macro
that autoconf provides. This will help make it clear what version
is actually being used in bug reports when someone runs
"mount.cifs -V" or "cifs.upcall --version".
Also, clean up AC_INIT and AM_INIT_AUTOMAKE macros.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Make it so that cifs.upcall is built by default, but autodisable it if
the needed headers aren't present.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Remove references to samba(7).
There's no cifs-utils(7) man page, so don't refer to one.
Signed-off-by: Michael Wood <esiotrot@gmail.com>
|
|
These tools are no longer part of the Samba suite, so change the source
to cifs-utils 4.0.
Signed-off-by: Michael Wood <esiotrot@gmail.com>
|
|
...and throw a (hopefully) helpful error message if it's not present.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
<krb5.h> is deprecated in favor of <krb5/krb5.h>. Also, make autoconf
throw a more helpful error message if it's not present.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
suggest to install libtalloc-devel if talloc.h is missing
|
|
We're using talloc_init to get a context in these functions but they
aren't freeing them.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
|
|
Make sure we bail out if necessary functions and headers aren't present.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
...we don't want people to have to run autoreconf on their own, so
add them to the tree.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
mount.cifs.c: In function 'main':
mount.cifs.c:1201: warning: 'dev_name' may be used uninitialized in this function
mount.cifs.c:1217: warning: 'addr6' may be used uninitialized in this function
asn1.c: In function 'ber_read_OID_String':
asn1.c:591: warning: 'bytes_eaten' may be used uninitialized in this function
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
The client guide and manpage XML sources
...eventually we should add a way to build the manpages from XML
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|
|
...for now we just add them as regular troff manpages.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
|