diff options
-rw-r--r-- | examples/libsmbclient/Makefile | 9 | ||||
-rw-r--r-- | source/passdb/util_unixsids.c | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile index a50e80a9189..50a690c68eb 100644 --- a/examples/libsmbclient/Makefile +++ b/examples/libsmbclient/Makefile @@ -5,7 +5,7 @@ SAMBA_INCL = -I/usr/local/samba/include EXTLIB_INCL = -I/usr/include/gtk-1.2 \ -I/usr/include/glib-1.2 \ -I/usr/lib/glib/include -EXTLIB_INCL = `gtk-config --cflags` +#EXTLIB_INCL = `gtk-config --cflags` DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS = -O0 -g $(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS) @@ -28,7 +28,8 @@ TESTS= testsmbc \ testchmod \ testutime \ testread \ - testwrite + testwrite \ + libsmbclient.c # tree \ @@ -94,6 +95,10 @@ testwrite: testwrite.o @echo Linking testwrite $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt +libsmbclient: libsmbclient.o + @echo Linking libsmbclient + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt + smbsh: make -C smbwrapper diff --git a/source/passdb/util_unixsids.c b/source/passdb/util_unixsids.c index 8c92f957780..1b674d02a2d 100644 --- a/source/passdb/util_unixsids.c +++ b/source/passdb/util_unixsids.c @@ -38,13 +38,13 @@ bool sid_check_is_in_unix_users(const DOM_SID *sid) bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid) { sid_copy(sid, &global_sid_Unix_Users); - return sid_append_rid(sid, uid); + return sid_append_rid(sid, (uint32_t)uid); } bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid) { sid_copy(sid, &global_sid_Unix_Groups); - return sid_append_rid(sid, gid); + return sid_append_rid(sid, (uint32_t)gid); } const char *unix_users_domain_name(void) @@ -62,7 +62,7 @@ bool lookup_unix_user_name(const char *name, DOM_SID *sid) } sid_copy(sid, &global_sid_Unix_Users); - sid_append_rid(sid, pwd->pw_uid); /* For 64-bit uid's we have enough + sid_append_rid(sid, (uint32_t)pwd->pw_uid); /* For 64-bit uid's we have enough * space ... */ TALLOC_FREE(pwd); return True; @@ -93,13 +93,13 @@ bool lookup_unix_group_name(const char *name, DOM_SID *sid) { struct group *grp; - grp = getgrnam(name); + grp = sys_getgrnam(name); if (grp == NULL) { return False; } sid_copy(sid, &global_sid_Unix_Groups); - sid_append_rid(sid, grp->gr_gid); /* For 64-bit uid's we have enough + sid_append_rid(sid, (uint32_t)grp->gr_gid); /* For 64-bit uid's we have enough * space ... */ return True; } |