smbfs/helpers: comment out unused code.

Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
This commit is contained in:
Andrew V. Samoilov 2018-01-17 00:01:53 +02:00 committed by Andrew Borodin
parent a02c353ab9
commit f963a74a8e
9 changed files with 30 additions and 19 deletions

View File

@ -258,7 +258,7 @@ load_interfaces (void)
interpret_interfaces (lp_interfaces (), &local_interfaces, "interface"); interpret_interfaces (lp_interfaces (), &local_interfaces, "interface");
} }
#if 0
/**************************************************************************** /****************************************************************************
override the defaults override the defaults
**************************************************************************/ **************************************************************************/
@ -283,7 +283,7 @@ iface_set_default (char *ip, char *bcast, char *nmask)
default_nmask = *interpret_addr2 (nmask); default_nmask = *interpret_addr2 (nmask);
} }
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************
check if an IP is one of mine check if an IP is one of mine
@ -298,6 +298,7 @@ ismyip (struct in_addr ip)
return False; return False;
} }
#if 0
/**************************************************************************** /****************************************************************************
check if a packet is from a local (known) net check if a packet is from a local (known) net
**************************************************************************/ **************************************************************************/
@ -310,6 +311,7 @@ is_local_net (struct in_addr from)
return True; return True;
return False; return False;
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************
how many interfaces do we have how many interfaces do we have
@ -325,6 +327,7 @@ iface_count (void)
return ret; return ret;
} }
#if 0
/**************************************************************************** /****************************************************************************
True if we have two or more interfaces. True if we have two or more interfaces.
**************************************************************************/ **************************************************************************/
@ -354,7 +357,7 @@ get_interface (int n)
return i; return i;
return NULL; return NULL;
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************
return IP of the Nth interface return IP of the Nth interface
**************************************************************************/ **************************************************************************/
@ -388,7 +391,7 @@ iface_find (struct in_addr ip)
return NULL; return NULL;
} }
#if 0
/**************************************************************************** /****************************************************************************
this function provides a simple hash of the configured interfaces. It is this function provides a simple hash of the configured interfaces. It is
used to detect a change in interfaces to tell us whether to discard used to detect a change in interfaces to tell us whether to discard
@ -410,7 +413,7 @@ iface_hash (void)
return ret; return ret;
} }
#endif /* 0 */
/* these 3 functions return the ip/bcast/nmask for the interface /* these 3 functions return the ip/bcast/nmask for the interface
most appropriate for the given ip address. If they can't find most appropriate for the given ip address. If they can't find

View File

@ -424,6 +424,7 @@ put_dos_date (char *buf, int offset, time_t unixdate)
SIVAL (buf, offset, x); SIVAL (buf, offset, x);
} }
#if 0
/******************************************************************* /*******************************************************************
put a dos date into a buffer (date/time format) put a dos date into a buffer (date/time format)
This takes GMT time and puts local time in the buffer This takes GMT time and puts local time in the buffer
@ -435,6 +436,7 @@ put_dos_date2 (char *buf, int offset, time_t unixdate)
x = ((x & 0xFFFF) << 16) | ((x & 0xFFFF0000) >> 16); x = ((x & 0xFFFF) << 16) | ((x & 0xFFFF0000) >> 16);
SIVAL (buf, offset, x); SIVAL (buf, offset, x);
} }
#endif /* 0 */
/******************************************************************* /*******************************************************************
put a dos 32 bit "unix like" date into a buffer. This routine takes put a dos 32 bit "unix like" date into a buffer. This routine takes

View File

@ -51,7 +51,7 @@ int lastport = 0;
int smb_read_error = 0; int smb_read_error = 0;
#if 0
/**************************************************************************** /****************************************************************************
determine if a file descriptor is in fact a socket determine if a file descriptor is in fact a socket
****************************************************************************/ ****************************************************************************/
@ -63,7 +63,7 @@ is_a_socket (int fd)
l = sizeof (int); l = sizeof (int);
return (getsockopt (fd, SOL_SOCKET, SO_TYPE, (char *) &v, &l) == 0); return (getsockopt (fd, SOL_SOCKET, SO_TYPE, (char *) &v, &l) == 0);
} }
#endif /* 0 */
enum SOCK_OPT_TYPES enum SOCK_OPT_TYPES
{ OPT_BOOL, OPT_INT, OPT_ON }; { OPT_BOOL, OPT_INT, OPT_ON };
@ -385,7 +385,7 @@ read_with_timeout (int fd, char *buf, size_t mincnt, size_t maxcnt, unsigned int
return ((ssize_t) nread); return ((ssize_t) nread);
} }
#if 0
/**************************************************************************** /****************************************************************************
send a keepalive packet (rfc1002) send a keepalive packet (rfc1002)
****************************************************************************/ ****************************************************************************/
@ -399,7 +399,7 @@ send_keepalive (int client)
return (write_data (client, (char *) buf, 4) == 4); return (write_data (client, (char *) buf, 4) == 4);
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************

View File

@ -1690,7 +1690,7 @@ cli_getattrE (struct cli_state * cli, int fd,
return True; return True;
} }
#if 0
/**************************************************************************** /****************************************************************************
do a SMBgetatr call do a SMBgetatr call
****************************************************************************/ ****************************************************************************/
@ -1741,7 +1741,7 @@ cli_getatr (struct cli_state * cli, char *fname, uint16 * attr, size_t * size, t
return True; return True;
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************
do a SMBsetatr call do a SMBsetatr call
@ -2720,6 +2720,7 @@ cli_error (struct cli_state *cli, uint8 * eclass, uint32 * num, uint32 * nt_rpc_
return EINVAL; return EINVAL;
} }
#if 0
/**************************************************************************** /****************************************************************************
set socket options on a open connection set socket options on a open connection
****************************************************************************/ ****************************************************************************/
@ -2739,6 +2740,7 @@ cli_setpid (struct cli_state *cli, uint16 pid)
cli->pid = pid; cli->pid = pid;
return ret; return ret;
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************
re-establishes a connection re-establishes a connection

