summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-01 16:04:24 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-01 16:04:24 +0000
commit67638b8d2b59dc992280af934346a5a1ef5fe62d (patch)
tree5e155440b7d3743385506526532d5a634d8c9f53 /source3/lib/util.c
parentc6ad04b8fb4ee5cbf862a35b4c143a6f75555718 (diff)
downloadsamba-67638b8d2b59dc992280af934346a5a1ef5fe62d.tar.gz
samba-67638b8d2b59dc992280af934346a5a1ef5fe62d.tar.bz2
samba-67638b8d2b59dc992280af934346a5a1ef5fe62d.zip
adding some samr parsing calls (group / alias adding / deleting)
added code that moves MACHINE.SID to DOMAIN_NAME.SID if it exists. (This used to be commit 51c1c31768a92d9c57ee6c09b78419bcbc544f03)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 8bc75e1137..98c840efce 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -367,6 +367,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)