mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Get rid of MAXPATHLEN, move to standard PATH_MAX.
Jeremy.
(This used to be commit 455ed2d51d
)
This commit is contained in:
parent
44e6c30f71
commit
17a713d1b9
@ -1477,7 +1477,7 @@ accordingly.
|
|||||||
static int read_inclusion_file(char *filename)
|
static int read_inclusion_file(char *filename)
|
||||||
{
|
{
|
||||||
XFILE *inclusion = NULL;
|
XFILE *inclusion = NULL;
|
||||||
char buf[MAXPATHLEN + 1];
|
char buf[MAX_PATH + 1];
|
||||||
char *inclusion_buffer = NULL;
|
char *inclusion_buffer = NULL;
|
||||||
int inclusion_buffer_size = 0;
|
int inclusion_buffer_size = 0;
|
||||||
int inclusion_buffer_sofar = 0;
|
int inclusion_buffer_sofar = 0;
|
||||||
@ -1487,7 +1487,7 @@ static int read_inclusion_file(char *filename)
|
|||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
clipn = 0;
|
clipn = 0;
|
||||||
buf[MAXPATHLEN] = '\0'; /* guarantee null-termination */
|
buf[MAX_PATH] = '\0'; /* guarantee null-termination */
|
||||||
if ((inclusion = x_fopen(filename, O_RDONLY, 0)) == NULL) {
|
if ((inclusion = x_fopen(filename, O_RDONLY, 0)) == NULL) {
|
||||||
/* XXX It would be better to include a reason for failure, but without
|
/* XXX It would be better to include a reason for failure, but without
|
||||||
* autoconf, it's hard to use strerror, sys_errlist, etc.
|
* autoconf, it's hard to use strerror, sys_errlist, etc.
|
||||||
|
@ -94,9 +94,9 @@ parse_args(int argc, char *argv[], struct smb_mount_data *data, char **share)
|
|||||||
static char *
|
static char *
|
||||||
fullpath(const char *p)
|
fullpath(const char *p)
|
||||||
{
|
{
|
||||||
char path[MAXPATHLEN];
|
char path[PATH_MAX+1];
|
||||||
|
|
||||||
if (strlen(p) > MAXPATHLEN-1) {
|
if (strlen(p) > PATH_MAX) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ static void send_fs_socket(char *the_service, char *mount_point, struct cli_stat
|
|||||||
**/
|
**/
|
||||||
static void init_mount(void)
|
static void init_mount(void)
|
||||||
{
|
{
|
||||||
char mount_point[MAXPATHLEN+1];
|
char mount_point[PATH_MAX+1];
|
||||||
pstring tmp;
|
pstring tmp;
|
||||||
pstring svc2;
|
pstring svc2;
|
||||||
struct cli_state *c;
|
struct cli_state *c;
|
||||||
|
@ -958,10 +958,6 @@ struct smb_ldap_privates;
|
|||||||
#define SYNC_DNS 1
|
#define SYNC_DNS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MAXPATHLEN
|
|
||||||
#define MAXPATHLEN 256
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SEEK_SET
|
#ifndef SEEK_SET
|
||||||
#define SEEK_SET 0
|
#define SEEK_SET 0
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user