View File

@ -303,8 +303,7 @@ resolve_bcast (const char *name, struct in_addr *return_ip, int name_type)
struct in_addr *iplist = NULL; struct in_addr *iplist = NULL;
int count; int count;
int num_interfaces = iface_count (); int num_interfaces = iface_count ();
static char so_broadcast[] = "SO_BROADCAST"; set_socket_options (sock, "SO_BROADCAST");
set_socket_options (sock, so_broadcast);
/* /*
* Lookup the name on all the interfaces, return on * Lookup the name on all the interfaces, return on
* the first successful match. * the first successful match.

View File

@ -102,7 +102,7 @@ pwd_read (struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt)
pwd_set_cleartext (pwd, user_pass); pwd_set_cleartext (pwd, user_pass);
} }
} }
#endif
/**************************************************************************** /****************************************************************************
stores a cleartext password stores a cleartext password
@ -116,6 +116,7 @@ pwd_set_nullpwd (struct pwd_info *pwd)
pwd->null_pwd = True; pwd->null_pwd = True;
pwd->crypted = False; pwd->crypted = False;
} }
#endif /* 0 */
/**************************************************************************** /****************************************************************************
stores a cleartext password stores a cleartext password

View File

@ -347,6 +347,7 @@ E_P24 (unsigned char *p21, unsigned char *c8, unsigned char *p24)
smbhash (p24 + 16, c8, p21 + 14, 1); smbhash (p24 + 16, c8, p21 + 14, 1);
} }
#if 0
void void
D_P16 (unsigned char *p14, unsigned char *in, unsigned char *out) D_P16 (unsigned char *p14, unsigned char *in, unsigned char *out)
{ {
@ -431,3 +432,4 @@ SamOEMhash (unsigned char *data, unsigned char *key, int val)
data[ind] = data[ind] ^ s_box[t]; data[ind] = data[ind] ^ s_box[t];
} }
} }
#endif /* 0 */

View File

@ -165,6 +165,7 @@ SMBOWFencrypt (uchar passwd[16], uchar * c8, uchar p24[24])
E_P24 (p21, c8, p24); E_P24 (p21, c8, p24);
} }
#if 0
/* Does the des encryption from the FIRST 8 BYTES of the NT or LM MD4 hash. */ /* Does the des encryption from the FIRST 8 BYTES of the NT or LM MD4 hash. */
void void
NTLMSSPOWFencrypt (uchar passwd[8], uchar * ntlmchalresp, uchar p24[24]) NTLMSSPOWFencrypt (uchar passwd[8], uchar * ntlmchalresp, uchar p24[24])
@ -183,7 +184,7 @@ NTLMSSPOWFencrypt (uchar passwd[8], uchar * ntlmchalresp, uchar p24[24])
dump_data (100, (char *) p24, 24); dump_data (100, (char *) p24, 24);
#endif #endif
} }
#endif /* 0 */
/* Does the NT MD4 hash then des encryption. */ /* Does the NT MD4 hash then des encryption. */

View File

@ -1953,7 +1953,7 @@ init_copymap (service * pservice)
pservice->copymap[i] = True; pservice->copymap[i] = True;
} }
#if 0
/*************************************************************************** /***************************************************************************
return the local pointer to a parameter given the service number and the return the local pointer to a parameter given the service number and the
pointer into the default structure pointer into the default structure
@ -1963,6 +1963,7 @@ lp_local_ptr (int snum, void *ptr)
{ {
return (void *) (((char *) pSERVICE (snum)) + PTR_DIFF (ptr, &sDefault)); return (void *) (((char *) pSERVICE (snum)) + PTR_DIFF (ptr, &sDefault));
} }
#endif /* 0 */
/*************************************************************************** /***************************************************************************
Process a parameter for a particular service number. If snum < 0 Process a parameter for a particular service number. If snum < 0
@ -2449,7 +2450,7 @@ lp_load (const char *pszFname, BOOL global_only, BOOL save_defaults, BOOL add_ip
return (bRetval); return (bRetval);
} }
#if 0
/*************************************************************************** /***************************************************************************
reset the max number of services reset the max number of services
***************************************************************************/ ***************************************************************************/
@ -2468,7 +2469,7 @@ lp_numservices (void)
{ {
return (iNumServices); return (iNumServices);
} }
#endif /* 0 */
/*************************************************************************** /***************************************************************************
Return the number of the service with the given name, or -1 if it doesn't Return the number of the service with the given name, or -1 if it doesn't
@ -2503,7 +2504,6 @@ volume_label (int snum)
return (lp_servicename (snum)); return (lp_servicename (snum));
return (ret); return (ret);
} }
#endif /* 0 */
/*********************************************************** /***********************************************************
Set the global name resolution order (used in smbclient). Set the global name resolution order (used in smbclient).
@ -2514,3 +2514,4 @@ lp_set_name_resolve_order (char *new_order)
{ {
Globals.szNameResolveOrder = new_order; Globals.szNameResolveOrder = new_order;
} }
#endif /* 0 */