2009-06-02 17:59:42 +02:00
|
|
|
diff -rc kvm-86/net.c kvm-86-new/net.c
|
|
|
|
*** kvm-86/net.c 2009-05-19 18:29:02.000000000 +0200
|
|
|
|
--- kvm-86-new/net.c 2009-06-02 17:41:15.000000000 +0200
|
2009-01-13 13:40:58 +01:00
|
|
|
***************
|
2009-06-02 17:59:42 +02:00
|
|
|
*** 684,694 ****
|
|
|
|
slirp_init(slirp_restrict, slirp_ip);
|
2009-01-13 13:40:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
! /* XXX: better tmp dir construction */
|
2009-06-02 17:59:42 +02:00
|
|
|
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld", (long)getpid());
|
2009-01-13 13:40:58 +01:00
|
|
|
! 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");
|
|
|
|
|
2009-06-02 17:59:42 +02:00
|
|
|
--- 684,696 ----
|
|
|
|
slirp_init(slirp_restrict, slirp_ip);
|
2009-01-13 13:40:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
! while (1) {
|
2009-06-02 17:59:42 +02:00
|
|
|
! snprintf(smb_dir, sizeof(smb_dir), "/tmp/qemu-smb.%ld.%d", (long) getpid(), random());
|
2009-01-13 13:40:58 +01:00
|
|
|
! 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");
|
|
|
|
|
2009-06-02 17:59:42 +02:00
|
|
|
diff -rc kvm-86/net.h kvm-86-new/net.h
|
|
|
|
*** kvm-86/net.h 2009-05-19 18:29:02.000000000 +0200
|
|
|
|
--- kvm-86-new/net.h 2009-06-02 17:39:17.000000000 +0200
|
2009-01-13 13:40:58 +01:00
|
|
|
***************
|
2009-06-02 17:59:42 +02:00
|
|
|
*** 129,135 ****
|
2009-01-13 13:40:58 +01:00
|
|
|
#ifdef __sun__
|
|
|
|
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
|
|
|
#else
|
|
|
|
! #define SMBD_COMMAND "/usr/sbin/smbd"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
2009-06-02 17:59:42 +02:00
|
|
|
--- 129,135 ----
|
2009-01-13 13:40:58 +01:00
|
|
|
#ifdef __sun__
|
|
|
|
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
|
|
|
#else
|
|
|
|
! #define SMBD_COMMAND "smbd"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|