summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-01-03 19:19:48 +0000
committerLuke Leighton <lkcl@samba.org>2000-01-03 19:19:48 +0000
commit8976e26d46cb991710bc77463f7f928ac00dd4d8 (patch)
treea20a59a0ee49c54ee2761cc5c016ccdeb15b866b /source/lib/util.c
parent32f66f4ea63038cb4b3785bdf1762abdde076f5d (diff)
downloadsamba-8976e26d46cb991710bc77463f7f928ac00dd4d8.tar.gz
samba-8976e26d46cb991710bc77463f7f928ac00dd4d8.tar.xz
samba-8976e26d46cb991710bc77463f7f928ac00dd4d8.zip
simple mods to add msrpc pipe redirection. default behaviour: fall back
to using internal msrpc code in smbd.
Diffstat (limited to 'source/lib/util.c')
-rw-r--r--source/lib/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 0ad14ad3aed..1a893c52ce5 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -358,6 +358,21 @@ BOOL file_exist(char *fname,SMB_STRUCT_STAT *sbuf)
}
/*******************************************************************
+ rename a unix file
+********************************************************************/
+int file_rename(char *from, char *to)
+{
+ int rcode = rename (from, to);
+
+ if (errno == EXDEV)
+ {
+ /* Rename across filesystems needed. */
+ rcode = copy_reg (from, to);
+ }
+ return rcode;
+}
+
+/*******************************************************************
check a files mod time
********************************************************************/
time_t file_modtime(char *fname)