diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch')
-rw-r--r-- | meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch new file mode 100644 index 0000000000..b5d7ad26ca --- /dev/null +++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-nobind-sun-escaped-map-entries.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | autofs-5.0.7 - fix nobind sun escaped map entries | ||
2 | |||
3 | From: Ian Kent <ikent@redhat.com> | ||
4 | |||
5 | If a map contains a Sun colon escape to indicate the mount is a local | ||
6 | file system and the "nobind" option is present there is no hostname in | ||
7 | the mount location and the mount fails. | ||
8 | --- | ||
9 | |||
10 | CHANGELOG | 4 ++++ | ||
11 | modules/mount_nfs.c | 5 +++-- | ||
12 | 2 files changed, 7 insertions(+), 2 deletions(-) | ||
13 | |||
14 | |||
15 | diff --git a/CHANGELOG b/CHANGELOG | ||
16 | index 67fdcec..faf4c80 100644 | ||
17 | --- a/CHANGELOG | ||
18 | +++ b/CHANGELOG | ||
19 | @@ -1,3 +1,7 @@ | ||
20 | +??/??/2012 autofs-5.0.8 | ||
21 | +======================= | ||
22 | +- fix nobind sun escaped map entries. | ||
23 | + | ||
24 | 25/07/2012 autofs-5.0.7 | ||
25 | ======================= | ||
26 | - fix ipv6 name for lookup fix. | ||
27 | diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c | ||
28 | index 9b8e5f1..bbbb1de 100644 | ||
29 | --- a/modules/mount_nfs.c | ||
30 | +++ b/modules/mount_nfs.c | ||
31 | @@ -263,13 +263,14 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int | ||
32 | } else | ||
33 | strcpy(loc, n_addr); | ||
34 | } else { | ||
35 | - loc = malloc(strlen(this->name) + strlen(this->path) + 2); | ||
36 | + char *host = this->name ? this->name : "localhost"; | ||
37 | + loc = malloc(strlen(host) + strlen(this->path) + 2); | ||
38 | if (!loc) { | ||
39 | char *estr = strerror_r(errno, buf, MAX_ERR_BUF); | ||
40 | error(ap->logopt, "malloc: %s", estr); | ||
41 | goto forced_fail; | ||
42 | } | ||
43 | - strcpy(loc, this->name); | ||
44 | + strcpy(loc, host); | ||
45 | } | ||
46 | strcat(loc, ":"); | ||
47 | strcat(loc, this->path); | ||