summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-02-15 02:02:51 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-02-15 02:02:51 +0000
commit1cf9b9be79c6ff45361ed04b857d17e3cb5dc27c (patch)
tree3bee91fbb76e8effcee6dcaf55ea35c052c26068
parent3b257cf50026b9df84ced537ceabc9f7fa543813 (diff)
downloadsamba-1cf9b9be79c6ff45361ed04b857d17e3cb5dc27c.tar.gz
samba-1cf9b9be79c6ff45361ed04b857d17e3cb5dc27c.tar.bz2
samba-1cf9b9be79c6ff45361ed04b857d17e3cb5dc27c.zip
Remove obsolete file lib/netatalk.c - We have a VFS module now
(This used to be commit 28653989cfe5d705b99a4888c0c3fb79d1f89162)
-rw-r--r--source3/acconfig.h1
-rw-r--r--source3/include/local.h3
-rw-r--r--source3/lib/netatalk.c155
3 files changed, 0 insertions, 159 deletions
diff --git a/source3/acconfig.h b/source3/acconfig.h
index 97b1e85924..8312a5e5d3 100644
--- a/source3/acconfig.h
+++ b/source3/acconfig.h
@@ -73,7 +73,6 @@
#undef HAVE_VA_COPY
#undef HAVE_SETRESUID_DECL
#undef HAVE_SETRESUID
-#undef WITH_NETATALK
#undef WITH_UTMP
#undef WITH_MSDFS
#undef WITH_LIBICONV
diff --git a/source3/include/local.h b/source3/include/local.h
index bf828b5894..e16cdbbc5d 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -166,9 +166,6 @@
it are worked out */
#define USE_READ_PREDICTION 0
-/* name of directory that netatalk uses to store macintosh resource forks */
-#define APPLEDOUBLE ".AppleDouble/"
-
/*
* Default passwd chat script.
*/
diff --git a/source3/lib/netatalk.c b/source3/lib/netatalk.c
deleted file mode 100644
index 035f3794a0..0000000000
--- a/source3/lib/netatalk.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
- Copyright (C) Andrew Tridgell 1992-1998
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/*
- netatalk.c : routines for improving interaction between Samba and netatalk.
- Copyright (C) John D. Blair <jdblair@cobaltnet.com> 1998
- Cobalt Networks, Inc.
-*/
-
-#include "includes.h"
-
-#ifdef WITH_NETATALK
-
-/*****************
- ntalk_resourcepath: creates the path to the netatalk resource fork for
- a given file
-
- fname: normal filename
- doublename: buffer that will contain the location of the resource fork
- length: length of this buffer (to prevent overflows)
-
- NOTE: doesn't currently gracefully deal with buffer overflows- it just
- doesn't allow them to occur.
-******************/
-void ntalk_resourcepath(const char *fname, char *doublename, const int length)
-{
- int i;
- int charnum;
- int lastslash;
- char appledouble[] = APPLEDOUBLE;
-
- /* copy fname to doublename and find last slash */
- for (i = 0; (fname[i] != 0) && (i <= length); i++) {
- if (fname[i] == '/') {
- lastslash = i;
- }
- doublename[i] = fname[i];
- }
- lastslash++; /* location just after last slash */
-
- /* insert .AppleDouble */
- charnum = lastslash;
- for (i = 0; (appledouble[i] != 0) && (i <= length); i++) {
- doublename[charnum] = appledouble[i];
- charnum++;
- }
-
- /* append last part of file name */
- for (i = lastslash; (fname[i] != 0) && (i <= length); i++) {
- doublename[charnum] = fname[i];
- charnum++;
- }
-
- doublename[charnum] = 0;
-}
-
-/**********************
- ntalk_mkresdir: creates a new .AppleDouble directory (if necessary)
- for the resource fork of a specified file
-**********************/
-int ntalk_mkresdir(const char *fname)
-{
- char fdir[255];
- int i;
- int lastslash;
- SMB_STRUCT_STAT dirstats;
- char appledouble[] = APPLEDOUBLE;
-
- /* find directory containing fname */
- for (i = 0; (fname[i] != 0) && (i <= 254); i++) {
- fdir[i] = fname[i];
- if (fdir[i] == '/') {
- lastslash = i;
- }
- }
- lastslash++;
- fdir[lastslash] = 0;
- sys_lstat(fdir, &dirstats);
-
- /* append .AppleDouble */
- for (i = 0; (appledouble[i] != 0) && (lastslash <= 254); i++) {
- fdir[lastslash] = appledouble[i];
- lastslash++;
- }
- fdir[lastslash] = 0;
-
- /* create this directory */
- /* silently ignore EEXIST error */
- if ((mkdir(fdir, dirstats.st_mode) < 0) && (errno != EEXIST)) {
- return errno;
- }
-
- /* set ownership of this dir to the same as its parent */
- /* holy race condition, batman! */
- /* warning: this doesn't check for errors */
- chown(fdir, dirstats.st_uid, dirstats.st_gid);
-
- printf("%s\n", fdir);
-
- return 1;
-}
-
-/**********************
- ntalk_unlink: unlink a file and its resource fork
-**********************/
-int ntalk_unlink(const char *fname)
-{
- char buf[255];
-
- ntalk_resourcepath(fname, buf, 255);
- unlink(buf);
- return unlink(fname);
-}
-
-/**********************
- ntalk_chown: chown a file and its resource fork
-**********************/
-int ntalk_chown(const char *fname, const uid_t uid, const gid_t gid)
-{
- char buf[255];
-
- ntalk_resourcepath(fname, buf, 255);
- chown(buf, uid, gid);
- return chown(fname, uid, gid);
-}
-
-/**********************
- ntalk_chmod: chmod a file and its resource fork
-**********************/
-int ntalk_chmod(const char *fname, mode_t perms)
-{
- char buf[255];
-
- ntalk_resourcepath(fname, buf, 255);
- chmod(buf, perms);
- return chmod(fname, perms);
-}
-
-#endif /* WITH_NETATALK */