Apple AppleShare 3.0 Users and Groups Programming Interf Manuel d'utilisateur

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Logiciel Apple AppleShare 3.0 Users and Groups Programming Interf. Apple AppleShare 3.0 Users and Groups Programming Interface User Manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 32
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
USERS AND GROUPS PROGRAMMING INTERFACE
UGLibrary is a set of functions that lets you implement users and groups
capabilities for your shared applications in a consistent way. Thus, you can
take advantage of existing system-software users and groups components to
authenticate users of your shared applications.
Additionally, your applications can use UGLibrary to manipulate the Users &
Groups Data File for the AppleShare Server 3.0, or for any Macintosh that is
using Macintosh File Sharing. These functions provide a simple programming
interface that allows your applications to add and delete users and groups,
and to set information on users, groups, the AppleShare File Server 3.0, or
Macintosh File Sharing. (Throughout the rest of this document, the term file
server is used to refer to both the AppleShare File Server 3.0 and Macintosh
File Sharing.)
Here are some examples of how UGLibrary can help you make use of users and
groups files from within your applications:
- The UGAuthenticateUser function can let server applications other than the
file server use the users and groups file to authenticate the applications'
remote users. (The password must be a Pascal string containing the Cleartext
value of the password. the application must use the appropriate encryption
methods if the password will be sent over the network.)
- A database application can use the UGGetUserInfo function to see if a
remote user is a member of a specific group before allowing the user access
to files.
- Classroom software can generate users and groups files for file servers,
using its student and class database.
- An application, running on a server Macintosh, that is communicating with a
remote application can be used to maintain the users and groups files
remotely. Apple events or the PPC Toolbox can be used for authenticated
communications between the applications.
The users and groups file
A users and groups file contains records that define file server
characteristics, the list of users, the list of groups, the mapping of users
into groups, and other information about users. Users and groups files can be
opened and closed. When a users and groups file is opened, a file reference
number is assigned to the access path and a program access ID is assigned to
the application that opened the file. The file reference number and program
access ID are passed to all UGLibrary functions that manipulate the open
users and groups file.
When your program creates a users and groups file, the file's server version
number is Sys7SrvrVer. (This is the value that the UGGetULInfo function
returns in the ugSrvrVersion field.) This version number indicates that the
file can be used only by Macintosh File Sharing. If the file is to be used
with the AppleShare File Server 3.0, the ugSrvrVersion field must be set to
AS3SrvrVer by means of the UGSetULInfo function.
The following UGLibrary functions are relevant to users and groups files and
are described in detail later in this document:
Vue de la page 0
1 2 3 4 5 6 ... 31 32

Résumé du contenu

Page 1

USERS AND GROUPS PROGRAMMING INTERFACEUGLibrary is a set of functions that lets you implement users and groupscapabilities for your shared application

Page 2

(user ID 1) cannot be deleted.Result CodesnoErr 0 No error.ugUserNotFound 5 User is not in the users and

Page 3

ugGroupAlreadyExists 2 Group with the same name exists.ugUserNotFound 5 The user is not in the users andgroups file.

Page 4

66 ugGroups 168 bytes array of group IDs(42 longs)UGGetUserInfo can be used to provide information about a specific user,enumerate all users in

Page 5

ugUserNotFound 5 The user is not in the users and groupsfile.ugGroupNotFound 6 The group is not in the users and grou

Page 6

Result CodesnoErr 0 No error.ugUserNotFound 5 The user is not in the users and groupsfile.ugNotAUser

Page 7

ugBadParamErr 13 async is TRUE, the length of the passwordis greater than 8, or the length of theuser name is greater than 31.ugInv

Page 8

FUNCTION UGDeleteGroup (thePB: UserGroupPBPtr; async: BOOLEAN): OSErr;pascal OSErr UGDeleteGroup (UserGroupPBPtr thePB, Boolean async);Parameter Block

Page 9

should be a pointer to a zero-length Str31. If ugNamePtr is used, thenugGroupID should be 0. If both fields have values, then ugGroupID takesprecedenc

Page 10

When UGGetGroupInfo is used to get information about a specific group, thegroup is specified either by ugGroupID or by ugNamePtr. If ugGroupID is used

