diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/linux/kvm/smbd-path.patch | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kvm/smbd-path.patch b/pkgs/os-specific/linux/kvm/smbd-path.patch index 45e9a4bacced3..8535c28811dd9 100644 --- a/pkgs/os-specific/linux/kvm/smbd-path.patch +++ b/pkgs/os-specific/linux/kvm/smbd-path.patch @@ -1,6 +1,33 @@ diff -rc kvm-57-orig/qemu/vl.c kvm-57/qemu/vl.c *** kvm-57-orig/qemu/vl.c 2007-12-18 16:57:46.000000000 +0100 ---- kvm-57/qemu/vl.c 2008-03-11 16:17:26.000000000 +0100 +--- kvm-57/qemu/vl.c 2008-08-26 13:01:39.000000000 +0200 +*************** +*** 3828,3838 **** + slirp_init(); + } + +! /* XXX: better tmp dir construction */ +! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d", getpid()); +! if (mkdir(smb_dir, 0700) < 0) { +! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); +! exit(1); + } + snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf"); + +--- 3828,3840 ---- + slirp_init(); + } + +! while (1) { +! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%d.%d", getpid(), random()); +! if (mkdir(smb_dir, 0700) == 0) break; +! if (errno != EEXIST) { +! fprintf(stderr, "qemu: could not create samba server dir '%s'\n", smb_dir); +! exit(1); +! } + } + snprintf(smb_conf, sizeof(smb_conf), "%s/%s", smb_dir, "smb.conf"); + *************** *** 3865,3872 **** fclose(f); @@ -11,7 +38,7 @@ diff -rc kvm-57-orig/qemu/vl.c kvm-57/qemu/vl.c slirp_add_exec(0, smb_cmdline, 4, 139); } ---- 3865,3875 ---- +--- 3867,3877 ---- fclose(f); atexit(smb_exit); |