[Pkg-owncloud-commits] [owncloud-client] 85/333: csync: Remove csync_get_local_username

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 71cc74a0d678c4f9c22269e477b65cce3302751e
Author: Markus Goetz <markus at woboq.com>
Date:   Thu Feb 27 13:55:34 2014 +0100

    csync: Remove csync_get_local_username
---
 csync/src/csync_misc.c | 42 ------------------------------------------
 csync/src/csync_misc.h |  1 -
 2 files changed, 43 deletions(-)

diff --git a/csync/src/csync_misc.c b/csync/src/csync_misc.c
index 83275b6..c8b4774 100644
--- a/csync/src/csync_misc.c
+++ b/csync/src/csync_misc.c
@@ -64,27 +64,6 @@ char *csync_get_user_home_dir(void) {
     return NULL;
 }
 
-char *csync_get_local_username(void) {
-    DWORD size = 0;
-    wchar_t *user;
-
-    /* get the size */
-    GetUserName(NULL, &size);
-
-    user = (wchar_t *) c_malloc(2*size);
-    if (user == NULL) {
-        return NULL;
-    }
-
-    if (GetUserName(user, &size)) {
-	char *uuser = c_utf8_from_locale(user);
-	SAFE_FREE(user);
-        return uuser;
-    }
-
-    return NULL;
-}
-
 #else /* ************* !WIN32 ************ */
 
 #ifndef NSS_BUFLEN_PASSWD
@@ -112,27 +91,6 @@ char *csync_get_user_home_dir(void) {
     return NULL;
 }
 
-char *csync_get_local_username(void) {
-    struct passwd pwd;
-    struct passwd *pwdbuf;
-    char buf[NSS_BUFLEN_PASSWD];
-    char *name;
-    int rc;
-
-    rc = getpwuid_r(getuid(), &pwd, buf, NSS_BUFLEN_PASSWD, &pwdbuf);
-    if (rc != 0) {
-        return NULL;
-    }
-
-    name = c_strdup(pwd.pw_name);
-
-    if (name == NULL) {
-        return NULL;
-    }
-
-    return name;
-}
-
 #endif /* ************* WIN32 ************ */
 
 #ifdef HAVE_FNMATCH
diff --git a/csync/src/csync_misc.h b/csync/src/csync_misc.h
index c424283..37783e0 100644
--- a/csync/src/csync_misc.h
+++ b/csync/src/csync_misc.h
@@ -36,7 +36,6 @@
 #endif
 
 char *csync_get_user_home_dir(void);
-char *csync_get_local_username(void);
 
 int csync_fnmatch(__const char *__pattern, __const char *__name, int __flags);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list