mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
smbfs/helpers: comment out unused code.
Signed-off-by: Andrew V. Samoilov <a.samoilov@gmail.com>
This commit is contained in:
parent
a02c353ab9
commit
f963a74a8e
@ -258,7 +258,7 @@ load_interfaces (void)
|
||||
interpret_interfaces (lp_interfaces (), &local_interfaces, "interface");
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
override the defaults
|
||||
**************************************************************************/
|
||||
@ -283,7 +283,7 @@ iface_set_default (char *ip, char *bcast, char *nmask)
|
||||
default_nmask = *interpret_addr2 (nmask);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
/****************************************************************************
|
||||
check if an IP is one of mine
|
||||
@ -298,6 +298,7 @@ ismyip (struct in_addr ip)
|
||||
return False;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
check if a packet is from a local (known) net
|
||||
**************************************************************************/
|
||||
@ -310,6 +311,7 @@ is_local_net (struct in_addr from)
|
||||
return True;
|
||||
return False;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/****************************************************************************
|
||||
how many interfaces do we have
|
||||
@ -325,6 +327,7 @@ iface_count (void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
True if we have two or more interfaces.
|
||||
**************************************************************************/
|
||||
@ -354,7 +357,7 @@ get_interface (int n)
|
||||
return i;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
/****************************************************************************
|
||||
return IP of the Nth interface
|
||||
**************************************************************************/
|
||||
@ -388,7 +391,7 @@ iface_find (struct in_addr ip)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
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
|
||||
@ -410,7 +413,7 @@ iface_hash (void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
/* these 3 functions return the ip/bcast/nmask for the interface
|
||||
most appropriate for the given ip address. If they can't find
|
||||
|
@ -424,6 +424,7 @@ put_dos_date (char *buf, int offset, time_t unixdate)
|
||||
SIVAL (buf, offset, x);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*******************************************************************
|
||||
put a dos date into a buffer (date/time format)
|
||||
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);
|
||||
SIVAL (buf, offset, x);
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/*******************************************************************
|
||||
put a dos 32 bit "unix like" date into a buffer. This routine takes
|
||||
|
@ -51,7 +51,7 @@ int lastport = 0;
|
||||
|
||||
int smb_read_error = 0;
|
||||
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
determine if a file descriptor is in fact a socket
|
||||
****************************************************************************/
|
||||
@ -63,7 +63,7 @@ is_a_socket (int fd)
|
||||
l = sizeof (int);
|
||||
return (getsockopt (fd, SOL_SOCKET, SO_TYPE, (char *) &v, &l) == 0);
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
enum SOCK_OPT_TYPES
|
||||
{ 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);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
send a keepalive packet (rfc1002)
|
||||
****************************************************************************/
|
||||
@ -399,7 +399,7 @@ send_keepalive (int client)
|
||||
|
||||
return (write_data (client, (char *) buf, 4) == 4);
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1690,7 +1690,7 @@ cli_getattrE (struct cli_state * cli, int fd,
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
do a SMBgetatr call
|
||||
****************************************************************************/
|
||||
@ -1741,7 +1741,7 @@ cli_getatr (struct cli_state * cli, char *fname, uint16 * attr, size_t * size, t
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
/****************************************************************************
|
||||
do a SMBsetatr call
|
||||
@ -2720,6 +2720,7 @@ cli_error (struct cli_state *cli, uint8 * eclass, uint32 * num, uint32 * nt_rpc_
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/****************************************************************************
|
||||
set socket options on a open connection
|
||||
****************************************************************************/
|
||||
@ -2739,6 +2740,7 @@ cli_setpid (struct cli_state *cli, uint16 pid)
|
||||
cli->pid = pid;
|
||||
return ret;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/****************************************************************************
|
||||
re-establishes a connection
|
||||
|
@ -303,8 +303,7 @@ resolve_bcast (const char *name, struct in_addr *return_ip, int name_type)
|
||||
struct in_addr *iplist = NULL;
|
||||
int 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
|
||||
* the first successful match.
|
||||
|
@ -102,7 +102,7 @@ pwd_read (struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt)
|
||||
pwd_set_cleartext (pwd, user_pass);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
stores a cleartext password
|
||||
@ -116,6 +116,7 @@ pwd_set_nullpwd (struct pwd_info *pwd)
|
||||
pwd->null_pwd = True;
|
||||
pwd->crypted = False;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/****************************************************************************
|
||||
stores a cleartext password
|
||||
|
@ -347,6 +347,7 @@ E_P24 (unsigned char *p21, unsigned char *c8, unsigned char *p24)
|
||||
smbhash (p24 + 16, c8, p21 + 14, 1);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
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];
|
||||
}
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
@ -165,6 +165,7 @@ SMBOWFencrypt (uchar passwd[16], uchar * c8, uchar p24[24])
|
||||
E_P24 (p21, c8, p24);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Does the des encryption from the FIRST 8 BYTES of the NT or LM MD4 hash. */
|
||||
void
|
||||
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);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
/* Does the NT MD4 hash then des encryption. */
|
||||
|
||||
|
@ -1953,7 +1953,7 @@ init_copymap (service * pservice)
|
||||
pservice->copymap[i] = True;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/***************************************************************************
|
||||
return the local pointer to a parameter given the service number and the
|
||||
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));
|
||||
}
|
||||
#endif /* 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);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/***************************************************************************
|
||||
reset the max number of services
|
||||
***************************************************************************/
|
||||
@ -2468,7 +2469,7 @@ lp_numservices (void)
|
||||
{
|
||||
return (iNumServices);
|
||||
}
|
||||
|
||||
#endif /* 0 */
|
||||
|
||||
/***************************************************************************
|
||||
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 (ret);
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/***********************************************************
|
||||
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;
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
Loading…
Reference in New Issue
Block a user