1 diff -Naur LinNeighborhood-0.6.5.orig/src/smbmount.c LinNeighborhood-0.6.5/src/smbmount.c
2 --- LinNeighborhood-0.6.5.orig/src/smbmount.c Sun Jun 9 09:58:43 2002
3 +++ LinNeighborhood-0.6.5/src/smbmount.c Fri Aug 13 15:02:25 2004
5 escape_str(smbuser,&strlist),escape_str(smbpasswd,&strlist));
8 - sprintf(commandstr,"%s %s %s -o username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,ip=%s,debug=0%s",
9 + sprintf(commandstr,"%s %s %s -o username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,debug=0%s",
10 escape_str(pref_get_smbmount_exe(),&strlist),escape_str(servicename,&strlist),escape_str(mount_point,&strlist),
11 escape_str(smbuser,&strlist),escape_str(smbpasswd,&strlist),
12 - filemode,dirmode,uid,gid,ipaddr,opt_group);
13 + filemode,dirmode,uid,gid,opt_group);
15 + if (ipaddr && *ipaddr) {
16 + string_ncat(commandstr, ",ip=", MAXMNTCOMMANDL);
17 + string_ncat(commandstr, ipaddr, MAXMNTCOMMANDL);
20 if ( (port >= 0) && (port < 65536) )
22 sprintf(commandstr, "%s,port=%d", commandstr, port);
26 argv[++argnr]=commandstr;
27 - sprintf(commandstr,"username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,ip=%s,debug=0",
28 - smbuser,smbpasswd,filemode,dirmode,uid,gid,ipaddr);
29 + sprintf(commandstr,"username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,debug=0",
30 + smbuser,smbpasswd,filemode,dirmode,uid,gid);
32 + if (ipaddr && *ipaddr) {
33 + string_ncat(commandstr, ",ip=", MAXMNTCOMMANDL);
34 + string_ncat(commandstr, ipaddr, MAXMNTCOMMANDL);
39 strcat(commandstr,",workgroup=");
41 pref_get_smbmount_exe(),servicename,mount_point,ipaddr,opt_group,smbuser,dummysmbpasswd);
44 - sprintf(commandstr,"%s %s %s -o username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,ip=%s,debug=0%s",
45 + sprintf(commandstr,"%s %s %s -o username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,debug=0%s",
46 pref_get_smbmount_exe(),servicename,mount_point,smbuser,dummysmbpasswd,
47 - filemode,dirmode,uid,gid,ipaddr,opt_group);
48 + filemode,dirmode,uid,gid,opt_group);
50 + if (ipaddr && *ipaddr) {
51 + string_ncat(commandstr, ",ip=", MAXMNTCOMMANDL);
52 + string_ncat(commandstr, ipaddr, MAXMNTCOMMANDL);
55 if ( (port >= 0) && (port < 65536) )
57 string_ncat(commandstr, ",port=", MAXMNTCOMMANDL);
59 sprintf(userpasswd,"-U%s%%%s",smbuser,dummysmbpasswd);
62 - sprintf(commandstr,"username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,ip=%s,debug=0",
63 - smbuser,dummysmbpasswd,filemode,dirmode,uid,gid,ipaddr);
64 + sprintf(commandstr,"username=%s%%%s,fmask=%d,dmask=%d,uid=%d,gid=%d,debug=0",
65 + smbuser,dummysmbpasswd,filemode,dirmode,uid,gid);
67 + if (ipaddr && *ipaddr) {
68 + string_ncat(commandstr, ",ip=", MAXMNTCOMMANDL);
69 + string_ncat(commandstr, ipaddr, MAXMNTCOMMANDL);
73 strcat(commandstr,",workgroup=");
74 strcat(commandstr,group_name);