]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/status.c
Add FPSyncFork, set command 76 to afp_null, move everything from switch.c to auth.c
[netatalk.git] / etc / afpd / status.c
index f92c14d1fb08e3a9db2374874ba97df859000a90..a95c7fe33e7895318eb415020fec6cae94d0325b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: status.c,v 1.18 2006-09-18 01:06:44 didg Exp $
+ * $Id: status.c,v 1.22 2009-02-16 14:03:30 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -39,7 +39,7 @@
 static   size_t maxstatuslen = 0;
 
 static void status_flags(char *data, const int notif, const int ipok,
-                         const unsigned char passwdbits, const int dirsrvcs _U_)
+                         const unsigned char passwdbits, const int dirsrvcs _U_, int flags)
 {
     u_int16_t           status;
 
@@ -65,6 +65,9 @@ static void status_flags(char *data, const int notif, const int ipok,
     status |= AFPSRVRINFO_SRVRDIR; /* AFP 3.1 specs says we need to specify this, but may set the count to 0 */
     /* We don't set the UTF8 name flag here, we don't know whether we have enough space ... */
 
+    if (flags & OPTION_UUID)   /* 05122008 FIXME: can we set AFPSRVRINFO_UUID here ? see AFPSRVRINFO_SRVRDIR*/
+       status |= AFPSRVRINFO_UUID;
+
     status = htons(status);
     memcpy(data + AFPSTATUS_FLAGOFF, &status, sizeof(status));
 }
@@ -525,7 +528,8 @@ void status_init(AFPConfig *aspconfig, AFPConfig *dsiconfig,
     status_flags(status, options->server_notif, options->fqdn ||
                  (dsiconfig && dsi->server.sin_addr.s_addr),
                  options->passwdbits, 
-                (options->k5service && options->k5realm && options->fqdn));
+                (options->k5service && options->k5realm && options->fqdn), 
+                options->flags);
     /* returns offset to signature offset */
     c = status_server(status, options->server ? options->server :
                       options->hostname, options);