1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00
nixpkgs/pkgs/os-specific/linux/kvm/smbd-path-r2.patch
Eelco Dolstra 1a3a6835c2 * KVM 82.
* Kernel headers for Linux 2.6.28.

svn path=/nixpkgs/trunk/; revision=13755
2009-01-13 12:40:58 +00:00

51 lines
1.5 KiB
Diff

diff -rc kvm-82-orig/qemu/net.c kvm-82/qemu/net.c
*** kvm-82-orig/qemu/net.c 2008-12-24 15:24:58.000000000 +0100
--- kvm-82/qemu/net.c 2009-01-13 12:59:15.000000000 +0100
***************
*** 560,570 ****
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");
--- 560,572 ----
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");
diff -rc kvm-82-orig/qemu/net.h kvm-82/qemu/net.h
*** kvm-82-orig/qemu/net.h 2008-12-24 15:24:58.000000000 +0100
--- kvm-82/qemu/net.h 2009-01-13 12:58:28.000000000 +0100
***************
*** 99,105 ****
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
#else
! #define SMBD_COMMAND "/usr/sbin/smbd"
#endif
#endif
--- 99,105 ----
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
#else
! #define SMBD_COMMAND "smbd"
#endif
#endif