#include <atalk/util.h>
#include <atalk/dsi.h>
#include <atalk/unicode.h>
+#include <atalk/netatalk_conf.h>
+ #include "afp_zeroconf.h"
#include "afp_avahi.h"
#include "afp_config.h"
#include "volume.h"
{
show_version( );
- printf( " SLP support:\t" );
-#ifdef USE_SRVLOC
- puts( "Yes" );
-#else
- puts( "No" );
-#endif
-
printf( " Zeroconf support:\t" );
- #ifdef USE_ZEROCONF
- puts( "Yes" );
+ #if defined (HAVE_MDNS)
+ puts( "mDNSResponder" );
+ #elif defined (HAVE_AVAHI)
+ puts( "Avahi" );
#else
puts( "No" );
#endif
/*
* Functions (actually they are just facades)
*/
-void zeroconf_register(const AFPConfig *configs)
+void zeroconf_register(const AFPObj *configs)
{
- #if defined (HAVE_AVAHI)
+ #if defined (HAVE_MDNS)
+ LOG(log_debug, logtype_afpd, "Attempting to register with mDNS using mDNSResponder");
+
+ md_zeroconf_register(configs);
+ #elif defined (HAVE_AVAHI)
LOG(log_debug, logtype_afpd, "Attempting to register with mDNS using Avahi");
av_zeroconf_register(configs);
#include "misc.h"
#include "unix.h"
- int afs_getvolspace( vol, bfree, btotal, bsize )
- struct vol *vol;
- VolSpace *bfree, *btotal;
- uint32_t *bsize;
-int afs_getvolspace(struct vol *vol, VolSpace *bfree, VolSpace *btotal, u_int32_t *bsize)
++int afs_getvolspace(struct vol *vol, VolSpace *bfree, VolSpace *btotal, uint32_t *bsize)
{
struct ViceIoctl vi;
struct VolumeStatus *vs;
obj->uid = geteuid();
obj->logout = logout;
-#ifdef FORCE_UIDGID
- obj->force_uid = 1;
- save_uidgid ( &obj->uidgid );
-#endif
-
+ /* pam_umask or similar might have changed our umask */
+ (void)umask(obj->options.umask);
+
return( AFP_OK );
}
#define AFP_UUID_H
#define UUID_BINSIZE 16
- #define UUID_STRINGSIZE 36
- #define UUID_PRINTABLE_STRING_LENGTH 37
-typedef unsigned char *uuidp_t;
+typedef const unsigned char *uuidp_t;
typedef unsigned char atalk_uuid_t[UUID_BINSIZE];
typedef enum {UUID_USER = 1,
/*!
* Convert 16 byte binary uuid to neat ascii represantation including dashes.
- *
+ * Use defined or default ascii mask for dash placement
* Returns pointer to static buffer.
*/
-const char *uuid_bin2string(unsigned char *uuid) {
+const char *uuid_bin2string(const unsigned char *uuid) {
- static char uuidstring[UUID_STRINGSIZE + 1];
-
+ static char uuidstring[64];
+ const char *uuidmask;
int i = 0;
unsigned char c;