Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7cf8a55
)
Make sure that ida_list_free() doesn't call free() on a NULL pointer.
author
Wayne Davison
<wayned@samba.org>
Tue, 25 Apr 2006 23:35:11 +0000
(23:35 +0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 25 Apr 2006 23:35:11 +0000
(23:35 +0000)
acls.diff
patch
|
blob
|
blame
|
history
diff --git
a/acls.diff
b/acls.diff
index
be2e799
..
7e1934e
100644
(file)
--- a/
acls.diff
+++ b/
acls.diff
@@
-38,7
+38,7
@@
TODO items:
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
--- old/acls.c
+++ new/acls.c
popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
--- old/acls.c
+++ new/acls.c
-@@ -0,0 +1,130
5
@@
+@@ -0,0 +1,130
7
@@
+/* -*- c-file-style: "linux" -*-
+ Copyright (C) Andrew Tridgell 1996
+ Copyright (C) Paul Mackerras 1996
+/* -*- c-file-style: "linux" -*-
+ Copyright (C) Andrew Tridgell 1996
+ Copyright (C) Paul Mackerras 1996
@@
-164,10
+164,12
@@
TODO items:
+
+static void ida_list_free(ida_list *idal)
+{
+
+static void ida_list_free(ida_list *idal)
+{
-+ free(idal->idas);
-+ idal->idas = NULL;
-+ idal->count = 0;
-+ idal->malloced = 0;
++ if (idal->idas) {
++ free(idal->idas);
++ idal->idas = NULL;
++ idal->count = 0;
++ idal->malloced = 0;
++ }
+}
+
+static void rsync_acl_free(rsync_acl *racl)
+}
+
+static void rsync_acl_free(rsync_acl *racl)
@@
-1346,7
+1348,7
@@
TODO items:
+#endif /* SUPPORT_ACLS */
--- old/backup.c
+++ new/backup.c
+#endif /* SUPPORT_ACLS */
--- old/backup.c
+++ new/backup.c
-@@ -2
8,6 +28
,7 @@ extern char *backup_suffix;
+@@ -2
9,6 +29
,7 @@ extern char *backup_suffix;
extern char *backup_dir;
extern int am_root;
extern char *backup_dir;
extern int am_root;
@@
-1354,7
+1356,7
@@
TODO items:
extern int preserve_devices;
extern int preserve_specials;
extern int preserve_links;
extern int preserve_devices;
extern int preserve_specials;
extern int preserve_links;
-@@ -13
2,6 +133
,10 @@ static int make_bak_dir(char *fullpath)
+@@ -13
3,6 +134
,10 @@ static int make_bak_dir(char *fullpath)
} else {
do_lchown(fullpath, st.st_uid, st.st_gid);
do_chmod(fullpath, st.st_mode);
} else {
do_lchown(fullpath, st.st_uid, st.st_gid);
do_chmod(fullpath, st.st_mode);
@@
-1365,7
+1367,7
@@
TODO items:
}
}
*p = '/';
}
}
*p = '/';
-@@ -18
5,6 +190
,11 @@ static int keep_backup(char *fname)
+@@ -18
6,6 +191
,11 @@ static int keep_backup(char *fname)
if (!(buf = get_backup_name(fname)))
return 0;
if (!(buf = get_backup_name(fname)))
return 0;
@@
-1377,7
+1379,7
@@
TODO items:
/* Check to see if this is a device file, or link */
if ((am_root && preserve_devices && IS_DEVICE(file->mode))
|| (preserve_specials && IS_SPECIAL(file->mode))) {
/* Check to see if this is a device file, or link */
if ((am_root && preserve_devices && IS_DEVICE(file->mode))
|| (preserve_specials && IS_SPECIAL(file->mode))) {
-@@ -26
0,6 +270
,10 @@ static int keep_backup(char *fname)
+@@ -26
1,6 +271
,10 @@ static int keep_backup(char *fname)
}
}
set_file_attrs(buf, file, NULL, 0);
}
}
set_file_attrs(buf, file, NULL, 0);
@@
-1483,7
+1485,7
@@
TODO items:
--- old/flist.c
+++ new/flist.c
--- old/flist.c
+++ new/flist.c
-@@ -4
4,6 +44
,7 @@ extern int filesfrom_fd;
+@@ -4
0,6 +40
,7 @@ extern int filesfrom_fd;
extern int one_file_system;
extern int copy_dirlinks;
extern int keep_dirlinks;
extern int one_file_system;
extern int copy_dirlinks;
extern int keep_dirlinks;
@@
-1491,7
+1493,7
@@
TODO items:
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
extern int preserve_links;
extern int preserve_hard_links;
extern int preserve_devices;
-@@ -96
5,6 +966
,11 @@ static struct file_struct *send_file_nam
+@@ -96
1,6 +962
,11 @@ static struct file_struct *send_file_nam
if (chmod_modes && !S_ISLNK(file->mode))
file->mode = tweak_mode(file->mode, chmod_modes);
if (chmod_modes && !S_ISLNK(file->mode))
file->mode = tweak_mode(file->mode, chmod_modes);
@@
-1503,7
+1505,7
@@
TODO items:
maybe_emit_filelist_progress(flist->count + flist_count_offset);
flist_expand(flist);
maybe_emit_filelist_progress(flist->count + flist_count_offset);
flist_expand(flist);
-@@ -9
72,6 +978
,16 @@ static struct file_struct *send_file_nam
+@@ -9
68,6 +974
,16 @@ static struct file_struct *send_file_nam
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f);
if (file->basename[0]) {
flist->files[flist->count++] = file;
send_file_entry(file, f);
@@
-1520,7
+1522,7
@@
TODO items:
}
return file;
}
}
return file;
}
-@@ -13
60,6 +1376
,11 @@ struct file_list *recv_file_list(int f)
+@@ -13
56,6 +1372
,11 @@ struct file_list *recv_file_list(int f)
flags |= read_byte(f) << 8;
file = receive_file_entry(flist, flags, f);
flags |= read_byte(f) << 8;
file = receive_file_entry(flist, flags, f);
@@
-1532,7
+1534,7
@@
TODO items:
if (S_ISREG(file->mode) || S_ISLNK(file->mode))
stats.total_size += file->length;
if (S_ISREG(file->mode) || S_ISLNK(file->mode))
stats.total_size += file->length;
-@@ -13
82,6 +1403
,11 @@ struct file_list *recv_file_list(int f)
+@@ -13
78,6 +1399
,11 @@ struct file_list *recv_file_list(int f)
clean_flist(flist, relative_paths, 1);
clean_flist(flist, relative_paths, 1);
@@
-4896,7
+4898,7
@@
TODO items:
--- old/options.c
+++ new/options.c
--- old/options.c
+++ new/options.c
-@@ -4
5,6 +45
,7 @@ int copy_dirlinks = 0;
+@@ -4
7,6 +47
,7 @@ int copy_dirlinks = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
int copy_links = 0;
int preserve_links = 0;
int preserve_hard_links = 0;
@@
-4904,7
+4906,7
@@
TODO items:
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
int preserve_perms = 0;
int preserve_executability = 0;
int preserve_devices = 0;
-@@ -19
2,6 +193
,7 @@ static void print_rsync_version(enum log
+@@ -19
4,6 +195
,7 @@ static void print_rsync_version(enum log
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
char const *got_socketpair = "no ";
char const *have_inplace = "no ";
char const *hardlinks = "no ";
@@
-4912,7
+4914,7
@@
TODO items:
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
char const *links = "no ";
char const *ipv6 = "no ";
STRUCT_STAT *dumstat;
-@@ -2
08,6 +210
,10 @@ static void print_rsync_version(enum log
+@@ -2
10,6 +212
,10 @@ static void print_rsync_version(enum log
hardlinks = "";
#endif
hardlinks = "";
#endif
@@
-4923,7
+4925,7
@@
TODO items:
#ifdef SUPPORT_LINKS
links = "";
#endif
#ifdef SUPPORT_LINKS
links = "";
#endif
-@@ -22
1,9 +227
,9 @@ static void print_rsync_version(enum log
+@@ -22
3,9 +229
,9 @@ static void print_rsync_version(enum log
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
rprintf(f, "<http://rsync.samba.org/>\n");
rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
@@
-4935,7
+4937,7
@@
TODO items:
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
/* Note that this field may not have type ino_t. It depends
* on the complicated interaction between largefile feature
-@@ -29
3,6 +299
,9 @@ void usage(enum logcode F)
+@@ -29
5,6 +301
,9 @@ void usage(enum logcode F)
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
@@
-4945,7
+4947,7
@@
TODO items:
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --chmod=CHMOD change destination permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
-@@ -4
08,6 +417
,9 @@ static struct poptOption long_options[]
+@@ -4
10,6 +419
,9 @@ static struct poptOption long_options[]
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
{"no-perms", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"no-p", 0, POPT_ARG_VAL, &preserve_perms, 0, 0, 0 },
{"executability", 'E', POPT_ARG_NONE, &preserve_executability, 0, 0, 0 },
@@
-4955,7
+4957,7
@@
TODO items:
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"times", 't', POPT_ARG_VAL, &preserve_times, 1, 0, 0 },
{"no-times", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
{"no-t", 0, POPT_ARG_VAL, &preserve_times, 0, 0, 0 },
-@@ -106
6,6 +1078
,24 @@ int parse_arguments(int *argc, const cha
+@@ -106
8,6 +1080
,24 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
usage(FINFO);
exit_cleanup(0);
@@
-4980,7
+4982,7
@@
TODO items:
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -15
08,6 +1538
,10 @@ void server_options(char **args,int *arg
+@@ -15
10,6 +1540
,10 @@ void server_options(char **args,int *arg
if (preserve_hard_links)
argstr[x++] = 'H';
if (preserve_hard_links)
argstr[x++] = 'H';
@@
-4993,7
+4995,7
@@
TODO items:
if (preserve_gid)
--- old/receiver.c
+++ new/receiver.c
if (preserve_gid)
--- old/receiver.c
+++ new/receiver.c
-@@ -4
6,6 +46
,7 @@ extern int keep_partial;
+@@ -4
8,6 +48
,7 @@ extern int keep_partial;
extern int checksum_seed;
extern int inplace;
extern int delay_updates;
extern int checksum_seed;
extern int inplace;
extern int delay_updates;
@@
-5001,7
+5003,7
@@
TODO items:
extern struct stats stats;
extern char *log_format;
extern char *tmpdir;
extern struct stats stats;
extern char *log_format;
extern char *tmpdir;
-@@ -34
4,6 +345
,10 @@ int recv_files(int f_in, struct file_lis
+@@ -34
6,6 +347
,10 @@ int recv_files(int f_in, struct file_lis
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
int itemizing = am_daemon ? daemon_log_format_has_i
: !am_server && log_format_has_i;
int max_phase = protocol_version >= 29 ? 2 : 1;
@@
-5012,7
+5014,7
@@
TODO items:
int i, recv_ok;
if (verbose > 2)
int i, recv_ok;
if (verbose > 2)
-@@ -54
1,7 +546
,16 @@ int recv_files(int f_in, struct file_lis
+@@ -54
3,7 +548
,16 @@ int recv_files(int f_in, struct file_lis
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
* mode based on the local permissions and some heuristics. */
if (!preserve_perms) {
int exists = fd1 != -1;
@@
-5543,7
+5545,7
@@
TODO items:
+exit 0
--- old/uidlist.c
+++ new/uidlist.c
+exit 0
--- old/uidlist.c
+++ new/uidlist.c
-@@ -3
4,6 +34
,7 @@
+@@ -3
5,6 +35
,7 @@
extern int verbose;
extern int preserve_uid;
extern int preserve_gid;
extern int verbose;
extern int preserve_uid;
extern int preserve_gid;
@@
-5551,7
+5553,7
@@
TODO items:
extern int numeric_ids;
extern int am_root;
extern int numeric_ids;
extern int am_root;
-@@ -27
4,7 +275
,7 @@ void send_uid_list(int f)
+@@ -27
5,7 +276
,7 @@ void send_uid_list(int f)
if (numeric_ids)
return;
if (numeric_ids)
return;
@@
-5560,7
+5562,7
@@
TODO items:
int len;
/* we send sequences of uid/byte-length/name */
for (list = uidlist; list; list = list->next) {
int len;
/* we send sequences of uid/byte-length/name */
for (list = uidlist; list; list = list->next) {
-@@ -29
1,7 +292
,7 @@ void send_uid_list(int f)
+@@ -29
2,7 +293
,7 @@ void send_uid_list(int f)
write_int(f, 0);
}
write_int(f, 0);
}
@@
-5569,7
+5571,7
@@
TODO items:
int len;
for (list = gidlist; list; list = list->next) {
if (!list->name)
int len;
for (list = gidlist; list; list = list->next) {
if (!list->name)
-@@ -31
2,7 +313
,7 @@ void recv_uid_list(int f, struct file_li
+@@ -31
3,7 +314
,7 @@ void recv_uid_list(int f, struct file_li
int id, i;
char *name;
int id, i;
char *name;
@@
-5578,7
+5580,7
@@
TODO items:
/* read the uid list */
while ((id = read_int(f)) != 0) {
int len = read_byte(f);
/* read the uid list */
while ((id = read_int(f)) != 0) {
int len = read_byte(f);
-@@ -32
4,7 +325
,7 @@ void recv_uid_list(int f, struct file_li
+@@ -32
5,7 +326
,7 @@ void recv_uid_list(int f, struct file_li
}
}
}
}
@@
-5587,7
+5589,7
@@
TODO items:
/* read the gid list */
while ((id = read_int(f)) != 0) {
int len = read_byte(f);
/* read the gid list */
while ((id = read_int(f)) != 0) {
int len = read_byte(f);
-@@ -33
6,6 +337
,16 @@ void recv_uid_list(int f, struct file_li
+@@ -33
7,6 +338
,16 @@ void recv_uid_list(int f, struct file_li
}
}
}
}