Hello community,
here is the log from the commit of package autofs
checked in at Fri Feb 2 12:57:46 CET 2007.
--------
--- autofs/autofs.changes 2007-01-29 18:01:00.000000000 +0100
+++ /mounts/work_src_done/STABLE/autofs/autofs.changes 2007-01-31 15:43:38.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Jan 31 15:38:19 CET 2007 - mkoenig@suse.de
+
+- add upstream patch autofs-4.1.4-dont_create_remote_dirs.patch
+ Checks first for the directory to create in order to avoid
+ problems with different mkdir behaviour, resolves [#229607]
+
+-------------------------------------------------------------------
New:
----
autofs-4.1.4-dont_create_remote_dirs.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ autofs.spec ++++++
--- /var/tmp/diff_new_pack.F12853/_old 2007-02-02 12:57:25.000000000 +0100
+++ /var/tmp/diff_new_pack.F12853/_new 2007-02-02 12:57:25.000000000 +0100
@@ -19,7 +19,7 @@
Autoreqprov: on
Requires: sed grep
Version: 4.1.4
-Release: 61
+Release: 62
Summary: A Kernel-Based Automounter
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-%{version}.tar.bz2
@@ -42,6 +42,7 @@
Patch12: autofs4-nfs-retry.diff
Patch13: autofs-4.1.4-buffer_overflow.patch
Patch14: autofs-4.1.4-multi_parse_fix.patch
+Patch15: autofs-4.1.4-dont_create_remote_dirs.patch
PreReq: %fillup_prereq %insserv_prereq
PreReq: /usr/bin/sed /usr/bin/grep /bin/mv
@@ -77,6 +78,7 @@
%patch12 -p1
%patch13
%patch14 -p1
+%patch15 -p1
%build
autoconf
@@ -143,6 +145,10 @@
/usr/sbin/automount
%changelog -n autofs
+* Wed Jan 31 2007 - mkoenig@suse.de
+- add upstream patch autofs-4.1.4-dont_create_remote_dirs.patch
+ Checks first for the directory to create in order to avoid
+ problems with different mkdir behaviour, resolves [#229607]
* Mon Jan 29 2007 - mkoenig@suse.de
- remove the introduced -multi option, because this issue has
been fixed upstream in a different way.
++++++ autofs-4.1.4-dont_create_remote_dirs.patch ++++++
--- autofs-4.1.4/include/automount.h.dont-create-remote-dirs 2006-10-04 04:06:21.000000000 +0800
+++ autofs-4.1.4/include/automount.h 2006-10-04 04:06:21.000000000 +0800
@@ -37,6 +37,8 @@
#define SLOPPY
#endif
+#define AUTOFS_SUPER_MAGIC 0x00000187L
+
#define DEFAULT_TIMEOUT (5*60) /* 5 minutes */
#define AUTOFS_LOCK "/var/lock/autofs" /* To serialize access to mount */
#define MOUNTED_LOCK _PATH_MOUNTED "~" /* mounts' lock file */
@@ -275,6 +277,7 @@
/* mount table utilities */
struct mnt_list {
char *path;
+ char *fs_name;
char *fs_type;
pid_t pid;
time_t last_access;
@@ -285,6 +288,7 @@
struct mnt_list *reverse_mnt_list(struct mnt_list *list);
struct mnt_list *get_base_mnt_list(struct mnt_list *list);
void free_mnt_list(struct mnt_list *list);
+int contained_in_local_fs(const char *path);
int is_mounted(const char *table, const char *path);
int has_fstab_option(const char *path, const char *opt);
int allow_owner_mount(const char *);
--- autofs-4.1.4/daemon/automount.c.dont-create-remote-dirs 2006-10-04 04:06:20.000000000 +0800
+++ autofs-4.1.4/daemon/automount.c 2006-10-04 04:07:47.000000000 +0800
@@ -101,6 +101,32 @@
static int handle_packet_expire(const struct autofs_packet_expire *pkt);
static int umount_all(int force);
+static int do_mkdir(const char *path, mode_t mode)
+{
+ int status;
+ struct stat st;
+
+ status = stat(path, &st);
+ if (status == 0) {
+ if (!S_ISDIR(st.st_mode)) {
+ errno = ENOTDIR;
+ return 0;
+ }
+ return 1;
+ }
+
+ if (contained_in_local_fs(path)) {
+ if (mkdir(path, mode) == -1) {
+ if (errno == EEXIST)
+ return 1;
+ return 0;
+ }
+ return 1;
+ }
+
+ return 0;
+}
+
int mkdir_path(const char *path, mode_t mode)
{
char *buf = alloca(strlen(path) + 1);
@@ -113,19 +139,9 @@
bp += cp - lcp;
lcp = cp;
*bp = '\0';
- if (mkdir(buf, mode) == -1) {
- /* If it already exists, make sure it's a directory */
- if (errno == EEXIST) {
- struct stat st;
-
- if (stat(buf, &st) == 0 && !S_ISDIR(st.st_mode))
- errno = ENOTDIR;
- else {
- /* last component, return -1 */
- if (*cp != '\0')
- continue;
- }
- }
+ if (!do_mkdir(buf, mode)) {
+ if (*cp != '\0')
+ continue;
return -1;
}
}
--- autofs-4.1.4/lib/mounts.c.dont-create-remote-dirs 2005-01-17 23:09:28.000000000 +0800
+++ autofs-4.1.4/lib/mounts.c 2006-10-04 04:06:21.000000000 +0800
@@ -21,6 +21,7 @@
#include
participants (1)
-
root@Hilbert.suse.de