Page 11

group. (The primary group is used by AppleShare File Servers 2.0.1 and 3.0when Apple II mode is on. Refer to "Data Structures," later in thi

Page 12

- UGOpenFile- UGCloseFile- UGCreateFileUsersThe following attributes are assigned to each user (except the guest user): auser ID, a user name, a passw

Page 13

Result CodesnoErr 0 No error.ugUserNotFound 5 The user is not in the users andgroups file.ugGro

Page 14

62 ugPwdExpDate long days beforepasswords expireUGGetULInfo returns the characteristics of the AppleShare File Server 3.0 orthe Macintosh File

Page 15

60 ugMaxBadLogins word maximum failed loginattempts62 ugPwdExpDate long days before userpasswords expireUGSetULInfo sets the fil

Page 16

BitUser flag number DescriptionIACEnabled 0 Set if IAC is enabled for this user.LoginEnabled

Page 17

Data File, the state of the reserved bits should be preserved.The following figure shows the ugSrvrFlags bits.All of the ugSrvrFlags flags are effecti

Page 18

ugCmdAddr: Ptr;ugCompletion: ProcPtr;ugResult: OSErr;ugNamePtr: StringPtr;ugVRefNum: INTEGER;ugRefNum: INTEGER;ugDirID: LONGINT;ugAccessID: LONGINT;ug

Page 19

ugNamePtr: StringPtr;ugVRefNum: INTEGER;ugRefNum: INTEGER;ugDirID: LONGINT;ugAccessID: LONGINT;ugUserID: LONGINT;ugGroupID: LONGINT;ugPosOffset: INTEG

Page 20

ugSrvrFlags: ARRAY[0..1] OF LONGINT;ugMinPwdLen: SignedByte;filler1: SignedByte;ugMaxBadLogins: INTEGER;ugPwdExpDate: LONGINT;END;UserGroupPBPtr = ^UG

Page 21

struct UGFilePBUGPBHeaderStringPtr ugAdminKey;typedef struct UGFilePB UGFilePB;struct UGUserPBUGPBHeadershort ugPosOffset;StringPtr ug

Page 22

short ugMaxBadLogins;long ugPwdExpDate;typedef struct UGServerPB UGServerPB;union UGParamBlockRecUGFilePB ugFilePB;UGUserPB ugU

Page 23

parts of the system use the same administrator name. Once the administratoruser is created, it cannot be deleted or renamed by means of UGLibrary; itc

Page 24

In C:pascal OSErr UGNewUser (UserGroupPBPtr thePB, Boolean async);pascal OSErr UGDeleteUser (UserGroupPBPtr thePB, Boolean async);pascal OSErr UGRenam

Page 25

pascal OSErr UGGetULInfo (UserGroupPBPtr thePB, Boolean async);pascal OSErr UGSetULInfo (UserGroupPBPtr thePB, Boolean async);Result codes returned by

Page 26

ugFatalError = 99For more informationAPDA offers convenient worldwide access to over three hundred developmenttools, resources, and training

Page 27

- UGNewGroup- UGDeleteGroup- UGRenameGroup- UGGetGroupInfo- UGAssignUserToGroup- UGDeleteUserFromGroupThe file serverThe UGGetULInfo function is used

Page 28

Note For Apple II users, AppleShare Admin creates a personal folder for eachuser inside the Users folder. Thus, even if the Apple2 bit is set, theSta

Page 29

Macintosh File Sharing supports a combined total of 100 users and groups.Several features supported by the AppleShare File Server 3.0 are notavailable

Page 30

to a Str31) within the folder specified in ugDirID on the volume specifiedin ugVRefNum. If ugNamePtr points to a zero-length Str31, the localized name

Page 31

UGCreateFileFUNCTION UGCreateFile (thePB: UserGroupPBPtr; async: BOOLEAN): OSErr;pascal OSErr UGCreateFile (UserGroupPBPtr thePB, Boolean async);Param

Page 32

UGNewUser creates a new user. The pointer ugNamePtr (a pointer to a Str31)contains the name of the user and the pointer ugPassword (a pointer to aStr8

Commentaires sur ces manuels

Pas de commentaire