/*
Unix SMB/CIFS implementation.
- FAKE FILE suppport, for faking up special files windows want access to
+ FAKE FILE support, for faking up special files windows want access to
Copyright (C) Stefan (metze) Metzmacher 2003
This program is free software; you can redistribute it and/or modify
#ifndef _IDMAP_H_
#define _IDMAP_H_
-/*
+/*
Unix SMB/CIFS implementation.
Idmap headers
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* The interface version specifier.
+/* The interface version specifier.
Updated to 3 for enum types by JRA. */
/* Updated to 4, completely new interface, SSS */
the uid/gid and type. Gets back the SID. */
NTSTATUS (*unixids_to_sids)(struct idmap_domain *dom, struct id_map **ids);
- /* Map an arry of SIDs to uids/gids. The caller sets the SID
+ /* Map an array of SIDs to uids/gids. The caller sets the SID
and type and gets back a uid or gid. */
NTSTATUS (*sids_to_unixids)(struct idmap_domain *dom, struct id_map **ids);
struct autorid_range_config *range);
/**
- * Delete a domain#index <-> range maping from the database.
+ * Delete a domain#index <-> range mapping from the database.
* The mapping is specified by the sid and index.
* If force == true, invalid mapping records are deleted as far
* as possible, otherwise they are left untouched.
bool force);
/**
- * Delete a domain#index <-> range maping from the database.
+ * Delete a domain#index <-> range mapping from the database.
* The mapping is specified by the range number.
* If force == true, invalid mapping records are deleted as far
* as possible, otherwise they are left untouched.
/**
* @brief Set the 'client min protocol' and the 'client max protocol'.
*
- * IMPORTANT: This overrrides the values 'client min protocol' and 'client max
+ * IMPORTANT: This overrides the values 'client min protocol' and 'client max
* protocol' set in the smb.conf file!
*
* @param[in] c The smbc context to use.
* @param shutdown_ctx If 1, all connections and files will be closed even if they are busy.
*
*
- * @return Returns 0 on succes. Returns 1 on failure with errno set:
+ * @return Returns 0 on success. Returns 1 on failure with errno set:
* - EBUSY Server connections are still used, Files are open or cache
* could not be purged
* - EBADF context == NULL
*
* @param fd Open file handle from smbc_open() or smbc_creat()
*
- * @param buf Pointer to buffer to recieve read data
+ * @param buf Pointer to buffer to receive read data
*
* @param bufsize Size of buf in bytes
*
*
* @return The current location in the directory stream or -1
* if an error occur. The current location is not
- * an offset. Becuase of the implementation, it is a
+ * an offset. Because of the implementation, it is a
* handle that allows the library to find the entry
* later.
* - EBADF dh is not a valid directory handle
* @see smbc_telldir()
*
*
- * @todo In what does the reture and errno values mean?
+ * @todo In what does the return and errno values mean?
*/
int smbc_lseekdir(int fd, off_t offset);
* permissions of
*
* @param mode The permissions to set:
- * - Put good explaination of permissions here!
+ * - Put good explanation of permissions here!
*
* @return 0 on success, < 0 on error with errno set:
* - EPERM The effective UID does not match the owner
* - ENOMEM Insufficient was available.
* - ENOENT file or directory does not exist
*
- * @todo Actually implement this fuction?
+ * @todo Actually implement this function?
*
* @todo Are errno values complete and correct?
*/
* @param fname The URL of the print share to print to?
*
* @returns A file handle for the print file if successful.
- * Returns -1 if an error ocurred and errno has the values
+ * Returns -1 if an error occurred and errno has the values
* - EINVAL fname was NULL or smbc_init not called.
* - all errors returned by smbc_open
*
* @param srv pointer to server to remove
*
* @return On success, 0 is returned. 1 is returned if the server could not
- * be removed. Also useable outside libsmbclient.
+ * be removed. Also usable outside libsmbclient.
*/
int smbc_remove_unused_server(SMBCCTX * context, SMBCSRV * srv);
*
* @param lock_mutex
* Lock a mutex. This function should expect three parameters: plock,
- * lock_type, and location. The mutex aassociated with identifier plock
+ * lock_type, and location. The mutex associated with identifier plock
* should be locked if lock_type is 1, and unlocked if lock_type is 2. The
* location parameter can be used for debugging, as it contains the
* compiler-provided __location__ of the call.
/* shall we support browse requests via a FIFO to nmbd? */
#define ENABLE_FIFO 1
-/* how long (in miliseconds) to wait for a socket connect to happen */
+/* how long (in milliseconds) to wait for a socket connect to happen */
#define LONG_CONNECT_TIMEOUT 30000
#define SHORT_CONNECT_TIMEOUT 5000
/* the directory to sit in when idle */
/* #define IDLE_DIR "/" */
-/* Timout (in seconds) to wait for an oplock break
+/* Timeout (in seconds) to wait for an oplock break
message to return from the client. */
#define OPLOCK_BREAK_TIMEOUT 35
-/* Timout (in seconds) to add to the oplock break timeout
+/* Timeout (in seconds) to add to the oplock break timeout
to wait for the smbd to smbd message to return. */
#define OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR 2
/**
* CAVEAT:
*
- * While the messaging_send*() functions are synchronuous by API,
+ * While the messaging_send*() functions are synchronous by API,
* they trigger a tevent-based loop upon sending bigger messages.
*
- * Hence callers should not use these in purely synchonous code,
+ * Hence callers should not use these in purely synchronous code,
* but run a tevent_loop instead.
*/
NTSTATUS messaging_send(struct messaging_context *msg_ctx,
time_t refresh_time; /* The time the record should be refreshed. */
uint64_t id; /* unique id */
- struct in_addr wins_ip; /* the adress of the wins server this record comes from */
+ struct in_addr wins_ip; /* the address of the wins server this record comes from */
int wins_flags; /* similar to the netbios flags but different ! */
};
-/*
+/*
Unix SMB/CIFS implementation.
passdb structures and parameters
Copyright (C) Gerald Carter 2001
#define NEW_PW_FORMAT_SPACE_PADDED_LEN 14
-/* Password history contants. */
+/* Password history constants. */
#define PW_HISTORY_SALT_LEN 16
#define SALTED_MD5_HASH_LEN 16
#define PW_HISTORY_ENTRY_LEN (PW_HISTORY_SALT_LEN+SALTED_MD5_HASH_LEN)
/* a tag for who added the private methods */
const struct pdb_methods *backend_private_methods;
- void *backend_private_data;
+ void *backend_private_data;
void (*backend_private_data_free_fn)(void **);
/* maintain a copy of the user's struct passwd */
#define PDB_CAP_TRUSTED_DOMAINS_EX 0x0004
/*****************************************************************
- Functions to be implemented by the new (v2) passdb API
+ Functions to be implemented by the new (v2) passdb API
****************************************************************/
/*
* This next constant specifies the version number of the PASSDB interface
- * this SAMBA will load. Increment this if *ANY* changes are made to the interface.
+ * this SAMBA will load. Increment this if *ANY* changes are made to the interface.
* Changed interface to fix int -> size_t problems. JRA.
* There's no point in allocating arrays in
* samr_lookup_rids twice. It was done in the srv_samr_nt.c code as well as in
#define PASSDB_INTERFACE_VERSION 25
-struct pdb_methods
+struct pdb_methods
{
const char *name; /* What name got this module */
struct pdb_search *search,
const struct dom_sid *sid);
- /*
+ /*
* Instead of passing down a gid or uid, this function sends down a pointer
- * to a unixid.
+ * to a unixid.
*
* This acts as an in-out variable so that the idmap functions can correctly
* receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing
- * the cache to store ID_TYPE_UID or ID_TYPE_GID.
+ * the cache to store ID_TYPE_UID or ID_TYPE_GID.
*/
bool (*id_to_sid)(struct pdb_methods *methods, struct unixid *id,
struct dom_sid *sid);
bool (*get_trusteddom_pw)(struct pdb_methods *methods,
- const char *domain, char** pwd,
+ const char *domain, char** pwd,
struct dom_sid *sid, time_t *pass_last_set_time);
NTSTATUS (*get_trusteddom_creds)(struct pdb_methods *methods,
const char *domain,
TALLOC_CTX *mem_ctx,
struct cli_credentials **creds);
- bool (*set_trusteddom_pw)(struct pdb_methods *methods,
+ bool (*set_trusteddom_pw)(struct pdb_methods *methods,
const char* domain, const char* pwd,
const struct dom_sid *sid);
- bool (*del_trusteddom_pw)(struct pdb_methods *methods,
+ bool (*del_trusteddom_pw)(struct pdb_methods *methods,
const char *domain);
NTSTATUS (*enum_trusteddoms)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx, uint32_t *num_domains,
bool pdb_get_account_policy(enum pdb_policy_type type, uint32_t *value);
bool pdb_set_account_policy(enum pdb_policy_type type, uint32_t value);
bool pdb_get_seq_num(time_t *seq_num);
-/*
+/*
* Instead of passing down a gid or uid, this function sends down a pointer
- * to a unixid.
+ * to a unixid.
*
* This acts as an in-out variable so that the idmap functions can correctly
* receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing
- * the cache to store ID_TYPE_UID or ID_TYPE_GID.
+ * the cache to store ID_TYPE_UID or ID_TYPE_GID.
*/
bool pdb_id_to_sid(struct unixid *id, struct dom_sid *sid);
bool pdb_sid_to_id(const struct dom_sid *sid, struct unixid *id);
/*
* Global value meaning that the smb_uid field should be
- * ingored (in share level security and protocol level == CORE)
+ * ignored (in share level security and protocol level == CORE)
*/
#define UID_FIELD_INVALID 0
* const struct smb_filename *
* Version 35 - Change opendir from const char *, to
* const struct smb_filename *
- * Version 35 - Wrap aio async funtions args in a struct vfs_aio_state
+ * Version 35 - Wrap aio async functions args in a struct vfs_aio_state
* Version 35 - Change chmod from const char *, to
* const struct smb_filename *
* Version 35 - Change chmod_acl from const char *, to
* Currently Samba bases the decision whether to call POSIX open() on a
* client pathname or whether to leave the low-level handle at -1, what we
* call a stat-open, in the function open_file() and it is based on the
- * client requested SMB acccess mask.
+ * client requested SMB access mask.
*
* The set of rights that trigger an open() include READ_CONTROL_ACCESS,
* resulting in a call to open() with at least O_RDONLY. If the filesystem
struct files_struct *fsp,
uint32_t *dosmode);
- NTSTATUS (*fset_dos_attributes_fn)(struct vfs_handle_struct *hande,
+ NTSTATUS (*fset_dos_attributes_fn)(struct vfs_handle_struct *handle,
struct files_struct *fsp,
uint32_t dosmode);
};
/* Add a new FSP extension of the given type. Returns a pointer to the
- * extenstion data.
+ * extension data.
*/
#define VFS_ADD_FSP_EXTENSION(handle, fsp, type, destroy_fn) \
(type *)vfs_add_fsp_extension_notype(handle, (fsp), sizeof(type), (destroy_fn))