summaryrefslogtreecommitdiff
path: root/source/include
diff options
context:
space:
mode:
Diffstat (limited to 'source/include')
-rw-r--r--source/include/libsmbclient.h293
-rw-r--r--source/include/mangle.h2
-rw-r--r--source/include/messages.h5
-rw-r--r--source/include/rpc_dce.h4
-rw-r--r--source/include/smb.h5
-rw-r--r--source/include/smb_macros.h6
6 files changed, 279 insertions, 36 deletions
diff --git a/source/include/libsmbclient.h b/source/include/libsmbclient.h
index 68c4a053d1b..aaa19cb191b 100644
--- a/source/include/libsmbclient.h
+++ b/source/include/libsmbclient.h
@@ -471,7 +471,13 @@ struct _SMBCCTX {
*
* @note Do not forget to smbc_init_context() the returned SMBCCTX pointer !
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
SMBCCTX * smbc_new_context(void);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup misc
* Delete a SBMCCTX (a context) acquired from smbc_new_context().
@@ -494,8 +500,13 @@ SMBCCTX * smbc_new_context(void);
* just before exit()'ing. When shutdown_ctx is 0, this function can be
* use in periodical cleanup functions for example.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_free_context(SMBCCTX * context, int shutdown_ctx);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup misc
* Initialize a SBMCCTX (a context).
@@ -515,8 +526,13 @@ int smbc_free_context(SMBCCTX * context, int shutdown_ctx);
* but it might leak memory on smbc_context_init() failure. Avoid this.
* You'll have to call smbc_free_context() yourself on failure.
*/
-
+#ifdef __cplusplus
+extern "C" {
+#endif
SMBCCTX * smbc_init_context(SMBCCTX * context);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup misc
* Initialize the samba client library.
@@ -536,7 +552,13 @@ SMBCCTX * smbc_init_context(SMBCCTX * context);
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_init(smbc_get_auth_data_fn fn, int debug);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup misc
* Set or retrieve the compatibility library's context pointer
@@ -560,7 +582,13 @@ int smbc_init(smbc_get_auth_data_fn fn, int debug);
* authentication functions have been freed, if necessary.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
SMBCCTX * smbc_set_context(SMBCCTX * new_context);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup file
* Open a file on an SMB server.
@@ -613,8 +641,13 @@ SMBCCTX * smbc_set_context(SMBCCTX * new_context);
* try again with an empty username and password. This
* often gets mapped to the guest account on some machines.
*/
-
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_open(const char *furl, int flags, mode_t mode);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup file
* Create a file on an SMB server.
@@ -647,8 +680,13 @@ int smbc_open(const char *furl, int flags, mode_t mode);
* @see smbc_open()
*
*/
-
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_creat(const char *furl, mode_t mode);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup file
* Read from a file using an opened file handle.
@@ -670,8 +708,13 @@ int smbc_creat(const char *furl, mode_t mode);
* @see smbc_open(), smbc_write()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
ssize_t smbc_read(int fd, void *buf, size_t bufsize);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup file
* Write to a file using an opened file handle.
@@ -693,8 +736,13 @@ ssize_t smbc_read(int fd, void *buf, size_t bufsize);
* @see smbc_open(), smbc_read()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
ssize_t smbc_write(int fd, void *buf, size_t bufsize);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup file
* Seek to a specific location in a file.
@@ -724,8 +772,13 @@ ssize_t smbc_write(int fd, void *buf, size_t bufsize);
*
* @todo Are errno values complete and correct?
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
off_t smbc_lseek(int fd, off_t offset, int whence);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup file
* Close an open file handle.
@@ -738,8 +791,13 @@ off_t smbc_lseek(int fd, off_t offset, int whence);
*
* @see smbc_open(), smbc_creat()
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_close(int fd);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Unlink (delete) a file or directory.
@@ -762,8 +820,13 @@ int smbc_close(int fd);
*
* @todo Are errno values complete and correct?
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_unlink(const char *furl);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Rename or move a file or directory.
@@ -805,8 +868,13 @@ int smbc_unlink(const char *furl);
* share? I say no... NOTE. I agree for the moment.
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_rename(const char *ourl, const char *nurl);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Open a directory used to obtain directory entries.
@@ -828,8 +896,13 @@ int smbc_rename(const char *ourl, const char *nurl);
* @see smbc_getdents(), smbc_readdir(), smbc_closedir()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_opendir(const char *durl);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Close a directory handle opened by smbc_opendir().
@@ -841,8 +914,13 @@ int smbc_opendir(const char *durl);
*
* @see smbc_opendir()
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_closedir(int dh);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Get multiple directory entries.
@@ -870,8 +948,13 @@ int smbc_closedir(int dh);
*
* @todo Add example code so people know how to parse buffers.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_getdents(unsigned int dh, struct smbc_dirent *dirp, int count);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Get a single directory entry.
@@ -885,8 +968,13 @@ int smbc_getdents(unsigned int dh, struct smbc_dirent *dirp, int count);
*
* @see smbc_dirent, smbc_getdents(), smbc_open()
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
struct smbc_dirent* smbc_readdir(unsigned int dh);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Get the current directory offset.
@@ -908,8 +996,13 @@ struct smbc_dirent* smbc_readdir(unsigned int dh);
* @see smbc_readdir()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
off_t smbc_telldir(int dh);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* lseek on directories.
@@ -933,7 +1026,13 @@ off_t smbc_telldir(int dh);
*
* @todo In what does the reture and errno values mean?
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_lseekdir(int fd, off_t offset);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Create a directory.
@@ -956,8 +1055,13 @@ int smbc_lseekdir(int fd, off_t offset);
* @see smbc_rmdir()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_mkdir(const char *durl, mode_t mode);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup directory
* Remove a directory.
@@ -977,8 +1081,13 @@ int smbc_mkdir(const char *durl, mode_t mode);
*
* @todo Are errno values complete and correct?
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_rmdir(const char *durl);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Get information about a file or directory.
@@ -999,8 +1108,13 @@ int smbc_rmdir(const char *durl);
* @see Unix stat()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_stat(const char *url, struct stat *st);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Get file information via an file descriptor.
@@ -1020,8 +1134,13 @@ int smbc_stat(const char *url, struct stat *st);
* @see smbc_stat(), Unix stat()
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_fstat(int fd, struct stat *st);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribue
* Change the ownership of a file or directory.
@@ -1046,8 +1165,13 @@ int smbc_fstat(int fd, struct stat *st);
* @todo How do we abstract owner and group uid and gid?
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_chown(const char *url, uid_t owner, gid_t group);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Change the permissions of a file.
@@ -1069,7 +1193,13 @@ int smbc_chown(const char *url, uid_t owner, gid_t group);
*
* @todo Are errno values complete and correct?
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_chmod(const char *url, mode_t mode);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Change the last modification time on a file
@@ -1086,7 +1216,13 @@ int smbc_chmod(const char *url, mode_t mode);
* - EPERM Permission was denied.
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_utimes(const char *url, struct timeval *tbuf);
+#ifdef __cplusplus
+}
+#endif
#ifdef HAVE_UTIME_H
/**@ingroup attribute
@@ -1105,7 +1241,13 @@ int smbc_utimes(const char *url, struct timeval *tbuf);
* - EPERM Permission was denied.
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_utime(const char *fname, struct utimbuf *utbuf);
+#ifdef __cplusplus
+}
+#endif
#endif
/**@ingroup attribute
@@ -1207,12 +1349,17 @@ int smbc_utime(const char *fname, struct utimbuf *utbuf);
* sYsTeM.nt_sEc_desc.owNER
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_setxattr(const char *url,
const char *name,
const void *value,
size_t size,
int flags);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Set extended attributes for a file. This is used for modifying a file's
@@ -1317,12 +1464,17 @@ int smbc_setxattr(const char *url,
* sYsTeM.nt_sEc_desc.owNER
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_lsetxattr(const char *url,
const char *name,
const void *value,
size_t size,
int flags);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Set extended attributes for a file. This is used for modifying a file's
@@ -1424,12 +1576,17 @@ int smbc_lsetxattr(const char *url,
* sYsTeM.nt_sEc_desc.owNER
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_fsetxattr(int fd,
const char *name,
const void *value,
size_t size,
int flags);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Get extended attributes for a file.
@@ -1487,11 +1644,16 @@ int smbc_fsetxattr(int fd,
* extended attributes
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_getxattr(const char *url,
const char *name,
const void *value,
size_t size);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Get extended attributes for a file. The POSIX function which this maps to
@@ -1552,11 +1714,16 @@ int smbc_getxattr(const char *url,
* extended attributes
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_lgetxattr(const char *url,
const char *name,
const void *value,
size_t size);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Get extended attributes for a file.
@@ -1615,11 +1782,16 @@ int smbc_lgetxattr(const char *url,
* extended attributes
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_fgetxattr(int fd,
const char *name,
const void *value,
size_t size);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Remove extended attributes for a file. This is used for modifying a file's
@@ -1664,9 +1836,14 @@ int smbc_fgetxattr(int fd,
* extended attributes
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_removexattr(const char *url,
const char *name);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Remove extended attributes for a file. This is used for modifying a file's
@@ -1714,9 +1891,14 @@ int smbc_removexattr(const char *url,
* extended attributes
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_lremovexattr(const char *url,
const char *name);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* Remove extended attributes for a file. This is used for modifying a file's
@@ -1762,9 +1944,14 @@ int smbc_lremovexattr(const char *url,
* extended attributes
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_fremovexattr(int fd,
const char *name);
-
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* List the supported extended attribute names associated with a file
@@ -1796,9 +1983,15 @@ int smbc_fremovexattr(int fd,
* extended attributes at all. Whether this is a feature or
* a bug is yet to be decided.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_listxattr(const char *url,
char *list,
size_t size);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* List the supported extended attribute names associated with a file The
@@ -1834,9 +2027,15 @@ int smbc_listxattr(const char *url,
* extended attributes at all. Whether this is a feature or
* a bug is yet to be decided.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_llistxattr(const char *url,
char *list,
size_t size);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup attribute
* List the supported extended attribute names associated with a file
@@ -1869,9 +2068,15 @@ int smbc_llistxattr(const char *url,
* extended attributes at all. Whether this is a feature or
* a bug is yet to be decided.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_flistxattr(int fd,
char *list,
size_t size);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup print
* Print a file given the name in fname. It would be a URL ...
@@ -1888,7 +2093,13 @@ int smbc_flistxattr(int fd,
* and errors returned by smbc_open
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_print_file(const char *fname, const char *printq);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup print
* Open a print file that can be written to by other calls. This simply
@@ -1903,7 +2114,13 @@ int smbc_print_file(const char *fname, const char *printq);
* - all errors returned by smbc_open
*
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_open_print_job(const char *fname);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup print
* List the print jobs on a print share, for the moment, pass a callback
@@ -1916,7 +2133,13 @@ int smbc_open_print_job(const char *fname);
* - EINVAL fname was NULL or smbc_init not called
* - EACCES ???
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_list_print_jobs(const char *purl, smbc_list_print_job_fn fn);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup print
* Delete a print job
@@ -1930,7 +2153,13 @@ int smbc_list_print_jobs(const char *purl, smbc_list_print_job_fn fn);
*
* @todo what errno values are possible here?
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_unlink_print_job(const char *purl, int id);
+#ifdef __cplusplus
+}
+#endif
/**@ingroup callback
* Remove a server from the cached server list it's unused.
@@ -1942,6 +2171,12 @@ int smbc_unlink_print_job(const char *purl, int id);
* @return On success, 0 is returned. 1 is returned if the server could not
* be removed. Also useable outside libsmbclient.
*/
+#ifdef __cplusplus
+extern "C" {
+#endif
int smbc_remove_unused_server(SMBCCTX * context, SMBCSRV * srv);
+#ifdef __cplusplus
+}
+#endif
#endif /* SMBCLIENT_H_INCLUDED */
diff --git a/source/include/mangle.h b/source/include/mangle.h
index 769278d828b..1d7cdf73628 100644
--- a/source/include/mangle.h
+++ b/source/include/mangle.h
@@ -9,6 +9,6 @@ struct mangle_fns {
BOOL (*is_8_3)(const char *fname, BOOL check_case, BOOL allow_wildcards);
void (*reset)(void);
BOOL (*check_cache)(char *s);
- void (*name_map)(char *OutName, BOOL need83, BOOL cache83);
+ void (*name_map)(char *OutName, BOOL need83, BOOL cache83, int default_case);
};
#endif /* _MANGLE_H_ */
diff --git a/source/include/messages.h b/source/include/messages.h
index 37e9372cdaa..78f19fa0bdb 100644
--- a/source/include/messages.h
+++ b/source/include/messages.h
@@ -49,9 +49,10 @@
/* printing messages */
/* #define MSG_PRINTER_NOTIFY 2001*/ /* Obsolete */
-#define MSG_PRINTER_DRVUPGRADE 2002
-#define MSG_PRINTER_NOTIFY2 2003
+#define MSG_PRINTER_DRVUPGRADE 2002
+#define MSG_PRINTER_NOTIFY2 2003
#define MSG_PRINTERDATA_INIT_RESET 2004
+#define MSG_PRINTER_UPDATE 2005
/* smbd messages */
#define MSG_SMB_CONF_UPDATED 3001
diff --git a/source/include/rpc_dce.h b/source/include/rpc_dce.h
index 8266fc861f1..0df903109db 100644
--- a/source/include/rpc_dce.h
+++ b/source/include/rpc_dce.h
@@ -63,7 +63,9 @@ enum RPC_PKT_TYPE
#define NETSEC_AUTH_TYPE 0x44
#define NETSEC_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
#define NETSEC_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 }
-#define RPC_AUTH_NETSEC_CHK_LEN 0x20
+
+#define RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN 0x20
+#define RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN 0x18
/* The 7 here seems to be required to get Win2k not to downgrade us
to NT4. Actually, anything other than 1ff would seem to do... */
diff --git a/source/include/smb.h b/source/include/smb.h
index 30eb82ddf56..54a69d1433a 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -503,6 +503,11 @@ typedef struct connection_struct
time_t lastused;
BOOL used;
int num_files_open;
+
+ BOOL case_sensitive;
+ BOOL case_preserve;
+ BOOL short_case_preserve;
+
name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */
name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */
diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h
index e847714443a..bcbaa64f863 100644
--- a/source/include/smb_macros.h
+++ b/source/include/smb_macros.h
@@ -122,9 +122,9 @@
#define MAP_HIDDEN(conn) ((conn) && lp_map_hidden((conn)->service))
#define MAP_SYSTEM(conn) ((conn) && lp_map_system((conn)->service))
#define MAP_ARCHIVE(conn) ((conn) && lp_map_archive((conn)->service))
-#define IS_HIDDEN_PATH(conn,path) ((conn) && is_in_path((path),(conn)->hide_list))
-#define IS_VETO_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_list))
-#define IS_VETO_OPLOCK_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_oplock_list))
+#define IS_HIDDEN_PATH(conn,path) ((conn) && is_in_path((path),(conn)->hide_list,(conn)->case_sensitive))
+#define IS_VETO_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_list,(conn)->case_sensitive))
+#define IS_VETO_OPLOCK_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_oplock_list,(conn)->case_sensitive))
/*
* Used by the stat cache code to check if a returned